diff options
author | isaacs <i@izs.me> | 2020-07-31 04:33:55 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-07-31 19:37:36 +0300 |
commit | 5473bbda76fd0fbb3d8321c19bc045c71c06a44c (patch) | |
tree | 96c2a0760017ea60b006410fea232dc77d34a6cd /node_modules/.gitignore | |
parent | bcc663807330c21dffe4b7cf7647d0dbcd48a022 (diff) |
Add 'npm exec', port npx to use it directly
This removes libnpx, and adds a new command, 'npm exec', which
implements the functionality. As of this change going live, we are
dropping support for the standalone top-level package 'npx'.
Not all of the functionality of the old version of npx is maintained.
The shell fallback functionality is dropped. It's insecure, and not
something we want to support or encourage. If anyone wants it, they
can hack up their .bashrc file themselves.
--no-install is not supported. If the package is not found locally, it
is installed in a predictable location in the cache, rather than
failing. This is something we might want to review, as automatically
installing in the case of misspellings may be a security footgun.
--ignore-existing is dropped. Existing packages are always given
priority.
--quiet or -q can be accomplished by using the --silent npm option, so
it's also dropped.
--npm option is dropped. npx will always use the npm that it ships
with.
--node-arg is dropped. There are other ways to set node options via
environment variables in the Node.js versions we support.
--always-spawn is dropped. npx will always spawn a child process to
execute commands.
The --shell option can be accomplished by using the --script-shell npm
option.
--version and --help are just passed through to npm.
As an added bonus, I noticed that the files in `bin/` were not getting
run. So now we have full coverage for npm-cli.js and npx-cli.js.
PR-URL: https://github.com/npm/cli/pull/1588
Credit: @isaacs
Close: #1588
Reviewed-by: @ruyadorno
Diffstat (limited to 'node_modules/.gitignore')
-rw-r--r-- | node_modules/.gitignore | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/.gitignore b/node_modules/.gitignore index e9473d84a..eeafd89fd 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -63,6 +63,7 @@ /docopt /doctrine /ee-first +/emoji-regex /encodeurl /end-of-stream /enquirer @@ -107,6 +108,7 @@ /fsevents /function-loop /functional-red-black-tree +/get-caller-file /glob-parent /globals /hasha @@ -186,6 +188,7 @@ /regexpp /release-zalgo /require-inject +/require-main-filename /resolve-from /run-parallel /shebang-command @@ -232,6 +235,7 @@ /word-wrap /wordwrap /write +/y18n /yaml /yapool /yargs-parser |