mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
deps: upgrade npm to 8.19.1
PR-URL: https://github.com/nodejs/node/pull/44486 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
1 parent
807b1e5533
commit
cf19a79dfc
188 files changed
+1888
-1302
No files matched your search
+6
-7
@@ -35,29 +35,28 @@ For all of the subcommands, `npm access` will perform actions on the packages
|
||||
in the current working directory if no package name is passed to the
|
||||
subcommand.
|
||||
|
||||
* public / restricted:
|
||||
* public / restricted (deprecated):
|
||||
Set a package to be either publicly accessible or restricted.
|
||||
|
||||
* grant / revoke:
|
||||
* grant / revoke (deprecated):
|
||||
Add or remove the ability of users and teams to have read-only or read-write
|
||||
access to a package.
|
||||
|
||||
* 2fa-required / 2fa-not-required:
|
||||
* 2fa-required / 2fa-not-required (deprecated):
|
||||
Configure whether a package requires that anyone publishing it have two-factor
|
||||
authentication enabled on their account.
|
||||
|
||||
* ls-packages:
|
||||
* ls-packages (deprecated):
|
||||
Show all of the packages a user or a team is able to access, along with the
|
||||
access level, except for read-only public packages (it won't print the whole
|
||||
registry listing)
|
||||
|
||||
* ls-collaborators:
|
||||
* ls-collaborators (deprecated):
|
||||
Show all of the access privileges for a package. Will only show permissions
|
||||
for packages to which you have at least read access. If `<user>` is passed in,
|
||||
the list is filtered only to teams _that_ user happens to belong to.
|
||||
|
||||
* edit:
|
||||
Set the access privileges for a package at once using `$EDITOR`.
|
||||
* edit (not implemented)
|
||||
|
||||
### Details
|
||||
|
||||
|
||||
+1
-1
@@ -232,4 +232,4 @@ This value is not exported to the environment for child processes.
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
## See Also
|
||||
|
||||
* [dependency selector](/using-npm/dependency-selector)
|
||||
* [dependency selectors](/using-npm/dependency-selectors)
|
||||
+28
@@ -91,6 +91,34 @@ consistent across updates. Set fields in here using the `./configure`
|
||||
script that comes with npm. This is primarily for distribution maintainers
|
||||
to override default configs in a standard and consistent manner.
|
||||
|
||||
### Auth related configuration
|
||||
|
||||
The settings `_auth`, `_authToken`, `username` and `_password` must all be
|
||||
scoped to a specific registry. This ensures that `npm` will never send
|
||||
credentials to the wrong host.
|
||||
|
||||
In order to scope these values, they must be prefixed by a URI fragment.
|
||||
If the credential is meant for any request to a registry on a single host,
|
||||
the scope may look like `//registry.npmjs.org/:`. If it must be scoped to a
|
||||
specific path on the host that path may also be provided, such as
|
||||
`//my-custom-registry.org/unique/path:`.
|
||||
|
||||
```
|
||||
; bad config
|
||||
_authToken=MYTOKEN
|
||||
|
||||
; good config
|
||||
@myorg:registry=https://somewhere-else.com/myorg
|
||||
@another:registry=https://somewhere-else.com/another
|
||||
//registry.npmjs.org/:_authToken=MYTOKEN
|
||||
; would apply to both @myorg and @another
|
||||
; //somewhere-else.com/:_authToken=MYTOKEN
|
||||
; would apply only to @myorg
|
||||
//somewhere-else.com/myorg/:_authToken=MYTOKEN1
|
||||
; would apply only to @another
|
||||
//somewhere-else.com/another/:_authToken=MYTOKEN2
|
||||
```
|
||||
|
||||
### See also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
|
||||
+2
-2
@@ -144,7 +144,7 @@ const arb = new Arborist({})
|
||||
|
||||
```js
|
||||
// root-level
|
||||
arb.loadActual((tree) => {
|
||||
arb.loadActual().then(async (tree) => {
|
||||
// query all production dependencies
|
||||
const results = await tree.querySelectorAll('.prod')
|
||||
console.log(results)
|
||||
@@ -153,7 +153,7 @@ arb.loadActual((tree) => {
|
||||
|
||||
```js
|
||||
// iterative
|
||||
arb.loadActual((tree) => {
|
||||
arb.loadActual().then(async (tree) => {
|
||||
// query for the deduped version of react
|
||||
const results = await tree.querySelectorAll('#react:not(:deduped)')
|
||||
// query the deduped react for git deps
|
||||
|
||||
+6
-7
@@ -169,34 +169,33 @@ in the current working directory if no package name is passed to the
|
||||
subcommand.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>public / restricted:
|
||||
<p>public / restricted (deprecated):
|
||||
Set a package to be either publicly accessible or restricted.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>grant / revoke:
|
||||
<p>grant / revoke (deprecated):
|
||||
Add or remove the ability of users and teams to have read-only or read-write
|
||||
access to a package.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>2fa-required / 2fa-not-required:
|
||||
<p>2fa-required / 2fa-not-required (deprecated):
|
||||
Configure whether a package requires that anyone publishing it have two-factor
|
||||
authentication enabled on their account.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>ls-packages:
|
||||
<p>ls-packages (deprecated):
|
||||
Show all of the packages a user or a team is able to access, along with the
|
||||
access level, except for read-only public packages (it won't print the whole
|
||||
registry listing)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>ls-collaborators:
|
||||
<p>ls-collaborators (deprecated):
|
||||
Show all of the access privileges for a package. Will only show permissions
|
||||
for packages to which you have at least read access. If <code><user></code> is passed in,
|
||||
the list is filtered only to teams <em>that</em> user happens to belong to.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>edit:
|
||||
Set the access privileges for a package at once using <code>$EDITOR</code>.</p>
|
||||
<p>edit (not implemented)</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3 id="details">Details</h3>
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ tree at all, use <a href="../commands/npm-explain.html"><code>npm explain</code>
|
||||
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@8.18.0 /path/to/npm
|
||||
<pre lang="bash"><code>npm@8.19.1 /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
</code></pre>
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ the specified workspaces, and not on the root project.</p>
|
||||
<!-- raw HTML omitted -->
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="../using-npm/dependency-selector.html">dependency selector</a></li>
|
||||
<li><a href="../using-npm/dependency-selectors.html">dependency selectors</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ npm command-line interface
|
||||
<!-- raw HTML omitted -->
|
||||
<!-- raw HTML omitted -->
|
||||
<h3 id="version">Version</h3>
|
||||
<p>8.18.0</p>
|
||||
<p>8.19.1</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
|
||||
|
||||
+24
-1
@@ -142,7 +142,7 @@ npm command-line interface
|
||||
|
||||
<section id="table_of_contents">
|
||||
<h2 id="table-of-contents">Table of contents</h2>
|
||||
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#files">Files</a></li><ul><li><a href="#comments">Comments</a></li><li><a href="#per-project-config-file">Per-project config file</a></li><li><a href="#per-user-config-file">Per-user config file</a></li><li><a href="#global-config-file">Global config file</a></li><li><a href="#built-in-config-file">Built-in config file</a></li></ul><li><a href="#see-also">See also</a></li></ul></div>
|
||||
<div id="_table_of_contents"><ul><li><a href="#description">Description</a></li><li><a href="#files">Files</a></li><ul><li><a href="#comments">Comments</a></li><li><a href="#per-project-config-file">Per-project config file</a></li><li><a href="#per-user-config-file">Per-user config file</a></li><li><a href="#global-config-file">Global config file</a></li><li><a href="#built-in-config-file">Built-in config file</a></li></ul><li><a href="#auth-related-configuration">Auth related configuration</a></li><li><a href="#see-also">See also</a></li></ul></div>
|
||||
</section>
|
||||
|
||||
<div id="_content"><h3 id="description">Description</h3>
|
||||
@@ -204,6 +204,29 @@ variables can be replaced as above.</p>
|
||||
consistent across updates. Set fields in here using the <code>./configure</code>
|
||||
script that comes with npm. This is primarily for distribution maintainers
|
||||
to override default configs in a standard and consistent manner.</p>
|
||||
<h3 id="auth-related-configuration">Auth related configuration</h3>
|
||||
<p>The settings <code>_auth</code>, <code>_authToken</code>, <code>username</code> and <code>_password</code> must all be
|
||||
scoped to a specific registry. This ensures that <code>npm</code> will never send
|
||||
credentials to the wrong host.</p>
|
||||
<p>In order to scope these values, they must be prefixed by a URI fragment.
|
||||
If the credential is meant for any request to a registry on a single host,
|
||||
the scope may look like <code>//registry.npmjs.org/:</code>. If it must be scoped to a
|
||||
specific path on the host that path may also be provided, such as
|
||||
<code>//my-custom-registry.org/unique/path:</code>.</p>
|
||||
<pre><code>; bad config
|
||||
_authToken=MYTOKEN
|
||||
|
||||
; good config
|
||||
@myorg:registry=https://somewhere-else.com/myorg
|
||||
@another:registry=https://somewhere-else.com/another
|
||||
//registry.npmjs.org/:_authToken=MYTOKEN
|
||||
; would apply to both @myorg and @another
|
||||
; //somewhere-else.com/:_authToken=MYTOKEN
|
||||
; would apply only to @myorg
|
||||
//somewhere-else.com/myorg/:_authToken=MYTOKEN1
|
||||
; would apply only to @another
|
||||
//somewhere-else.com/another/:_authToken=MYTOKEN2
|
||||
</code></pre>
|
||||
<h3 id="see-also">See also</h3>
|
||||
<ul>
|
||||
<li><a href="../configuring-npm/folders.html">npm folders</a></li>
|
||||
|
||||
@@ -264,14 +264,14 @@ npm command-line interface
|
||||
const arb = new Arborist({})
|
||||
</code></pre>
|
||||
<pre lang="js"><code>// root-level
|
||||
arb.loadActual((tree) => {
|
||||
arb.loadActual().then(async (tree) => {
|
||||
// query all production dependencies
|
||||
const results = await tree.querySelectorAll('.prod')
|
||||
console.log(results)
|
||||
})
|
||||
</code></pre>
|
||||
<pre lang="js"><code>// iterative
|
||||
arb.loadActual((tree) => {
|
||||
arb.loadActual().then(async (tree) => {
|
||||
// query for the deduped version of react
|
||||
const results = await tree.querySelectorAll('#react:not(:deduped)')
|
||||
// query the deduped react for git deps
|
||||
|
||||
Vendored
+15
-1
@@ -5,6 +5,7 @@ const readPackageJson = require('read-package-json-fast')
|
||||
|
||||
const otplease = require('../utils/otplease.js')
|
||||
const getIdentity = require('../utils/get-identity.js')
|
||||
const log = require('../utils/log-shim.js')
|
||||
const BaseCommand = require('../base-command.js')
|
||||
|
||||
const subcommands = [
|
||||
@@ -19,6 +20,15 @@ const subcommands = [
|
||||
'2fa-not-required',
|
||||
]
|
||||
|
||||
const deprecated = [
|
||||
'2fa-not-required',
|
||||
'2fa-required',
|
||||
'ls-collaborators',
|
||||
'ls-packages',
|
||||
'public',
|
||||
'restricted',
|
||||
]
|
||||
|
||||
class Access extends BaseCommand {
|
||||
static description = 'Set access level on published packages'
|
||||
static name = 'access'
|
||||
@@ -78,6 +88,10 @@ class Access extends BaseCommand {
|
||||
throw this.usageError(`${cmd} is not a recognized subcommand.`)
|
||||
}
|
||||
|
||||
if (deprecated.includes(cmd)) {
|
||||
log.warn('access', `${cmd} subcommand will be removed in the next version of npm`)
|
||||
}
|
||||
|
||||
return this[cmd](args, {
|
||||
...this.npm.flatOptions,
|
||||
})
|
||||
@@ -175,7 +189,7 @@ class Access extends BaseCommand {
|
||||
}
|
||||
|
||||
async edit () {
|
||||
throw new Error('edit subcommand is not implemented yet')
|
||||
throw new Error('edit subcommand is not implemented')
|
||||
}
|
||||
|
||||
modifyPackage (pkg, opts, fn, requireScope = true) {
|
||||
|
||||
Vendored
+3
-2
@@ -178,11 +178,12 @@ class VerifySignatures {
|
||||
let name = edge.name
|
||||
try {
|
||||
name = npa(edge.spec).subSpec.name
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// leave it as edge.name
|
||||
}
|
||||
try {
|
||||
return npa(`${name}@${edge.spec}`)
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// Skip packages with invalid spec
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+7
-2
@@ -58,11 +58,16 @@ class Edit extends BaseCommand {
|
||||
}
|
||||
const [bin, ...args] = this.npm.config.get('editor').split(/\s+/)
|
||||
const editor = cp.spawn(bin, [...args, dir], { stdio: 'inherit' })
|
||||
editor.on('exit', (code) => {
|
||||
editor.on('exit', async (code) => {
|
||||
if (code) {
|
||||
return reject(new Error(`editor process exited with code: ${code}`))
|
||||
}
|
||||
this.npm.exec('rebuild', [dir]).catch(reject).then(resolve)
|
||||
try {
|
||||
await this.npm.exec('rebuild', [dir])
|
||||
} catch (err) {
|
||||
reject(err)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Vendored
+64
-71
@@ -50,7 +50,7 @@ class Org extends BaseCommand {
|
||||
})
|
||||
}
|
||||
|
||||
set (org, user, role, opts) {
|
||||
async set (org, user, role, opts) {
|
||||
role = role || 'developer'
|
||||
if (!org) {
|
||||
throw new Error('First argument `orgname` is required.')
|
||||
@@ -67,27 +67,26 @@ class Org extends BaseCommand {
|
||||
)
|
||||
}
|
||||
|
||||
return liborg.set(org, user, role, opts).then(memDeets => {
|
||||
if (opts.json) {
|
||||
this.npm.output(JSON.stringify(memDeets, null, 2))
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['org', 'orgsize', 'user', 'role'].join('\t'))
|
||||
this.npm.output(
|
||||
[memDeets.org.name, memDeets.org.size, memDeets.user, memDeets.role].join('\t')
|
||||
)
|
||||
} else if (!this.npm.silent) {
|
||||
this.npm.output(
|
||||
`Added ${memDeets.user} as ${memDeets.role} to ${memDeets.org.name}. You now have ${
|
||||
const memDeets = await liborg.set(org, user, role, opts)
|
||||
if (opts.json) {
|
||||
this.npm.output(JSON.stringify(memDeets, null, 2))
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['org', 'orgsize', 'user', 'role'].join('\t'))
|
||||
this.npm.output(
|
||||
[memDeets.org.name, memDeets.org.size, memDeets.user, memDeets.role].join('\t')
|
||||
)
|
||||
} else if (!this.npm.silent) {
|
||||
this.npm.output(
|
||||
`Added ${memDeets.user} as ${memDeets.role} to ${memDeets.org.name}. You now have ${
|
||||
memDeets.org.size
|
||||
} member${memDeets.org.size === 1 ? '' : 's'} in this org.`
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
return memDeets
|
||||
})
|
||||
return memDeets
|
||||
}
|
||||
|
||||
rm (org, user, opts) {
|
||||
async rm (org, user, opts) {
|
||||
if (!org) {
|
||||
throw new Error('First argument `orgname` is required.')
|
||||
}
|
||||
@@ -96,68 +95,62 @@ class Org extends BaseCommand {
|
||||
throw new Error('Second argument `username` is required.')
|
||||
}
|
||||
|
||||
return liborg
|
||||
.rm(org, user, opts)
|
||||
.then(() => {
|
||||
return liborg.ls(org, opts)
|
||||
})
|
||||
.then(roster => {
|
||||
user = user.replace(/^[~@]?/, '')
|
||||
org = org.replace(/^[~@]?/, '')
|
||||
const userCount = Object.keys(roster).length
|
||||
if (opts.json) {
|
||||
this.npm.output(
|
||||
JSON.stringify({
|
||||
user,
|
||||
org,
|
||||
userCount,
|
||||
deleted: true,
|
||||
})
|
||||
)
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['user', 'org', 'userCount', 'deleted'].join('\t'))
|
||||
this.npm.output([user, org, userCount, true].join('\t'))
|
||||
} else if (!this.npm.silent) {
|
||||
this.npm.output(
|
||||
`Successfully removed ${user} from ${org}. You now have ${userCount} member${
|
||||
userCount === 1 ? '' : 's'
|
||||
} in this org.`
|
||||
)
|
||||
}
|
||||
})
|
||||
await liborg.rm(org, user, opts)
|
||||
const roster = await liborg.ls(org, opts)
|
||||
user = user.replace(/^[~@]?/, '')
|
||||
org = org.replace(/^[~@]?/, '')
|
||||
const userCount = Object.keys(roster).length
|
||||
if (opts.json) {
|
||||
this.npm.output(
|
||||
JSON.stringify({
|
||||
user,
|
||||
org,
|
||||
userCount,
|
||||
deleted: true,
|
||||
})
|
||||
)
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['user', 'org', 'userCount', 'deleted'].join('\t'))
|
||||
this.npm.output([user, org, userCount, true].join('\t'))
|
||||
} else if (!this.npm.silent) {
|
||||
this.npm.output(
|
||||
`Successfully removed ${user} from ${org}. You now have ${userCount} member${
|
||||
userCount === 1 ? '' : 's'
|
||||
} in this org.`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
ls (org, user, opts) {
|
||||
async ls (org, user, opts) {
|
||||
if (!org) {
|
||||
throw new Error('First argument `orgname` is required.')
|
||||
}
|
||||
|
||||
return liborg.ls(org, opts).then(roster => {
|
||||
if (user) {
|
||||
const newRoster = {}
|
||||
if (roster[user]) {
|
||||
newRoster[user] = roster[user]
|
||||
}
|
||||
let roster = await liborg.ls(org, opts)
|
||||
if (user) {
|
||||
const newRoster = {}
|
||||
if (roster[user]) {
|
||||
newRoster[user] = roster[user]
|
||||
}
|
||||
|
||||
roster = newRoster
|
||||
}
|
||||
if (opts.json) {
|
||||
this.npm.output(JSON.stringify(roster, null, 2))
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['user', 'role'].join('\t'))
|
||||
Object.keys(roster).forEach(user => {
|
||||
this.npm.output([user, roster[user]].join('\t'))
|
||||
roster = newRoster
|
||||
}
|
||||
if (opts.json) {
|
||||
this.npm.output(JSON.stringify(roster, null, 2))
|
||||
} else if (opts.parseable) {
|
||||
this.npm.output(['user', 'role'].join('\t'))
|
||||
Object.keys(roster).forEach(user => {
|
||||
this.npm.output([user, roster[user]].join('\t'))
|
||||
})
|
||||
} else if (!this.npm.silent) {
|
||||
const table = new Table({ head: ['user', 'role'] })
|
||||
Object.keys(roster)
|
||||
.sort()
|
||||
.forEach(user => {
|
||||
table.push([user, roster[user]])
|
||||
})
|
||||
} else if (!this.npm.silent) {
|
||||
const table = new Table({ head: ['user', 'role'] })
|
||||
Object.keys(roster)
|
||||
.sort()
|
||||
.forEach(user => {
|
||||
table.push([user, roster[user]])
|
||||
})
|
||||
this.npm.output(table.toString())
|
||||
}
|
||||
})
|
||||
this.npm.output(table.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports = Org
|
||||
Vendored
+1
@@ -196,6 +196,7 @@ class Outdated extends ArboristWorkspaceCmd {
|
||||
try {
|
||||
alias = npa(edge.spec).subSpec
|
||||
} catch (err) {
|
||||
// ignore errors, no alias
|
||||
}
|
||||
const spec = npa(alias ? alias.name : edge.name)
|
||||
const node = edge.to || edge
|
||||
|
||||
Vendored
+20
-25
@@ -140,32 +140,27 @@ class Token extends BaseCommand {
|
||||
const cidr = conf.cidr
|
||||
const readonly = conf.readOnly
|
||||
|
||||
return readUserInfo
|
||||
.password()
|
||||
.then(password => {
|
||||
const validCIDR = this.validateCIDRList(cidr)
|
||||
log.info('token', 'creating')
|
||||
return pulseTillDone.withPromise(
|
||||
otplease(this.npm, conf, conf => {
|
||||
return profile.createToken(password, readonly, validCIDR, conf)
|
||||
})
|
||||
)
|
||||
})
|
||||
.then(result => {
|
||||
delete result.key
|
||||
delete result.updated
|
||||
if (conf.json) {
|
||||
this.npm.output(JSON.stringify(result))
|
||||
} else if (conf.parseable) {
|
||||
Object.keys(result).forEach(k => this.npm.output(k + '\t' + result[k]))
|
||||
} else {
|
||||
const table = new Table()
|
||||
for (const k of Object.keys(result)) {
|
||||
table.push({ [chalk.bold(k)]: String(result[k]) })
|
||||
}
|
||||
this.npm.output(table.toString())
|
||||
}
|
||||
const password = await readUserInfo.password()
|
||||
const validCIDR = this.validateCIDRList(cidr)
|
||||
log.info('token', 'creating')
|
||||
const result = await pulseTillDone.withPromise(
|
||||
otplease(this.npm, conf, conf => {
|
||||
return profile.createToken(password, readonly, validCIDR, conf)
|
||||
})
|
||||
)
|
||||
delete result.key
|
||||
delete result.updated
|
||||
if (conf.json) {
|
||||
this.npm.output(JSON.stringify(result))
|
||||
} else if (conf.parseable) {
|
||||
Object.keys(result).forEach(k => this.npm.output(k + '\t' + result[k]))
|
||||
} else {
|
||||
const table = new Table()
|
||||
for (const k of Object.keys(result)) {
|
||||
table.push({ [chalk.bold(k)]: String(result[k]) })
|
||||
}
|
||||
this.npm.output(table.toString())
|
||||
}
|
||||
}
|
||||
|
||||
config () {
|
||||
|
||||
Vendored
+11
-9
@@ -112,6 +112,7 @@ class Npm extends EventEmitter {
|
||||
// this is async but we dont await it, since its ok if it doesnt
|
||||
// finish before the command finishes running. it uses command and argv
|
||||
// so it must be initiated here, after the command name is set
|
||||
// eslint-disable-next-line promise/catch-or-return
|
||||
updateNotifier(this).then((msg) => (this.updateNotification = msg))
|
||||
|
||||
// Options are prefixed by a hyphen-minus (-, \u2d).
|
||||
@@ -173,16 +174,15 @@ class Npm extends EventEmitter {
|
||||
|
||||
async load () {
|
||||
if (!this.#loadPromise) {
|
||||
this.#loadPromise = this.time('npm:load', () => this[_load]().catch(er => er).then((er) => {
|
||||
this.loadErr = er
|
||||
if (!er) {
|
||||
if (this.config.get('force')) {
|
||||
log.warn('using --force', 'Recommended protections disabled.')
|
||||
}
|
||||
} else {
|
||||
this.#loadPromise = this.time('npm:load', async () => {
|
||||
await this[_load]().catch((er) => {
|
||||
this.loadErr = er
|
||||
throw er
|
||||
})
|
||||
if (this.config.get('force')) {
|
||||
log.warn('using --force', 'Recommended protections disabled.')
|
||||
}
|
||||
}))
|
||||
})
|
||||
}
|
||||
return this.#loadPromise
|
||||
}
|
||||
@@ -229,7 +229,9 @@ class Npm extends EventEmitter {
|
||||
const node = this.time('npm:load:whichnode', () => {
|
||||
try {
|
||||
return which.sync(process.argv[0])
|
||||
} catch {} // TODO should we throw here?
|
||||
} catch {
|
||||
// TODO should we throw here?
|
||||
}
|
||||
})
|
||||
|
||||
if (node && node.toUpperCase() !== process.execPath.toUpperCase()) {
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,4 @@
|
||||
const log = require('./log-shim')
|
||||
async function otplease (npm, opts, fn) {
|
||||
try {
|
||||
return await fn(opts)
|
||||
@@ -7,6 +8,7 @@ async function otplease (npm, opts, fn) {
|
||||
}
|
||||
|
||||
if (isWebOTP(err)) {
|
||||
log.disableProgress()
|
||||
const webAuth = require('./web-auth')
|
||||
const openUrlPrompt = require('./open-url-prompt')
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -148,7 +148,9 @@ const setter = ({ data, key, value, force }) => {
|
||||
let maybeIndex = Number.NaN
|
||||
try {
|
||||
maybeIndex = Number(_key)
|
||||
} catch (err) {}
|
||||
} catch {
|
||||
// leave it NaN
|
||||
}
|
||||
if (!Number.isNaN(maybeIndex)) {
|
||||
_key = maybeIndex
|
||||
}
|
||||
|
||||
Vendored
+7
-8
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-ACCESS" "1" "August 2022" "" ""
|
||||
.TH "NPM\-ACCESS" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-access\fR \- Set access level on published packages
|
||||
.SS Synopsis
|
||||
@@ -25,29 +25,28 @@ in the current working directory if no package name is passed to the
|
||||
subcommand\.
|
||||
.RS 0
|
||||
.IP \(bu 2
|
||||
public / restricted:
|
||||
public / restricted (deprecated):
|
||||
Set a package to be either publicly accessible or restricted\.
|
||||
.IP \(bu 2
|
||||
grant / revoke:
|
||||
grant / revoke (deprecated):
|
||||
Add or remove the ability of users and teams to have read\-only or read\-write
|
||||
access to a package\.
|
||||
.IP \(bu 2
|
||||
2fa\-required / 2fa\-not\-required:
|
||||
2fa\-required / 2fa\-not\-required (deprecated):
|
||||
Configure whether a package requires that anyone publishing it have two\-factor
|
||||
authentication enabled on their account\.
|
||||
.IP \(bu 2
|
||||
ls\-packages:
|
||||
ls\-packages (deprecated):
|
||||
Show all of the packages a user or a team is able to access, along with the
|
||||
access level, except for read\-only public packages (it won't print the whole
|
||||
registry listing)
|
||||
.IP \(bu 2
|
||||
ls\-collaborators:
|
||||
ls\-collaborators (deprecated):
|
||||
Show all of the access privileges for a package\. Will only show permissions
|
||||
for packages to which you have at least read access\. If \fB<user>\fP is passed in,
|
||||
the list is filtered only to teams \fIthat\fR user happens to belong to\.
|
||||
.IP \(bu 2
|
||||
edit:
|
||||
Set the access privileges for a package at once using \fB$EDITOR\fP\|\.
|
||||
edit (not implemented)
|
||||
|
||||
.RE
|
||||
.SS Details
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-ADDUSER" "1" "August 2022" "" ""
|
||||
.TH "NPM\-ADDUSER" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-adduser\fR \- Add a registry user account
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-AUDIT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-AUDIT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-audit\fR \- Run a security audit
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-BIN" "1" "August 2022" "" ""
|
||||
.TH "NPM\-BIN" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-bin\fR \- Display npm bin folder
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-BUGS" "1" "August 2022" "" ""
|
||||
.TH "NPM\-BUGS" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-bugs\fR \- Report bugs for a package in a web browser
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-CACHE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-CACHE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-cache\fR \- Manipulates packages cache
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-CI" "1" "August 2022" "" ""
|
||||
.TH "NPM\-CI" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-ci\fR \- Clean install a project
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-COMPLETION" "1" "August 2022" "" ""
|
||||
.TH "NPM\-COMPLETION" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-completion\fR \- Tab Completion for npm
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-CONFIG" "1" "August 2022" "" ""
|
||||
.TH "NPM\-CONFIG" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-config\fR \- Manage the npm configuration files
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DEDUPE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DEDUPE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-dedupe\fR \- Reduce duplication in the package tree
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DEPRECATE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DEPRECATE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-deprecate\fR \- Deprecate a version of a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DIFF" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DIFF" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-diff\fR \- The registry diff command
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DIST\-TAG" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DIST\-TAG" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-dist-tag\fR \- Modify package distribution tags
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DOCS" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DOCS" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-docs\fR \- Open documentation for a package in a web browser
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-DOCTOR" "1" "August 2022" "" ""
|
||||
.TH "NPM\-DOCTOR" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-doctor\fR \- Check your npm environment
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-EDIT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-EDIT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-edit\fR \- Edit an installed package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-EXEC" "1" "August 2022" "" ""
|
||||
.TH "NPM\-EXEC" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-exec\fR \- Run a command from a local or remote npm package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-EXPLAIN" "1" "August 2022" "" ""
|
||||
.TH "NPM\-EXPLAIN" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-explain\fR \- Explain installed packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-EXPLORE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-EXPLORE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-explore\fR \- Browse an installed package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-FIND\-DUPES" "1" "August 2022" "" ""
|
||||
.TH "NPM\-FIND\-DUPES" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-find-dupes\fR \- Find duplication in the package tree
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-FUND" "1" "August 2022" "" ""
|
||||
.TH "NPM\-FUND" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-fund\fR \- Retrieve funding information
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-HELP\-SEARCH" "1" "August 2022" "" ""
|
||||
.TH "NPM\-HELP\-SEARCH" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-help-search\fR \- Search npm help documentation
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-HELP" "1" "August 2022" "" ""
|
||||
.TH "NPM\-HELP" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-help\fR \- Get help on npm
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-HOOK" "1" "August 2022" "" ""
|
||||
.TH "NPM\-HOOK" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-hook\fR \- Manage registry hooks
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-INIT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-INIT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-init\fR \- Create a package\.json file
|
||||
.SS Synopsis
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-INSTALL\-CI\-TEST" "1" "August 2022" "" ""
|
||||
.TH "NPM\-INSTALL\-CI\-TEST" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-install-ci-test\fR \- Install a project with a clean slate and run tests
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-INSTALL\-TEST" "1" "August 2022" "" ""
|
||||
.TH "NPM\-INSTALL\-TEST" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-install-test\fR \- Install package(s) and run tests
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-INSTALL" "1" "August 2022" "" ""
|
||||
.TH "NPM\-INSTALL" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-install\fR \- Install a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-LINK" "1" "August 2022" "" ""
|
||||
.TH "NPM\-LINK" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-link\fR \- Symlink a package folder
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-LOGOUT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-LOGOUT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-logout\fR \- Log out of the registry
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-LS" "1" "August 2022" "" ""
|
||||
.TH "NPM\-LS" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-ls\fR \- List installed packages
|
||||
.SS Synopsis
|
||||
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
|
||||
.P
|
||||
.RS 2
|
||||
.nf
|
||||
npm@8\.18\.0 /path/to/npm
|
||||
npm@8\.19\.1 /path/to/npm
|
||||
└─┬ init\-package\-json@0\.0\.4
|
||||
└── promzard@0\.1\.5
|
||||
.fi
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-ORG" "1" "August 2022" "" ""
|
||||
.TH "NPM\-ORG" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-org\fR \- Manage orgs
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-OUTDATED" "1" "August 2022" "" ""
|
||||
.TH "NPM\-OUTDATED" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-outdated\fR \- Check for outdated packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-OWNER" "1" "August 2022" "" ""
|
||||
.TH "NPM\-OWNER" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-owner\fR \- Manage package owners
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PACK" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PACK" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-pack\fR \- Create a tarball from a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PING" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PING" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-ping\fR \- Ping npm registry
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PKG" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PKG" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-pkg\fR \- Manages your package\.json
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PREFIX" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PREFIX" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-prefix\fR \- Display prefix
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PROFILE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PROFILE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-profile\fR \- Change settings on your registry profile
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PRUNE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PRUNE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-prune\fR \- Remove extraneous packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-PUBLISH" "1" "August 2022" "" ""
|
||||
.TH "NPM\-PUBLISH" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-publish\fR \- Publish a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-QUERY" "1" "August 2022" "" ""
|
||||
.TH "NPM\-QUERY" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-query\fR \- Dependency selector query
|
||||
.SS Synopsis
|
||||
@@ -235,6 +235,6 @@ This value is not exported to the environment for child processes\.
|
||||
.SH See Also
|
||||
.RS 0
|
||||
.IP \(bu 2
|
||||
npm help dependency selector
|
||||
npm help dependency selectors
|
||||
|
||||
.RE
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-REBUILD" "1" "August 2022" "" ""
|
||||
.TH "NPM\-REBUILD" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-rebuild\fR \- Rebuild a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-REPO" "1" "August 2022" "" ""
|
||||
.TH "NPM\-REPO" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-repo\fR \- Open package repository page in the browser
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-RESTART" "1" "August 2022" "" ""
|
||||
.TH "NPM\-RESTART" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-restart\fR \- Restart a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-ROOT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-ROOT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-root\fR \- Display npm root
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-RUN\-SCRIPT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-RUN\-SCRIPT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-run-script\fR \- Run arbitrary package scripts
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-SEARCH" "1" "August 2022" "" ""
|
||||
.TH "NPM\-SEARCH" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-search\fR \- Search for packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-SET\-SCRIPT" "1" "August 2022" "" ""
|
||||
.TH "NPM\-SET\-SCRIPT" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-set-script\fR \- Set tasks in the scripts section of package\.json
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-SHRINKWRAP" "1" "August 2022" "" ""
|
||||
.TH "NPM\-SHRINKWRAP" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-STAR" "1" "August 2022" "" ""
|
||||
.TH "NPM\-STAR" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-star\fR \- Mark your favorite packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-STARS" "1" "August 2022" "" ""
|
||||
.TH "NPM\-STARS" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-stars\fR \- View packages marked as favorites
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-START" "1" "August 2022" "" ""
|
||||
.TH "NPM\-START" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-start\fR \- Start a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-STOP" "1" "August 2022" "" ""
|
||||
.TH "NPM\-STOP" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-stop\fR \- Stop a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-TEAM" "1" "August 2022" "" ""
|
||||
.TH "NPM\-TEAM" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-team\fR \- Manage organization teams and team memberships
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-TEST" "1" "August 2022" "" ""
|
||||
.TH "NPM\-TEST" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-test\fR \- Test a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-TOKEN" "1" "August 2022" "" ""
|
||||
.TH "NPM\-TOKEN" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-token\fR \- Manage your authentication tokens
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-UNINSTALL" "1" "August 2022" "" ""
|
||||
.TH "NPM\-UNINSTALL" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-uninstall\fR \- Remove a package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-UNPUBLISH" "1" "August 2022" "" ""
|
||||
.TH "NPM\-UNPUBLISH" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-unpublish\fR \- Remove a package from the registry
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-UNSTAR" "1" "August 2022" "" ""
|
||||
.TH "NPM\-UNSTAR" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-unstar\fR \- Remove an item from your favorite packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-UPDATE" "1" "August 2022" "" ""
|
||||
.TH "NPM\-UPDATE" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-update\fR \- Update packages
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-VERSION" "1" "August 2022" "" ""
|
||||
.TH "NPM\-VERSION" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-version\fR \- Bump a package version
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-VIEW" "1" "August 2022" "" ""
|
||||
.TH "NPM\-VIEW" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-view\fR \- View registry info
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-WHOAMI" "1" "August 2022" "" ""
|
||||
.TH "NPM\-WHOAMI" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-whoami\fR \- Display npm username
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+2
-2
@@ -1,10 +1,10 @@
|
||||
.TH "NPM" "1" "August 2022" "" ""
|
||||
.TH "NPM" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm\fR \- javascript package manager
|
||||
.SS Synopsis
|
||||
.SS Version
|
||||
.P
|
||||
8\.18\.0
|
||||
8\.19\.1
|
||||
.SS Description
|
||||
.P
|
||||
npm is the package manager for the Node JavaScript platform\. It puts
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPX" "1" "August 2022" "" ""
|
||||
.TH "NPX" "1" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpx\fR \- Run a command from a local or remote npm package
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "FOLDERS" "5" "August 2022" "" ""
|
||||
.TH "FOLDERS" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBfolders\fR \- Folder Structures Used by npm
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "INSTALL" "5" "August 2022" "" ""
|
||||
.TH "INSTALL" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBinstall\fR \- Download and install node and npm
|
||||
.SS Description
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPM\-SHRINKWRAP\.JSON" "5" "August 2022" "" ""
|
||||
.TH "NPM\-SHRINKWRAP\.JSON" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpm-shrinkwrap.json\fR \- A publishable lockfile
|
||||
.SS Description
|
||||
|
||||
Vendored
+30
-1
@@ -1,4 +1,4 @@
|
||||
.TH "NPMRC" "5" "August 2022" "" ""
|
||||
.TH "NPMRC" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBnpmrc\fR \- The npm config files
|
||||
.SS Description
|
||||
@@ -93,6 +93,35 @@ This is an unchangeable "builtin" configuration file that npm keeps
|
||||
consistent across updates\. Set fields in here using the \fB\|\./configure\fP
|
||||
script that comes with npm\. This is primarily for distribution maintainers
|
||||
to override default configs in a standard and consistent manner\.
|
||||
.SS Auth related configuration
|
||||
.P
|
||||
The settings \fB_auth\fP, \fB_authToken\fP, \fBusername\fP and \fB_password\fP must all be
|
||||
scoped to a specific registry\. This ensures that \fBnpm\fP will never send
|
||||
credentials to the wrong host\.
|
||||
.P
|
||||
In order to scope these values, they must be prefixed by a URI fragment\.
|
||||
If the credential is meant for any request to a registry on a single host,
|
||||
the scope may look like \fB//registry\.npmjs\.org/:\fP\|\. If it must be scoped to a
|
||||
specific path on the host that path may also be provided, such as
|
||||
\fB//my\-custom\-registry\.org/unique/path:\fP\|\.
|
||||
.P
|
||||
.RS 2
|
||||
.nf
|
||||
; bad config
|
||||
_authToken=MYTOKEN
|
||||
|
||||
; good config
|
||||
@myorg:registry=https://somewhere\-else\.com/myorg
|
||||
@another:registry=https://somewhere\-else\.com/another
|
||||
//registry\.npmjs\.org/:_authToken=MYTOKEN
|
||||
; would apply to both @myorg and @another
|
||||
; //somewhere\-else\.com/:_authToken=MYTOKEN
|
||||
; would apply only to @myorg
|
||||
//somewhere\-else\.com/myorg/:_authToken=MYTOKEN1
|
||||
; would apply only to @another
|
||||
//somewhere\-else\.com/another/:_authToken=MYTOKEN2
|
||||
.fi
|
||||
.RE
|
||||
.SS See also
|
||||
.RS 0
|
||||
.IP \(bu 2
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "PACKAGE\.JSON" "5" "August 2022" "" ""
|
||||
.TH "PACKAGE\.JSON" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBpackage.json\fR \- Specifics of npm's package\.json handling
|
||||
.SS Description
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "PACKAGE\-LOCK\.JSON" "5" "August 2022" "" ""
|
||||
.TH "PACKAGE\-LOCK\.JSON" "5" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBpackage-lock.json\fR \- A manifestation of the manifest
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "CONFIG" "7" "August 2022" "" ""
|
||||
.TH "CONFIG" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBconfig\fR \- More than you probably want to know about npm configuration
|
||||
.SS Description
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
.TH "DEPENDENCY" "" "August 2022" "" ""
|
||||
.TH "DEPENDENCY" "" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBDependency\fR
|
||||
.SS Description
|
||||
@@ -215,7 +215,7 @@ const arb = new Arborist({})
|
||||
.RS 2
|
||||
.nf
|
||||
// root\-level
|
||||
arb\.loadActual((tree) => {
|
||||
arb\.loadActual()\.then(async (tree) => {
|
||||
// query all production dependencies
|
||||
const results = await tree\.querySelectorAll('\.prod')
|
||||
console\.log(results)
|
||||
@@ -226,7 +226,7 @@ arb\.loadActual((tree) => {
|
||||
.RS 2
|
||||
.nf
|
||||
// iterative
|
||||
arb\.loadActual((tree) => {
|
||||
arb\.loadActual()\.then(async (tree) => {
|
||||
// query for the deduped version of react
|
||||
const results = await tree\.querySelectorAll('#react:not(:deduped)')
|
||||
// query the deduped react for git deps
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "DEVELOPERS" "7" "August 2022" "" ""
|
||||
.TH "DEVELOPERS" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBdevelopers\fR \- Developer Guide
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "LOGGING" "7" "August 2022" "" ""
|
||||
.TH "LOGGING" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBLogging\fR \- Why, What & How We Log
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "ORGS" "7" "August 2022" "" ""
|
||||
.TH "ORGS" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBorgs\fR \- Working with Teams & Orgs
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "PACKAGE\-SPEC" "7" "August 2022" "" ""
|
||||
.TH "PACKAGE\-SPEC" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBpackage-spec\fR \- Package name specifier
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "REGISTRY" "7" "August 2022" "" ""
|
||||
.TH "REGISTRY" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBregistry\fR \- The JavaScript Package Registry
|
||||
.SS Description
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "REMOVAL" "7" "August 2022" "" ""
|
||||
.TH "REMOVAL" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBremoval\fR \- Cleaning the Slate
|
||||
.SS Synopsis
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "SCOPE" "7" "August 2022" "" ""
|
||||
.TH "SCOPE" "7" "September 2022" "" ""
|
||||
.SH "NAME"
|
||||
\fBscope\fR \- Scoped packages
|
||||
.SS Description
|
||||
|
||||
Loaded 100 of 188 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user