-
Notifications
You must be signed in to change notification settings - Fork 28
feat(codegen): required devDeps are now listed in package.json
#761
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
package.jsonpackage.json
package.jsonpackage.json
package.jsonpackage.json
5971aa0 to
540d869
Compare
| dependencyType: 'production' | 'development'; | ||
| reason: string; | ||
| url: string; | ||
| url?: string; |
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.
Made url optional because it feels silly to write out https://typescriptlang.org/ as the URL for TS.
| requiredPackages!: Record< | ||
| string, | ||
| { | ||
| dependencyType: 'production' | 'development'; |
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.
Made this as dependencyType instead of devDependency: boolean so it's not specific to NPM and Node.
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.
yeah that's a great call
| requiredPackages!: Record< | ||
| string, | ||
| { | ||
| dependencyType: 'production' | 'development'; |
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.
yeah that's a great call
| typescript: { | ||
| dependencyType: 'development', | ||
| reason: 'Required for `tsup`.', | ||
| version: '^5.2.2', |
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.
if and when we improve the codegen for our test fixtures (either via a build script or something), it'd be cool if we can dynamically pull in the versions from our dependencies
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.
100%
🧰 Changes
Per feedback in #754 this slightly refactors the
package.jsonfile we generate for SDKs to now list the dev-only dependencies that are required to build an SDK.I've also added in a
preparescript to these for rebuilding the compiled SDK, as well as afilesarray for when/if a codegen'd SDK is published to NPM.