Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages.
For example, running `npm ls promzard` in npm's source tree will show:

```bash
npm@11.11.0 /path/to/npm
npm@11.11.1 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
```
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-trust.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Manage trusted publishing relationships between packages and CI/CD
### Synopsis

```bash
npm trust

```

Note: This command is unaware of workspaces.
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.

### Version

11.11.0
11.11.1

### Description

Expand Down
4 changes: 0 additions & 4 deletions deps/npm/docs/content/using-npm/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ For more details, see:
- [npm v7 release notes](https://github.com/npm/cli/releases/tag/v7.0.0)
- [Discussion about script working directory reliability in npm v6 and earlier](https://github.com/npm/npm/issues/12356)

### User

When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner.

### Environment

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.
Expand Down
13 changes: 7 additions & 6 deletions deps/npm/docs/content/using-npm/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,25 @@ npm install abbrev -w a

**Adding a workspace as a dependency of another workspace:**

If you want to add workspace **b** as a dependency of workspace **a**, you can use the workspace protocol in the dependency specifier:
The same approach works when adding one workspace as a dependency of another.
If you want to add workspace **b** as a dependency of workspace **a**, run:

```
npm install b@workspace:* -w a
npm install b -w a
```

This will add an entry to workspace **a**'s `package.json` like:
npm will detect that **b** is a workspace and automatically symlink it rather
than fetching it from the registry. The resulting entry in workspace **a**'s
`package.json` will use a standard version range:

```json
{
"dependencies": {
"b": "workspace:*"
"b": "^1.0.0"
}
}
```

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`.

Note: other installing commands such as `uninstall`, `ci`, etc will also respect the provided `workspace` configuration.

### Using workspaces
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const getCommandByDoc = (docFile, docExt, commandLoader = defaultCommandLoader)
name,
workspaces,
definitions: name === 'npx' ? {} : resolvedDefs,
usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'),
usage: usage?.map(u => `${usagePrefix} ${u}`.trim()).join('\n'),
}
}

Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-access.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-access----11110">
<h1 id="----npm-access----11111">
<span>npm-access</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Set access level on published packages</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-adduser.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-adduser----11110">
<h1 id="----npm-adduser----11111">
<span>npm-adduser</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Add a registry user account</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-audit----11110">
<h1 id="----npm-audit----11111">
<span>npm-audit</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Run a security audit</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-bugs----11110">
<h1 id="----npm-bugs----11111">
<span>npm-bugs</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Report bugs for a package in a web browser</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-cache----11110">
<h1 id="----npm-cache----11111">
<span>npm-cache</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Manipulates packages cache</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-ci.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-ci----11110">
<h1 id="----npm-ci----11111">
<span>npm-ci</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Clean install a project</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-completion.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-completion----11110">
<h1 id="----npm-completion----11111">
<span>npm-completion</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Tab Completion for npm</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-config----11110">
<h1 id="----npm-config----11111">
<span>npm-config</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Manage the npm configuration files</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-dedupe.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-dedupe----11110">
<h1 id="----npm-dedupe----11111">
<span>npm-dedupe</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Reduce duplication in the package tree</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-deprecate.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-deprecate----11110">
<h1 id="----npm-deprecate----11111">
<span>npm-deprecate</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Deprecate a version of a package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-diff----11110">
<h1 id="----npm-diff----11111">
<span>npm-diff</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">The registry diff command</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-dist-tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-dist-tag----11110">
<h1 id="----npm-dist-tag----11111">
<span>npm-dist-tag</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Modify package distribution tags</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-docs----11110">
<h1 id="----npm-docs----11111">
<span>npm-docs</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Open documentation for a package in a web browser</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-doctor.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-doctor----11110">
<h1 id="----npm-doctor----11111">
<span>npm-doctor</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Check the health of your npm environment</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-edit----11110">
<h1 id="----npm-edit----11111">
<span>npm-edit</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Edit an installed package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-exec.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-exec----11110">
<h1 id="----npm-exec----11111">
<span>npm-exec</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Run a command from a local or remote npm package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-explain.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-explain----11110">
<h1 id="----npm-explain----11111">
<span>npm-explain</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Explain installed packages</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-explore----11110">
<h1 id="----npm-explore----11111">
<span>npm-explore</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Browse an installed package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-find-dupes.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-find-dupes----11110">
<h1 id="----npm-find-dupes----11111">
<span>npm-find-dupes</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Find duplication in the package tree</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-fund.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-fund----11110">
<h1 id="----npm-fund----11111">
<span>npm-fund</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Retrieve funding information</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-get.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-get----11110">
<h1 id="----npm-get----11111">
<span>npm-get</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Get a value from the npm configuration</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-help-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-help-search----11110">
<h1 id="----npm-help-search----11111">
<span>npm-help-search</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Search npm help documentation</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-help----11110">
<h1 id="----npm-help----11111">
<span>npm-help</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Get help on npm</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-init.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-init----11110">
<h1 id="----npm-init----11111">
<span>npm-init</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Create a package.json file</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-install-ci-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-install-ci-test----11110">
<h1 id="----npm-install-ci-test----11111">
<span>npm-install-ci-test</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Install a project with a clean slate and run tests</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-install-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-install-test----11110">
<h1 id="----npm-install-test----11111">
<span>npm-install-test</span>
<span class="version">@11.11.0</span>
<span class="version">@11.11.1</span>
</h1>
<span class="description">Install package(s) and run tests</span>
</header>
Expand Down
Loading
Loading