-
Notifications
You must be signed in to change notification settings - Fork 6
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
Performance Issue - Suggest typescript peer dependency #6
Comments
Thanks for the report! That's unfortunate, I'm not too sure what's happening... I'm not certain it would be a good idea to add a It might be better to just document the performance degradation in the README instead. What do you think? |
Hi there, looks like |
Yeah that's definitely related. I forked the stackblitz repro I originally linked https://stackblitz.com/edit/node-cjrnba?file=README.md&view=editor there's notes in the README.md there, but it basically uses zod@3.21.0 with typescript@4.4 and the performance issues goes away. So it seems that installing either typescript@^4.5 or zod@^3.21 fix the issue! Sounds like a case closed to me :) |
Description
This problem made my development environment practically unusable until I was able to narrow it down to this package. Intellisense and tsserver updates would lag 9-16 seconds!
I'm not sure what exactly is the cause, but something about the d.ts files from parse-env don't play nice with typescript 4.4.3. Updating to 4.5 or newer fixed the issue.
I just started using this package and it seems really awesome. I just felt it was worth creating an issue for in case anyone else has similar problems. Hopefully I can spare someone else a headache or two.
Reproduction
I made a more tangible example of this with running tsc: https://stackblitz.com/edit/node-j7okci?file=README.md&view=editor
In this environment, I installed znv, typescript@4.4.3, and ran
npx tsc
and it takes 10s to build.Running
npm install typescript@~4.5
andnpx tsc
takes only 1s to build.Suggestion
My recommendation for this project would be to specify a
peerDependency
for this project ontypescript@^4.5
. It won't force people to use that version, but some package managers (like yarn) will raise a warning... plus it should serve as an indicator for the minimum typescript version this project supports/recommends.The text was updated successfully, but these errors were encountered: