Open huan opened 3 years ago
This is a case if you use NPM only, but not Yarn or pnpm.
Yes, this behaviour can be different via implementations because module A and B both want to put a binary with the same name, and the NPM can not know which one should be preferred.
The way I see it, we should remove the tsc
(and other binaries) from our tsc
fork (@tsd/typescript
).
I'm 👍 on this as it apparently has indirectly broken xo
on npm 6 for all repos depending on both tsd
and xo
(which at least @sindresorhus does quite a bit I think + even this repo uses xo
, though the raweslint-config-xo
packages instead): https://github.com/xojs/xo/issues/555#issuecomment-935062115
I removed the bin
from @tsd/typescript
but didn't re-release any patches yet. I'm open to feedback if I should manually release a patch for every major TS version from the past, or if it's ok if this is only the case for newer versions?
I'm looking forward to the change for future versions, don't care about the past versions.
I ran into https://github.com/huan/sidecar/issues/18 today and found that the
@tsd/typescript
has a{ bin: { tsc: 'typescript/bin/tsc' }}
and it overwrites the TypeScript version from mypackage.json
:https://github.com/SamVerschueren/tsd-typescript/blob/10f4da67ee72ce4005141bc2bef1830d3ae14512/package.json#L14-L16
I'd like to suggest that we should remove the
bin
entry in the package.json so that it will not overwrite the system version.