-
Notifications
You must be signed in to change notification settings - Fork 17
fix: APPEX-585 udpate catalog typing #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| const remoteSourceDir = await this.client.get<GitHubRepoTree>(targetDir.url); | ||
| const specFileNames = remoteSourceDir.data.tree.map(file => `${this.CONTENT_URL}${file.path}`); | ||
|
|
||
| const specFileNames = await remoteSourceDir.data.tree.reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍹 since this is a deeply nested prop, should we consider adding in optional chaining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be fine, based on the GIT trees api, the elements that we are chaining should be defined as either a tree type or string type👍🏼 . Reference: https://docs.github.com/en/rest/git/trees?apiVersion=2022-11-28
bc-chaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What?
The Node API client is broken. Recently, breaking changes have been introduced to the API Specs repo - this has caused the Node API client to break as Catalog has been converted from a file to a directory of files.
Tickets / Documentation
APPEX-585
Testing
Updated and added unit tests
Files are generated when running npm run generate
cc @bigcommerce/gta-dt