Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade npm to 7.10.0 #38254

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 33 additions & 0 deletions deps/npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
## v7.10.0 (2021-04-15)

### FEATURES

* [`f9b639eb6`](https://github.com/npm/cli/commit/f9b639eb6c504ded6cdd59e83e26a392bfe81e5d)
[#3052](https://github.com/npm/cli/issues/3052)
feat(bugs): fall back to email if provided
([@Yash-Singh1](https://github.com/Yash-Singh1))
* [`8c9e24778`](https://github.com/npm/cli/commit/8c9e24778db867cb3148bc247c7e321639aa9f58)
[#3055](https://github.com/npm/cli/issues/3055)
feat(version): add workspace support
([@wraithgar](https://github.com/wraithgar))

### DEPENDENCIES

* [`f1e6743a6`](https://github.com/npm/cli/commit/f1e6743a6e8e32ddad6d1964eb05d17e6c50a456)
`[email protected]`
* feat(retrieve-tag): retrieve unannotated git tags
* fix(retrieve-tag): use semver to look for semver
* [`3b476a24c`](https://github.com/npm/cli/commit/3b476a24cf0b2823fdf92505b84bddde4fcc8b14)
`@npmcl/[email protected]`
* fix(git): do not use shell when calling git
* [`dfcd0c1e2`](https://github.com/npm/cli/commit/dfcd0c1e2331c1f4b6573466b50505772eddaf22)
[#3069](https://github.com/npm/cli/issues/3069)
`[email protected]`

### DOCUMENTATION

* [`90b61eda9`](https://github.com/npm/cli/commit/90b61eda9b41af108ed69fc0c43a522a92745047)
[#3053](https://github.com/npm/cli/issues/3053)
fix(contributing.md): explicitely outline dep updates
([@darcyclarke](https://github.com/darcyclarke))

## v7.9.0 (2021-04-08)

### FEATURES
Expand Down
4 changes: 4 additions & 0 deletions deps/npm/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ We've set up an automated [benchmark](https://github.com/npm/benchmarks) integra

You can learn more about this tool, including how to run & configure it manually, [here](https://github.com/npm/benchmarks)

## Dependency Updates

It should be noted that our team does not accept third-party dependency updates/PRs. We have a [release process](https://github.com/npm/cli/wiki/Release-Process) that includes checks to ensure dependencies are staying up-to-date & will ship security patches for CVEs as they occur. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines.

## Reporting Bugs

When submitting a new bug report, please first [search](https://github.com/npm/cli/issues) for an existing or similar report & then use one of our existing [issue templates](https://github.com/npm/cli/issues/new/choose) if you believe you've come across a unique problem. Duplicate issues, or issues that don't use one of our templates may get closed without a response.
6 changes: 3 additions & 3 deletions deps/npm/docs/content/commands/npm-bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ aliases: issues
### Description

This command tries to guess at the likely location of a package's bug
tracker URL, and then tries to open it using the `--browser` config param.
If no package name is provided, it will search for a `package.json` in the
current folder and use the `name` property.
tracker URL or the `mailto` URL of the support email, and then tries to
open it using the `--browser` config param. If no package name is provided, it
will search for a `package.json` in the current folder and use the `name` property.

### Configuration

Expand Down
83 changes: 50 additions & 33 deletions deps/npm/docs/content/commands/npm-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,56 @@ npm version [<newversion> | major | minor | patch | premajor | preminor | prepat
'npm ls' to inspect current package/dependency versions
```

### Configuration

#### `allow-same-version`

* Default: `false`
* Type: Boolean

Prevents throwing an error when `npm version` is used to set the new version
to the same value as the current version.

#### `git-tag-version`

* Default: `true`
* Type: Boolean

Commit and tag the version change.

#### `commit-hooks`

* Default: `true`
* Type: Boolean

Run git commit hooks when committing the version change.

#### `sign-git-tag`

* Default: `false`
* Type: Boolean

Pass the `-s` flag to git to sign the tag.

Note that you must have a default GPG key set up in your git config for this to work properly.

#### workspaces

* Default: `false`
* Type: Boolean

Enables workspaces context and includes workspaces in reported output
when getting versions. When setting a new version *only the workspaces
will be changed*.

#### workspace

* Default: []
* Type: Array

Enables workspaces context and limits results to only those specified by
this config item.

### Description

Run this in a package directory to bump the version and write the new
Expand Down Expand Up @@ -87,39 +137,6 @@ This runs all your tests and proceeds only if they pass. Then runs your `build`
adds everything in the `dist` directory to the commit. After the commit, it pushes the new commit
and tag up to the server, and deletes the `build/temp` directory.

### Configuration

#### `allow-same-version`

* Default: `false`
* Type: Boolean

Prevents throwing an error when `npm version` is used to set the new version
to the same value as the current version.

#### `git-tag-version`

* Default: `true`
* Type: Boolean

Commit and tag the version change.

#### `commit-hooks`

* Default: `true`
* Type: Boolean

Run git commit hooks when committing the version change.

#### `sign-git-tag`

* Default: `false`
* Type: Boolean

Pass the `-s` flag to git to sign the tag.

Note that you must have a default GPG key set up in your git config for this to work properly.

### See Also

* [npm init](/commands/npm-init)
Expand Down
6 changes: 3 additions & 3 deletions deps/npm/docs/output/commands/npm-bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ <h2 id="table-of-contents">Table of contents</h2>
</code></pre>
<h3 id="description">Description</h3>
<p>This command tries to guess at the likely location of a package’s bug
tracker URL, and then tries to open it using the <code>--browser</code> config param.
If no package name is provided, it will search for a <code>package.json</code> in the
current folder and use the <code>name</code> property.</p>
tracker URL or the <code>mailto</code> URL of the support email, and then tries to
open it using the <code>--browser</code> config param. If no package name is provided, it
will search for a <code>package.json</code> in the current folder and use the <code>name</code> property.</p>
<h3 id="configuration">Configuration</h3>
<h4 id="browser">browser</h4>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm-ls.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
the results to only the paths to the packages named. Note that nested
packages will <em>also</em> show the paths to the specified packages. For
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
<pre lang="bash"><code>npm@7.9.0 /path/to/npm
<pre lang="bash"><code>npm@7.10.0 /path/to/npm
└─┬ [email protected]
└── [email protected]
</code></pre>
Expand Down
71 changes: 43 additions & 28 deletions deps/npm/docs/output/commands/npm-version.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h1 id="npm-version">npm-version</h1>

<section id="table_of_contents">
<h2 id="table-of-contents">Table of contents</h2>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#description">Description</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#sign-git-tag"><code>sign-git-tag</code></a></li></ul><li><a href="#see-also">See Also</a></li></ul></div>
<div id="_table_of_contents"><ul><li><a href="#synopsis">Synopsis</a></li><li><a href="#configuration">Configuration</a></li><ul><li><a href="#allow-same-version"><code>allow-same-version</code></a></li><li><a href="#git-tag-version"><code>git-tag-version</code></a></li><li><a href="#commit-hooks"><code>commit-hooks</code></a></li><li><a href="#sign-git-tag"><code>sign-git-tag</code></a></li><li><a href="#workspaces">workspaces</a></li><li><a href="#workspace">workspace</a></li></ul><li><a href="#description">Description</a></li><li><a href="#see-also">See Also</a></li></ul></div>
</section>

<div id="_content"><h3 id="synopsis">Synopsis</h3>
Expand All @@ -151,6 +151,48 @@ <h2 id="table-of-contents">Table of contents</h2>
'npm view &lt;pkg&gt; version' to view a package's published version
'npm ls' to inspect current package/dependency versions
</code></pre>
<h3 id="configuration">Configuration</h3>
<h4 id="allow-same-version"><code>allow-same-version</code></h4>
<ul>
<li>Default: <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Prevents throwing an error when <code>npm version</code> is used to set the new version
to the same value as the current version.</p>
<h4 id="git-tag-version"><code>git-tag-version</code></h4>
<ul>
<li>Default: <code>true</code></li>
<li>Type: Boolean</li>
</ul>
<p>Commit and tag the version change.</p>
<h4 id="commit-hooks"><code>commit-hooks</code></h4>
<ul>
<li>Default: <code>true</code></li>
<li>Type: Boolean</li>
</ul>
<p>Run git commit hooks when committing the version change.</p>
<h4 id="sign-git-tag"><code>sign-git-tag</code></h4>
<ul>
<li>Default: <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Pass the <code>-s</code> flag to git to sign the tag.</p>
<p>Note that you must have a default GPG key set up in your git config for this to work properly.</p>
<h4 id="workspaces">workspaces</h4>
<ul>
<li>Default: <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Enables workspaces context and includes workspaces in reported output
when getting versions. When setting a new version <em>only the workspaces
will be changed</em>.</p>
<h4 id="workspace">workspace</h4>
<ul>
<li>Default: []</li>
<li>Type: Array</li>
</ul>
<p>Enables workspaces context and limits results to only those specified by
this config item.</p>
<h3 id="description">Description</h3>
<p>Run this in a package directory to bump the version and write the new
data back to <code>package.json</code>, <code>package-lock.json</code>, and, if present, <code>npm-shrinkwrap.json</code>.</p>
Expand Down Expand Up @@ -210,33 +252,6 @@ <h3 id="description">Description</h3>
<p>This runs all your tests and proceeds only if they pass. Then runs your <code>build</code> script, and
adds everything in the <code>dist</code> directory to the commit. After the commit, it pushes the new commit
and tag up to the server, and deletes the <code>build/temp</code> directory.</p>
<h3 id="configuration">Configuration</h3>
<h4 id="allow-same-version"><code>allow-same-version</code></h4>
<ul>
<li>Default: <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Prevents throwing an error when <code>npm version</code> is used to set the new version
to the same value as the current version.</p>
<h4 id="git-tag-version"><code>git-tag-version</code></h4>
<ul>
<li>Default: <code>true</code></li>
<li>Type: Boolean</li>
</ul>
<p>Commit and tag the version change.</p>
<h4 id="commit-hooks"><code>commit-hooks</code></h4>
<ul>
<li>Default: <code>true</code></li>
<li>Type: Boolean</li>
</ul>
<p>Run git commit hooks when committing the version change.</p>
<h4 id="sign-git-tag"><code>sign-git-tag</code></h4>
<ul>
<li>Default: <code>false</code></li>
<li>Type: Boolean</li>
</ul>
<p>Pass the <code>-s</code> flag to git to sign the tag.</p>
<p>Note that you must have a default GPG key set up in your git config for this to work properly.</p>
<h3 id="see-also">See Also</h3>
<ul>
<li><a href="../commands/npm-init.html">npm init</a></li>
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/output/commands/npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
<pre lang="bash"><code>npm &lt;command&gt; [args]
</code></pre>
<h3 id="version">Version</h3>
<p>7.9.0</p>
<p>7.10.0</p>
<h3 id="description">Description</h3>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
Expand Down
20 changes: 18 additions & 2 deletions deps/npm/lib/base-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const ConfigDefinitions = require('./utils/config/definitions.js')

class BaseCommand {
constructor (npm) {
this.wrapWidth = 80
this.npm = npm
}

Expand All @@ -27,15 +28,30 @@ class BaseCommand {
usage = `${usage}${this.constructor.usage.map(u => `npm ${this.constructor.name} ${u}`).join('\n')}`

if (this.constructor.params)
// TODO word wrap this along params boundaries
usage = `${usage}\n\nOptions:\n[${this.constructor.params.map(p => ConfigDefinitions[p].usage).join('] [')}]`
usage = `${usage}\n\nOptions:\n${this.wrappedParams}`

// Mostly this just appends aliases, this could be more clear
usage = usageUtil(this.constructor.name, usage)
usage = `${usage}\n\nRun "npm help ${this.constructor.name}" for more info`
return usage
}

get wrappedParams () {
let results = ''
let line = ''

for (const param of this.constructor.params) {
const usage = `[${ConfigDefinitions[param].usage}]`
if (line.length && (line.length + usage.length) > this.wrapWidth) {
results = [results, line].filter(Boolean).join('\n')
line = ''
}
line = [line, usage].filter(Boolean).join(' ')
}
results = [results, line].filter(Boolean).join('\n')
return results
}

usageError (msg) {
if (!msg) {
return Object.assign(new Error(`\nUsage: ${this.usage}`), {
Expand Down
3 changes: 3 additions & 0 deletions deps/npm/lib/bugs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class Bugs extends BaseCommand {

if (typeof mani.bugs === 'object' && mani.bugs.url)
return mani.bugs.url

if (typeof mani.bugs === 'object' && mani.bugs.email)
return `mailto:${mani.bugs.email}`
}

// try to get it from the repo, if possible
Expand Down
1 change: 1 addition & 0 deletions deps/npm/lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,7 @@ define('prefix', {

define('preid', {
default: '',
hint: 'prerelease-id',
type: String,
description: `
The "prerelease identifier" to use as a prefix for the "prerelease" part
Expand Down
Loading