| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,8 @@ | |||
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | + | ||
| 3 | + # This is used by the Node.js installer, which expects the cygwin/mingw | ||
| 4 | + # shell script to already be present in the npm dependency folder. | ||
| 5 | + | ||
| 2 | 6 | (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix | |
| 3 | 7 | ||
| 4 | 8 | basedir=`dirname "$0"` | |
@@ -19,7 +23,6 @@ fi | |||
| 19 | 23 | # kind of paths Node.js thinks it's using, typically win32 paths. | |
| 20 | 24 | CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" | |
| 21 | 25 | NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" | |
| 22 | - | ||
| 23 | 26 | NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` | |
| 24 | 27 | if [ $? -ne 0 ]; then | |
| 25 | 28 | # if this didn't work, then everything else below will fail | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,17 +19,17 @@ if ! [ -x "$NODE_EXE" ]; then | |||
| 19 | 19 | NODE_EXE=node | |
| 20 | 20 | fi | |
| 21 | 21 | ||
| 22 | - # these paths are passed to node.exe, so they need to match whatever | ||
| 22 | + # this path is passed to node.exe, so it needs to match whatever | ||
| 23 | 23 | # kind of paths Node.js thinks it's using, typically win32 paths. | |
| 24 | 24 | CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" | |
| 25 | + NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" | ||
| 26 | + NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" | ||
| 27 | + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` | ||
| 25 | 28 | if [ $? -ne 0 ]; then | |
| 26 | 29 | # if this didn't work, then everything else below will fail | |
| 27 | 30 | echo "Could not determine Node.js install directory" >&2 | |
| 28 | 31 | exit 1 | |
| 29 | 32 | fi | |
| 30 | - NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" | ||
| 31 | - NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" | ||
| 32 | - NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` | ||
| 33 | 33 | NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" | |
| 34 | 34 | ||
| 35 | 35 | # a path that will fail -f test on any posix bash | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ const removed = new Set([ | |||
| 24 | 24 | ...removedOpts, | |
| 25 | 25 | ]) | |
| 26 | 26 | ||
| 27 | - const { definitions, shorthands } = require('../lib/utils/config/index.js') | ||
| 27 | + const { definitions, shorthands } = require('@npmcli/config/lib/definitions') | ||
| 28 | 28 | const npmSwitches = Object.entries(definitions) | |
| 29 | 29 | .filter(([key, { type }]) => type === Boolean || | |
| 30 | 30 | (Array.isArray(type) && type.includes(Boolean))) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,6 +160,22 @@ will also prevent _writing_ `package-lock.json` if `save` is true. | |||
| 160 | 160 | ||
| 161 | 161 | ||
| 162 | 162 | ||
| 163 | + #### `package-lock-only` | ||
| 164 | + | ||
| 165 | + * Default: false | ||
| 166 | + * Type: Boolean | ||
| 167 | + | ||
| 168 | + If set to true, the current operation will only use the `package-lock.json`, | ||
| 169 | + ignoring `node_modules`. | ||
| 170 | + | ||
| 171 | + For `update` this means only the `package-lock.json` will be updated, | ||
| 172 | + instead of checking `node_modules` and downloading dependencies. | ||
| 173 | + | ||
| 174 | + For `list` this means the output will be based on the tree described by the | ||
| 175 | + `package-lock.json`, rather than the contents of `node_modules`. | ||
| 176 | + | ||
| 177 | + | ||
| 178 | + | ||
| 163 | 179 | #### `foreground-scripts` | |
| 164 | 180 | ||
| 165 | 181 | * Default: false | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -550,6 +550,22 @@ will also prevent _writing_ `package-lock.json` if `save` is true. | |||
| 550 | 550 | ||
| 551 | 551 | ||
| 552 | 552 | ||
| 553 | + #### `package-lock-only` | ||
| 554 | + | ||
| 555 | + * Default: false | ||
| 556 | + * Type: Boolean | ||
| 557 | + | ||
| 558 | + If set to true, the current operation will only use the `package-lock.json`, | ||
| 559 | + ignoring `node_modules`. | ||
| 560 | + | ||
| 561 | + For `update` this means only the `package-lock.json` will be updated, | ||
| 562 | + instead of checking `node_modules` and downloading dependencies. | ||
| 563 | + | ||
| 564 | + For `list` this means the output will be based on the tree described by the | ||
| 565 | + `package-lock.json`, rather than the contents of `node_modules`. | ||
| 566 | + | ||
| 567 | + | ||
| 568 | + | ||
| 553 | 569 | #### `foreground-scripts` | |
| 554 | 570 | ||
| 555 | 571 | * Default: false | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For | |||
| 27 | 27 | example, running `npm ls promzard` in npm's source tree will show: | |
| 28 | 28 | ||
| 29 | 29 | ```bash | |
| 30 | - npm@9.7.1 /path/to/npm | ||
| 30 | + npm@9.7.2 /path/to/npm | ||
| 31 | 31 | └─┬ init-package-json@0.0.4 | |
| 32 | 32 | └── promzard@0.1.5 | |
| 33 | 33 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. | |||
| 14 | 14 | ||
| 15 | 15 | ### Version | |
| 16 | 16 | ||
| 17 | - 9.7.1 | ||
| 17 | + 9.7.2 | ||
| 18 | 18 | ||
| 19 | 19 | ### Description | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -279,9 +279,6 @@ it will. The `.npmignore` file works just like a `.gitignore`. If there is | |||
| 279 | 279 | a `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents | |
| 280 | 280 | will be used instead. | |
| 281 | 281 | ||
| 282 | - Files included with the "package.json#files" field _cannot_ be excluded | ||
| 283 | - through `.npmignore` or `.gitignore`. | ||
| 284 | - | ||
| 285 | 282 | Certain files are always included, regardless of settings: | |
| 286 | 283 | ||
| 287 | 284 | * `package.json` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments