-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat(codegen): required devDeps are now listed in package.json
#761
Conversation
package.json
package.json
package.json
package.json
package.json
package.json
5971aa0
to
540d869
Compare
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.
@@ -28,8 +28,9 @@ export default abstract class CodeGenerator { | |||
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
@@ -28,8 +28,9 @@ export default abstract class CodeGenerator { | |||
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.json
file we generate for SDKs to now list the dev-only dependencies that are required to build an SDK.I've also added in a
prepare
script to these for rebuilding the compiled SDK, as well as afiles
array for when/if a codegen'd SDK is published to NPM.