-
Notifications
You must be signed in to change notification settings - Fork 69
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
Upgrade TypeScript to v5 in @bufbuild/protoplugin
to reduce install size for users
#763
Comments
The dependency is used to transpile TypeScript code to the targets We're pinned to this specific version of TypeScript because TypeScript makes breaking changes in minor versions. Updating is likely to break users relying on the mechanism, and it would not solve the issue since we still have to pin a version, and end users will still end up with two versions of TypeScript installed if the versions don't match. We cannot relax the constraint because this means code generation results become unstable, depending on the version of TypeScript installed by the end user. Going forward, we will change the behavior, and either 1) let plugin authors opt in to transpilation by bringing their own version of TypeScript, or 2) update to a later and smaller version of TypeScript, possibly bundled. Since this is a breaking change, it will need to wait for v2 (which we are already working on). |
Thanks for the detailed explanation, it makes sense! Both proposed options sound reasonable, glad to hear that I asked for this in time for v2. |
We've looked into making the We've update to TypeScript 5.4.5 instead in #879, which has a much smaller install size (32.4MB instead of 62). This change applies to the upcoming v2 because it is a breaking change. |
typescript@4.5.2
clocks in at 62 MB disk size after installation (biggest dependency in ournode_modules
) and leads to our project having both TypeScript v5 and v4 installed in parallel.Please upgrade the dependency to reduce load on the end users, see: https://github.com/bufbuild/protobuf-es/blob/main/packages/protoplugin/package.json#L41
The text was updated successfully, but these errors were encountered: