Open wereHamster opened 1 year ago
related to https://github.com/dotansimha/graphql-code-generator/issues/8857 (I think the solution proposed here would resolve the linked issue as well)
Disabling importHelpers will end up multiple definitions of the same stuff. even multiple tslib versions will cause less duplications. Using a ranged version with "^" would be better in my opinion. Also I am wondering what kind of typescript errors you have, could you create a reproduction?
Not sure about the OP's case.
In our case, no TS errors. We've got some inconsistency with yarn modules resolution after an upgrade for the root project tslib. This may or may not (more likely :) ) be caused by the deps from graphql-code-generator.
It just made me look more closely into the installed dependencies - and I realized we have quite a few different versions of tslib in node_modules.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Change tslib version constraint from "~2.5.0" to "^2.5.0"
Describe alternatives you've considered
Disable "importHelpers" TypeScript option because code duplication in commandline tools (that are used for development only, not even at runtime) is less of an issue than in packages which end up in client bundles.
Is your feature request related to a problem? Please describe.
I am having issues upgrading some other packages in my monorepo because yarn installs multiple versions of tslib (1.1.x, 2.5.x, 2.6.x) which then cause typescript errors.