1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-30 02:59:11 -05:00
denoland-deno/tests/registry/npm/@denotest/bin/1.0.0
Nathan Whitaker 13c53d9727
fix(installl): make bin entries executable even if not put in node_modules/.bin (#25873)
Fixes https://github.com/denoland/deno/issues/25862.

npm only makes bin entries executable if they get linked into `.bin`, as
we did before this PR. So this PR actually deviates from npm, because
it's the only reasonable way to fix this that I can think of.

---

The reason this was broken in moment is the following:

Moment has dependencies on two typescript versions: 1.8 and 3.1

If you have two packages with conflicting bin entries (i.e. two
typescript versions which both have a bin entry `tsc`), in npm it is
non-deterministic and undefined which one will end up in `.bin`.

npm, due to implementation differences, chooses to put typescript 1.8
into the `.bin` directory, and so `node_modules/typescript/bin/tsc` ends
up getting marked executable. We, however, choose typescript 3.2, and so
we end up making `node_modules/typescript3/bin/tsc` executable.

As part of its tests, moment executes `node_modules/typescript/bin/tsc`.
Because we didn't make it executable, this fails.

Since the conflict resolution is undefined in npm, instead of trying to
match it, I think it makes more sense to just make bin entries
executable even if they aren't chosen in the case of a conflict.
2024-09-26 09:36:25 -07:00
..
cli-cjs.js fix(installl): make bin entries executable even if not put in node_modules/.bin (#25873) 2024-09-26 09:36:25 -07:00
cli-no-ext chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00
cli.mjs fix(npm): set up node_modules/.bin/ entries for package that provide bin entrypoints (#23496) 2024-05-23 23:43:38 +00:00
package.json chore(test): move npm registries to separate servers and to the tests/registry folder (#23717) 2024-05-07 01:06:01 +00:00