| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages. | |||
| 23 | 23 | For example, running `npm ls promzard` in npm's source tree will show: | |
| 24 | 24 | ||
| 25 | 25 | ```bash | |
| 26 | - npm@11.11.0 /path/to/npm | ||
| 26 | + npm@11.11.1 /path/to/npm | ||
| 27 | 27 | └─┬ init-package-json@0.0.4 | |
| 28 | 28 | └── promzard@0.1.5 | |
| 29 | 29 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ description: Manage trusted publishing relationships between packages and CI/CD | |||
| 7 | 7 | ### Synopsis | |
| 8 | 8 | ||
| 9 | 9 | ```bash | |
| 10 | - npm trust | ||
| 10 | + | ||
| 11 | 11 | ``` | |
| 12 | 12 | ||
| 13 | 13 | Note: This command is unaware of workspaces. | |
| 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 | - 11.11.0 | ||
| 17 | + 11.11.1 | ||
| 18 | 18 | ||
| 19 | 19 | ### Description | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -241,10 +241,6 @@ For more details, see: | |||
| 241 | 241 | - [npm v7 release notes](https://github.com/npm/cli/releases/tag/v7.0.0) | |
| 242 | 242 | - [Discussion about script working directory reliability in npm v6 and earlier](https://github.com/npm/npm/issues/12356) | |
| 243 | 243 | ||
| 244 | - ### User | ||
| 245 | - | ||
| 246 | - When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner. | ||
| 247 | - | ||
| 248 | 244 | ### Environment | |
| 249 | 245 | ||
| 250 | 246 | Package scripts run in an environment where many pieces of information are made available regarding the setup of npm and the current state of the process. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,24 +88,25 @@ npm install abbrev -w a | |||
| 88 | 88 | ||
| 89 | 89 | **Adding a workspace as a dependency of another workspace:** | |
| 90 | 90 | ||
| 91 | - If you want to add workspace **b** as a dependency of workspace **a**, you can use the workspace protocol in the dependency specifier: | ||
| 91 | + The same approach works when adding one workspace as a dependency of another. | ||
| 92 | + If you want to add workspace **b** as a dependency of workspace **a**, run: | ||
| 92 | 93 | ||
| 93 | 94 | ``` | |
| 94 | - npm install b@workspace:* -w a | ||
| 95 | + npm install b -w a | ||
| 95 | 96 | ``` | |
| 96 | 97 | ||
| 97 | - This will add an entry to workspace **a**'s `package.json` like: | ||
| 98 | + npm will detect that **b** is a workspace and automatically symlink it rather | ||
| 99 | + than fetching it from the registry. The resulting entry in workspace **a**'s | ||
| 100 | + `package.json` will use a standard version range: | ||
| 98 | 101 | ||
| 99 | 102 | ```json | |
| 100 | 103 | { | |
| 101 | 104 | "dependencies": { | |
| 102 | - "b": "workspace:*" | ||
| 105 | + "b": "^1.0.0" | ||
| 103 | 106 | } | |
| 104 | 107 | } | |
| 105 | 108 | ``` | |
| 106 | 109 | ||
| 107 | - The `workspace:` protocol tells npm to link to the local workspace rather than fetching from the registry. The `*` version means it will use whatever version is defined in workspace **b**'s `package.json`. | ||
| 108 | - | ||
| 109 | 110 | Note: other installing commands such as `uninstall`, `ci`, etc will also respect the provided `workspace` configuration. | |
| 110 | 111 | ||
| 111 | 112 | ### Using workspaces | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ const getCommandByDoc = (docFile, docExt, commandLoader = defaultCommandLoader) | |||
| 94 | 94 | name, | |
| 95 | 95 | workspaces, | |
| 96 | 96 | definitions: name === 'npx' ? {} : resolvedDefs, | |
| 97 | - usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), | ||
| 97 | + usage: usage?.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), | ||
| 98 | 98 | } | |
| 99 | 99 | } | |
| 100 | 100 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,9 +186,9 @@ | |||
| 186 | 186 | ||
| 187 | 187 | <section id="content"> | |
| 188 | 188 | <header class="title"> | |
| 189 | - <h1 id="----npm-access----11110"> | ||
| 189 | + <h1 id="----npm-access----11111"> | ||
| 190 | 190 | <span>npm-access</span> | |
| 191 | - <span class="version">@11.11.0</span> | ||
| 191 | + <span class="version">@11.11.1</span> | ||
| 192 | 192 | </h1> | |
| 193 | 193 | <span class="description">Set access level on published packages</span> | |
| 194 | 194 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,9 +186,9 @@ | |||
| 186 | 186 | ||
| 187 | 187 | <section id="content"> | |
| 188 | 188 | <header class="title"> | |
| 189 | - <h1 id="----npm-adduser----11110"> | ||
| 189 | + <h1 id="----npm-adduser----11111"> | ||
| 190 | 190 | <span>npm-adduser</span> | |
| 191 | - <span class="version">@11.11.0</span> | ||
| 191 | + <span class="version">@11.11.1</span> | ||
| 192 | 192 | </h1> | |
| 193 | 193 | <span class="description">Add a registry user account</span> | |
| 194 | 194 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,9 +186,9 @@ | |||
| 186 | 186 | ||
| 187 | 187 | <section id="content"> | |
| 188 | 188 | <header class="title"> | |
| 189 | - <h1 id="----npm-audit----11110"> | ||
| 189 | + <h1 id="----npm-audit----11111"> | ||
| 190 | 190 | <span>npm-audit</span> | |
| 191 | - <span class="version">@11.11.0</span> | ||
| 191 | + <span class="version">@11.11.1</span> | ||
| 192 | 192 | </h1> | |
| 193 | 193 | <span class="description">Run a security audit</span> | |
| 194 | 194 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,9 +186,9 @@ | |||
| 186 | 186 | ||
| 187 | 187 | <section id="content"> | |
| 188 | 188 | <header class="title"> | |
| 189 | - <h1 id="----npm-bugs----11110"> | ||
| 189 | + <h1 id="----npm-bugs----11111"> | ||
| 190 | 190 | <span>npm-bugs</span> | |
| 191 | - <span class="version">@11.11.0</span> | ||
| 191 | + <span class="version">@11.11.1</span> | ||
| 192 | 192 | </h1> | |
| 193 | 193 | <span class="description">Report bugs for a package in a web browser</span> | |
| 194 | 194 | </header> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments