GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: upgrade npm to 10.2.4 · nodejs/node@68e7d49

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/npm
    • docs
      • content/commands
        • npm-ls.md
        • npm-prune.md
        • npm-view.md
        • npm.md
      • output/commands
        • npm-ls.html
        • npm-prune.html
        • npm-view.html
        • npm.html
    • lib
      • commands
        • exec.js
        • outdated.js
        • pkg.js
        • search.js
        • token.js
      • utils
        • format-search-stream.js
        • open-url.js
        • sbom-cyclonedx.js
        • sbom-spdx.js
    • man/man1
      • npm-ls.1
      • npm-prune.1
      • npm-view.1
      • npm.1
    • node_modules
      • @isaacs/cliui/node_modules
        • ansi-regex
          • index.js
        • strip-ansi
          • index.js
      • @npmcli
        • config
          • package.json
        • disparity-colors/node_modules/ansi-styles
          • index.js
          • license
          • package.json
      • @sigstore
        • sign
          • dist/witness/tlog
            • index.js
          • package.json
        • tuf
          • dist
            • client.js
            • index.js
          • package.json
      • agent-base
        • dist
          • helpers.js
          • index.js
        • package.json
      • ansi-regex
        • index.js
        • license
        • package.json
      • ansi-styles
        • index.js
        • license
        • package.json
      • ci-info
        • package.json
        • vendors.json
      • cidr-regex
        • index.js
        • package.json
      • cli-columns/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • columnify/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • function-bind
        • implementation.js
        • package.json
      • gauge/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • hasown
        • LICENSE
        • index.js
        • package.json
        • tsconfig.json
      • has
        • LICENSE-MIT
        • package.json
        • src
          • index.js
        • test
          • index.js
      • http-proxy-agent
        • LICENSE
        • dist
          • index.js
        • package.json
      • https-proxy-agent
        • dist
          • index.js
          • parse-proxy-response.js
        • package.json
      • ip-regex
        • index.js
        • license
        • package.json
      • is-cidr
        • index.js
        • package.json
      • is-core-module
        • index.js
        • package.json
      • libnpmexec
        • package.json
      • libnpmpublish
        • lib
          • provenance.js
        • package.json
      • lru-cache
        • dist
          • cjs
            • index.min.js
          • commonjs
            • index.js
            • package.json
          • esm
            • index.js
            • package.json
          • mjs
            • index.min.js
        • package.json
      • signal-exit
        • dist
          • cjs
            • index.js
          • mjs
            • index.js
        • package.json
      • socks-proxy-agent
        • dist
          • index.js
        • package.json
      • string-width-cjs/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • string-width/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • strip-ansi-cjs/node_modules/ansi-regex
        • index.js
        • license
        • package.json
      • strip-ansi
        • index.js
        • license
        • package.json
      • wrap-ansi-cjs/node_modules
        • ansi-regex
          • index.js
          • license
          • package.json
        • ansi-styles
          • index.js
          • license
          • package.json
        • strip-ansi
          • index.js
          • license
          • package.json
      • wrap-ansi/node_modules
        • ansi-regex
          • index.js
        • ansi-styles
          • index.js
        • strip-ansi
          • index.js
          • license
    • package.json
    • tap-snapshots/test/lib
      • commands
        • search.js.test.cjs
      • utils
        • sbom-cyclonedx.js.test.cjs
        • sbom-spdx.js.test.cjs
    • test/lib
      • commands
        • exec.js
        • hook.js
        • org.js
        • pkg.js
      • utils
        • open-url.js
        • sbom-cyclonedx.js
        • sbom-spdx.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/npm/docs/content/commands/npm-ls.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/commands/npm-ls.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
2727
example, running `npm ls promzard` in npm's source tree will show:
2828

2929
```bash
30-
[email protected].3 /path/to/npm
30+
[email protected].4 /path/to/npm
3131
└─┬ [email protected]
3232
└── [email protected]
3333
```
Collapse file

‎deps/npm/docs/content/commands/npm-prune.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/commands/npm-prune.md
+2-3Lines changed: 2 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ then only packages matching one of the supplied names are removed.
1818
Extraneous packages are those present in the `node_modules` folder that are
1919
not listed as any package's dependency list.
2020

21-
If the `--production` flag is specified or the `NODE_ENV` environment
21+
If the `--omit=dev` flag is specified or the `NODE_ENV` environment
2222
variable is set to `production`, this command will remove the packages
23-
specified in your `devDependencies`. Setting `--no-production` will negate
24-
`NODE_ENV` being set to `production`.
23+
specified in your `devDependencies`.
2524

2625
If the `--dry-run` flag is used then no changes will actually be made.
2726

Collapse file

‎deps/npm/docs/content/commands/npm-view.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/commands/npm-view.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ For example, to show the dependencies of the `ronn` package at version
3232
npm view [email protected] dependencies
3333
```
3434

35+
By default, `npm view` shows data about the current project context (by looking for a `package.json`).
36+
To show field data for the current project use a file path (i.e. `.`):
37+
38+
```bash
39+
npm view . dependencies
40+
```
41+
3542
You can view child fields by separating them with a period.
3643
To view the git repository URL for the latest version of `npm`, you would run the following command:
3744

Collapse file

‎deps/npm/docs/content/commands/npm.md‎

Copy file name to clipboardExpand all lines: deps/npm/docs/content/commands/npm.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
1414

1515
### Version
1616

17-
10.2.3
17+
10.2.4
1818

1919
### Description
2020

Collapse file

‎deps/npm/docs/output/commands/npm-ls.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm-ls.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3>
160160
the results to only the paths to the packages named. Note that nested
161161
packages will <em>also</em> show the paths to the specified packages. For
162162
example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
163-
<pre><code class="language-bash">[email protected].3 /path/to/npm
163+
<pre><code class="language-bash">[email protected].4 /path/to/npm
164164
└─┬ [email protected]
165165
└── [email protected]
166166
</code></pre>
Collapse file

‎deps/npm/docs/output/commands/npm-prune.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm-prune.html
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,9 @@ <h3 id="description">Description</h3>
153153
then only packages matching one of the supplied names are removed.</p>
154154
<p>Extraneous packages are those present in the <code>node_modules</code> folder that are
155155
not listed as any package's dependency list.</p>
156-
<p>If the <code>--production</code> flag is specified or the <code>NODE_ENV</code> environment
156+
<p>If the <code>--omit=dev</code> flag is specified or the <code>NODE_ENV</code> environment
157157
variable is set to <code>production</code>, this command will remove the packages
158-
specified in your <code>devDependencies</code>. Setting <code>--no-production</code> will negate
159-
<code>NODE_ENV</code> being set to <code>production</code>.</p>
158+
specified in your <code>devDependencies</code>.</p>
160159
<p>If the <code>--dry-run</code> flag is used then no changes will actually be made.</p>
161160
<p>If the <code>--json</code> flag is used, then the changes <code>npm prune</code> made (or would
162161
have made with <code>--dry-run</code>) are printed as a JSON object.</p>
Collapse file

‎deps/npm/docs/output/commands/npm-view.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm-view.html
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ <h3 id="description">Description</h3>
161161
<code>0.3.5</code>, you could do the following:</p>
162162
<pre><code class="language-bash">npm view [email protected] dependencies
163163
</code></pre>
164+
<p>By default, <code>npm view</code> shows data about the current project context (by looking for a <code>package.json</code>).
165+
To show field data for the current project use a file path (i.e. <code>.</code>):</p>
166+
<pre><code class="language-bash">npm view . dependencies
167+
</code></pre>
164168
<p>You can view child fields by separating them with a period.
165169
To view the git repository URL for the latest version of <code>npm</code>, you would run the following command:</p>
166170
<pre><code class="language-bash">npm view npm repository.url
Collapse file

‎deps/npm/docs/output/commands/npm.html‎

Copy file name to clipboardExpand all lines: deps/npm/docs/output/commands/npm.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2 id="table-of-contents">Table of contents</h2>
150150
</code></pre>
151151
<p>Note: This command is unaware of workspaces.</p>
152152
<h3 id="version">Version</h3>
153-
<p>10.2.3</p>
153+
<p>10.2.4</p>
154154
<h3 id="description">Description</h3>
155155
<p>npm is the package manager for the Node JavaScript platform. It puts
156156
modules in place so that node can find them, and manages dependency
Collapse file

‎deps/npm/lib/commands/exec.js‎

Copy file name to clipboardExpand all lines: deps/npm/lib/commands/exec.js
+17-8Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,33 @@ class Exec extends BaseCommand {
3434
for (const [name, path] of this.workspaces) {
3535
const locationMsg =
3636
`in workspace ${this.npm.chalk.green(name)} at location:\n${this.npm.chalk.dim(path)}`
37-
await this.callExec(args, { locationMsg, runPath: path })
37+
await this.callExec(args, { name, locationMsg, runPath: path })
3838
}
3939
}
4040

41-
async callExec (args, { locationMsg, runPath } = {}) {
42-
// This is where libnpmexec will look for locally installed packages
41+
async callExec (args, { name, locationMsg, runPath } = {}) {
42+
// This is where libnpmexec will look for locally installed packages at the project level
4343
const localPrefix = this.npm.localPrefix
44+
// This is where libnpmexec will look for locally installed packages at the workspace level
45+
let localBin = this.npm.localBin
46+
let path = localPrefix
4447

4548
// This is where libnpmexec will actually run the scripts from
4649
if (!runPath) {
4750
runPath = process.cwd()
51+
} else {
52+
// We have to consider if the workspace has its own separate versions
53+
// libnpmexec will walk up to localDir after looking here
54+
localBin = resolve(this.npm.localDir, name, 'node_modules', '.bin')
55+
// We also need to look for `bin` entries in the workspace package.json
56+
// libnpmexec will NOT look in the project root for the bin entry
57+
path = runPath
4858
}
4959

5060
const call = this.npm.config.get('call')
5161
let globalPath
5262
const {
5363
flatOptions,
54-
localBin,
5564
globalBin,
5665
globalDir,
5766
chalk,
@@ -79,14 +88,14 @@ class Exec extends BaseCommand {
7988
// copy args so they dont get mutated
8089
args: [...args],
8190
call,
82-
localBin,
83-
locationMsg,
91+
chalk,
8492
globalBin,
8593
globalPath,
94+
localBin,
95+
locationMsg,
8696
output,
87-
chalk,
8897
packages,
89-
path: localPrefix,
98+
path,
9099
runPath,
91100
scriptShell,
92101
yes,
Collapse file

‎deps/npm/lib/commands/outdated.js‎

Copy file name to clipboardExpand all lines: deps/npm/lib/commands/outdated.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const npa = require('npm-package-arg')
66
const pickManifest = require('npm-pick-manifest')
77
const localeCompare = require('@isaacs/string-locale-compare')('en')
88

9-
const ansiTrim = require('strip-ansi')
109
const ArboristWorkspaceCmd = require('../arborist-cmd.js')
1110

1211
class Outdated extends ArboristWorkspaceCmd {
@@ -23,6 +22,7 @@ class Outdated extends ArboristWorkspaceCmd {
2322
]
2423

2524
async exec (args) {
25+
const { default: stripAnsi } = await import('strip-ansi')
2626
const global = resolve(this.npm.globalDir, '..')
2727
const where = this.npm.global
2828
? global
@@ -106,7 +106,7 @@ class Outdated extends ArboristWorkspaceCmd {
106106

107107
const tableOpts = {
108108
align: ['l', 'r', 'r', 'r', 'l'],
109-
stringLength: s => ansiTrim(s).length,
109+
stringLength: s => stripAnsi(s).length,
110110
}
111111
this.npm.output(table(outTable, tableOpts))
112112
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.