| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + #!/usr/bin/env sh | ||
| 2 | + if [ "x$npm_config_node_gyp" = "x" ]; then | ||
| 3 | + node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" | ||
| 4 | + else | ||
| 5 | + "$npm_config_node_gyp" "$@" | ||
| 6 | + fi | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,5 @@ | |||
| 1 | + if not defined npm_config_node_gyp ( | ||
| 2 | + node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* | ||
| 3 | + ) else ( | ||
| 4 | + node "%npm_config_node_gyp%" %* | ||
| 5 | + ) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,13 +83,13 @@ The `sig` is generated using the following template: `${package.name}@${package. | |||
| 83 | 83 | ||
| 84 | 84 | Keys response: | |
| 85 | 85 | ||
| 86 | - - `expires`: null or a simplified extended <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ` | ||
| 86 | + - `expires`: null or a simplified extended [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601"): `YYYY-MM-DDTHH:mm:ss.sssZ` | ||
| 87 | 87 | - `keydid`: sha256 fingerprint of the public key | |
| 88 | 88 | - `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI | |
| 89 | 89 | - `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI | |
| 90 | 90 | - `key`: base64 encoded public key | |
| 91 | 91 | ||
| 92 | - See this <a href="https://registry.npmjs.org/-/npm/v1/keys" target="_blank">example key's response from the public npm registry</a>. | ||
| 92 | + See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys"). | ||
| 93 | 93 | ||
| 94 | 94 | ### Audit Endpoints | |
| 95 | 95 | ||
| 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@10.2.0 /path/to/npm | ||
| 30 | + npm@10.2.3 /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,14 +14,29 @@ alias: rb | |||
| 14 | 14 | ||
| 15 | 15 | ### Description | |
| 16 | 16 | ||
| 17 | - This command runs the `npm build` command on the matched folders. This is | ||
| 18 | - useful when you install a new version of node, and must recompile all your | ||
| 19 | - C++ addons with the new binary. It is also useful when installing with | ||
| 20 | - `--ignore-scripts` and `--no-bin-links`, to explicitly choose which | ||
| 21 | - packages to build and/or link bins. | ||
| 22 | - | ||
| 23 | - If one or more package specs are provided, then only packages with a | ||
| 24 | - name and version matching one of the specifiers will be rebuilt. | ||
| 17 | + This command does the following: | ||
| 18 | + | ||
| 19 | + 1. Execute lifecycle scripts (`preinstall`, `install`, `postinstall`, `prepare`) | ||
| 20 | + 2. Links bins depending on whether bin links are enabled | ||
| 21 | + | ||
| 22 | + This command is particularly useful in scenarios including but not limited to: | ||
| 23 | + | ||
| 24 | + 1. Installing a new version of **node.js**, where you need to recompile all your C++ add-ons with the updated binary. | ||
| 25 | + 2. Installing with `--ignore-scripts` and `--no-bin-links`, to explicitly choose which packages to build and/or link bins. | ||
| 26 | + | ||
| 27 | + If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt. | ||
| 28 | + | ||
| 29 | + Usually, you should not need to run `npm rebuild` as it is already done for you as part of npm install (unless you suppressed these steps with `--ignore-scripts` or `--no-bin-links`). | ||
| 30 | + | ||
| 31 | + If there is a `binding.gyp` file in the root of your package, then npm will use a default install hook: | ||
| 32 | + | ||
| 33 | + ``` | ||
| 34 | + "scripts": { | ||
| 35 | + "install": "node-gyp rebuild" | ||
| 36 | + } | ||
| 37 | + ``` | ||
| 38 | + | ||
| 39 | + This default behavior is suppressed if the `package.json` has its own `install` or `preinstall` scripts. It is also suppressed if the package specifies `"gypfile": false` | ||
| 25 | 40 | ||
| 26 | 41 | ### Configuration | |
| 27 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ on your `authtype`. | |||
| 33 | 33 | ||
| 34 | 34 | * create / destroy: | |
| 35 | 35 | Create a new team, or destroy an existing one. Note: You cannot remove the | |
| 36 | - `developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a> | ||
| 36 | + `developers` team, [learn more.](https://docs.npmjs.com/about-developers-team) | ||
| 37 | 37 | ||
| 38 | 38 | Here's how to create a new team `newteam` under the `org` org: | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,9 +10,8 @@ description: Remove a package from the registry | |||
| 10 | 10 | npm unpublish [<package-spec>] | |
| 11 | 11 | ``` | |
| 12 | 12 | ||
| 13 | - To learn more about how the npm registry treats unpublish, see our <a | ||
| 14 | - href="https://docs.npmjs.com/policies/unpublish" target="_blank" | ||
| 15 | - rel="noopener noreferrer"> unpublish policies</a> | ||
| 13 | + To learn more about how the npm registry treats unpublish, see our | ||
| 14 | + [unpublish policies](https://docs.npmjs.com/policies/unpublish). | ||
| 16 | 15 | ||
| 17 | 16 | ### Warning | |
| 18 | 17 | ||
| 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 | - 10.2.0 | ||
| 17 | + 10.2.3 | ||
| 18 | 18 | ||
| 19 | 19 | ### Description | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,7 +114,7 @@ the npm registry. Lockfiles generated by npm v7 will contain | |||
| 114 | 114 | * `1`: The lockfile version used by npm v5 and v6. | |
| 115 | 115 | * `2`: The lockfile version used by npm v7 and v8. Backwards compatible to v1 | |
| 116 | 116 | lockfiles. | |
| 117 | - * `3`: The lockfile version used by npm v9. Backwards compatible to npm v7. | ||
| 117 | + * `3`: The lockfile version used by npm v9 and above. Backwards compatible to npm v7. | ||
| 118 | 118 | ||
| 119 | 119 | npm will always attempt to get whatever data it can out of a lockfile, even | |
| 120 | 120 | if it is not a version that it was designed to support. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,8 +159,6 @@ These are run from the scripts of `<pkg-name>` | |||
| 159 | 159 | * `publish` | |
| 160 | 160 | * `postpublish` | |
| 161 | 161 | ||
| 162 | - `prepare` will not run during `--dry-run` | ||
| 163 | - | ||
| 164 | 162 | #### [`npm rebuild`](/commands/npm-rebuild) | |
| 165 | 163 | ||
| 166 | 164 | * `preinstall` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments