| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Perhaps it makes sense to do the same with node?
Sorry, something went wrong.
I think doing the same with node poses extra inconveniences such as a requirement on compiling node before being able to run these scripts and therefore the risk of being blocked on running them if there's a problem trying to compile node locally. Keep using node from $PATH avoids this category of issues and might be the reason why the script was wrote like that at first 😊 (npm on the other hand doesn't require any compilation) |
Sorry, something went wrong.
Ah! I thought this change would already require that. But now that I think about it, I suppose as long as you're running a relatively recent node in your PATH, it should still work. |
Sorry, something went wrong.
There was a problem hiding this comment.
We could use an env variable so users can choose to use their global npm install:
./tools/update-babel-eslint.sh # uses out/Release/node deps/npm
NPM=npm ./tools/update-babel-eslint.sh # uses npm from pathI think this is a better UX.
EDIT: see my updated suggestion below.
Sorry, something went wrong.
|
@aduh95 I think using a globally installed npm defeats the whole point of this PR. |
Sorry, something went wrong.
My suggestion is to use the bundled npm by default, and let user decides if they want the script to use something else (useful only if they want to run the script without building node first). |
Sorry, something went wrong.
|
Yes, but from my understanding the point of this PR is to make sure the script is run with the same npm by everyone for the reasons listed in the description and in #37566 (comment), allowing the use of a custom npm seems a step back to me. |
Sorry, something went wrong.
|
There is no need to build node to run the script. |
Sorry, something went wrong.
Well, npm needs node to run, so you do need to have it built somewhere. |
Sorry, something went wrong.
|
Sorry, something went wrong.
There was a problem hiding this comment.
I've updated my suggestion based on @lpinca's comments:
./tools/update-babel-eslint.sh # uses node from `out/Release/node` or PATH if not found.
NODE=/path/to/specific/node ./tools/update-babel-eslint.sh # uses specific nodeNon-blocking, feel free to disregard if you prefer the current implementation.
Sorry, something went wrong.
Sorry, something went wrong.
The scripts `./tools/update-babel-eslint.sh` and `./tools/update-eslint.sh` are relying on the version of `npm` found in the local-defined `$PATH` env. This changeset proposes to modify these scripts to run the version of npm bundled in the current branch (found at `./deps/npm`) - in order to: a) Standardize the version of npm that should be use to install these deps, avoids the pitfall of having an inadverted user run these scripts with an unsupported/incompatible npm version. b) Given that npm7 has a different install algorithm than npm6 that takes into account and install peer dependencies, it might be a safer choice to ensure what version of npm should be use during this transitional period in which users might still have npm6 by default in their local system. c) Avoids the possible extra churn of having different resulting files being shuffled around between installs due to usage of a disparate version of the npm cli.
Sorry, something went wrong.
|
@ruyadorno FYI this kind of PR does not require a full CI run, green GitHub Actions is sufficient. node/doc/guides/collaborator-guide.md Lines 214 to 216 in e6cbec5 |
Sorry, something went wrong.
|
phew 😅 @aduh95 thanks for letting me know! CI has been extremely flaky recently 😞 With that in mind, I'm going to add author ready as soon as there's a green GH action run. |
Sorry, something went wrong.
|
Well, actually, as long as the CI has started a PR can be labeled author ready: you don't even have to wait 😅 node/doc/guides/collaborator-guide.md Lines 71 to 78 in e6cbec5 |
Sorry, something went wrong.
Sorry, something went wrong.
The scripts `./tools/update-babel-eslint.sh` and `./tools/update-eslint.sh` are relying on the version of `npm` found in the local-defined `$PATH` env. This changeset proposes to modify these scripts to run the version of npm bundled in the current branch (found at `./deps/npm`) - in order to: a) Standardize the version of npm that should be use to install these deps, avoids the pitfall of having an inadverted user run these scripts with an unsupported/incompatible npm version. b) Given that npm7 has a different install algorithm than npm6 that takes into account and install peer dependencies, it might be a safer choice to ensure what version of npm should be use during this transitional period in which users might still have npm6 by default in their local system. c) Avoids the possible extra churn of having different resulting files being shuffled around between installs due to usage of a disparate version of the npm cli. PR-URL: #37613 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The scripts `./tools/update-babel-eslint.sh` and `./tools/update-eslint.sh` are relying on the version of `npm` found in the local-defined `$PATH` env. This changeset proposes to modify these scripts to run the version of npm bundled in the current branch (found at `./deps/npm`) - in order to: a) Standardize the version of npm that should be use to install these deps, avoids the pitfall of having an inadverted user run these scripts with an unsupported/incompatible npm version. b) Given that npm7 has a different install algorithm than npm6 that takes into account and install peer dependencies, it might be a safer choice to ensure what version of npm should be use during this transitional period in which users might still have npm6 by default in their local system. c) Avoids the possible extra churn of having different resulting files being shuffled around between installs due to usage of a disparate version of the npm cli. PR-URL: #37613 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The scripts `./tools/update-babel-eslint.sh` and `./tools/update-eslint.sh` are relying on the version of `npm` found in the local-defined `$PATH` env. This changeset proposes to modify these scripts to run the version of npm bundled in the current branch (found at `./deps/npm`) - in order to: a) Standardize the version of npm that should be use to install these deps, avoids the pitfall of having an inadverted user run these scripts with an unsupported/incompatible npm version. b) Given that npm7 has a different install algorithm than npm6 that takes into account and install peer dependencies, it might be a safer choice to ensure what version of npm should be use during this transitional period in which users might still have npm6 by default in their local system. c) Avoids the possible extra churn of having different resulting files being shuffled around between installs due to usage of a disparate version of the npm cli. PR-URL: #37613 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
The scripts ./tools/update-babel-eslint.sh and
./tools/update-eslint.sh are relying on the version of npm found in
the local-defined $PATH env.
This changeset proposes to modify these scripts to run the version of
npm bundled in the current branch (found at ./deps/npm) - in order to:
deps, avoids the pitfall of having an inadverted user run these
scripts with an unsupported/incompatible npm version.
takes into account and install peer dependencies, it might be a safer
choice to ensure what version of npm should be use during this
transitional period in which users might still have npm6 by default in
their local system.
being shuffled around between installs due to usage of a disparate
version of the npm cli.
cc @lpinca @Trott @richardlau