-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Packages ts-invariant and subscriptions-transport-ws both have reference to @types/node
#7734
Comments
@jimisaacs What version of |
I see we have 3.3.11 installed, let me do some more digging on the other packages. |
For some reason we have ts-invariant I will look again at why we have that version of ts-variant, though subscriptions-transport-ws has me stumped at the moment. |
So, I can't find out why 0.4.4 is installed from |
Given the versions of the packages are not the issue, but that apollo-client is the source of both of these packages in my codebase, I'm going to retitle this issue, but keep it open. |
@types/node
I have the same issue. It's apparently stemming from the When compiled to the And I can't get rid of |
I think the reason the
Because TypeScript has the NodeJS types included, when it's compiling, I think it notices that the type of
Temp solution (in userland) Manually remove the Long-term solution I'm guessing it can be fixed by removing the |
@Venryx So you are saying |
I'm no expert on the details of TypeScript's compilation process, but that's what it looks like to me, yes. Well more precisely, I think it adds that reference line because the |
Should resolve #74 and the ts-invariant side of apollographql/apollo-client#7734. Added a quick test:no-node script to fail if the word "node" (any capitalization) ever creeps into ts-invariant/lib/invariant.d.ts again.
Should resolve #74 and the ts-invariant side of apollographql/apollo-client#7734. Added a quick test:no-node script to fail if the word "node" (any capitalization) ever creeps into ts-invariant/lib/invariant.d.ts again.
Should fix #7734, thanks to apollographql/invariant-packages#81.
@jimisaacs @Venryx PR #7751 should fix the |
Should fix the `ts-invariant` part of issue #7734, thanks to apollographql/invariant-packages#81.
Fixed by #7751 - thanks! |
Please refer to this issue for context: microsoft/TypeScript#31148 (comment)
In summary, the older versions of the ts-invariant and subscriptions-transport-ws dependencies are exposing a reference to@types/node
, which leaks and pollutes typescript codebases. They seem to have fixed their packages though in their sources.After further search, the versions of the packages in question is not the issue, but the issue remains with them regarding the original typescript issue.
The text was updated successfully, but these errors were encountered: