8000 deps: upgrade npm to 10.7.0 · nodejs/node@6e98eee · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6e98eee

Browse files
npm-cli-botaduh95
authored andcommitted
deps: upgrade npm to 10.7.0
PR-URL: #52767 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 0c58d03 commit 6e98eee

File tree

418 files changed

+9123
-16420
lines changed
  • man
  • node_modules
  • tap-snapshots/test/lib
  • test
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    418 files changed

    +9123
    -16420
    lines changed

    deps/npm/bin/npm.ps1

    Lines changed: 18 additions & 21 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,35 +1,32 @@
    11
    #!/usr/bin/env pwsh
    2-
    $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
    32

    4-
    $exe=""
    5-
    if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
    6-
    # Fix case when both the Windows and Linux builds of Node
    7-
    # are installed in the same directory
    8-
    $exe=".exe"
    3+
    $NODE_EXE="$PSScriptRoot/node.exe"
    4+
    if (-not (Test-Path $NODE_EXE)) {
    5+
    $NODE_EXE="$PSScriptRoot/node"
    96
    }
    10-
    $ret=0
    11-
    12-
    $nodeexe = "node$exe"
    13-
    $nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source
    14-
    if ($nodebin -eq $null) {
    15-
    Write-Host "$nodeexe not found."
    16-
    exit 1
    7+
    if (-not (Test-Path $NODE_EXE)) {
    8+
    $NODE_EXE="node"
    179
    }
    18-
    $nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path
    1910

    20-
    $npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js"
    21-
    $npmprefix=(& $nodeexe $npmprefixjs)
    11+
    $NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js"
    12+
    $NPM_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npm-cli.js"
    13+
    $NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS)
    14+
    2215
    if ($LASTEXITCODE -ne 0) {
    2316
    Write-Host "Could not determine Node.js install directory"
    2417
    exit 1
    2518
    }
    26-
    $npmprefixclijs="$npmprefix/node_modules/npm/bin/npm-cli.js"
    19+
    20+
    $NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
    21+
    if (Test-Path $NPM_PREFIX_NPM_CLI_JS) {
    22+
    $NPM_CLI_JS=$NPM_PREFIX_NPM_CLI_JS
    23+
    }
    2724

    2825
    # Support pipeline input
    2926
    if ($MyInvocation.ExpectingInput) {
    30-
    $input | & $nodeexe $npmprefixclijs $args
    27+
    $input | & $NODE_EXE $NPM_CLI_JS $args
    3128
    } else {
    32-
    & $nodeexe $npmprefixclijs $args
    29+
    & $NODE_EXE $NPM_CLI_JS $args
    3330
    }
    34-
    $ret=$LASTEXITCODE
    35-
    exit $ret
    31+
    32+
    exit $LASTEXITCODE

    deps/npm/bin/npx-cli.js

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -26,7 +26,7 @@ const removed = new Set([
    2626

    2727
    const { definitions, shorthands } = require('@npmcli/config/lib/definitions')
    2828
    const npmSwitches = Object.entries(definitions)
    29-
    .filter(([key, { type }]) => type === Boolean ||
    29+
    .filter(([, { type }]) => type === Boolean ||
    3030
    (Array.isArray(type) && type.includes(Boolean)))
    3131
    .map(([key]) => key)
    3232

    deps/npm/bin/npx.ps1

    Lines changed: 18 additions & 21 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,35 +1,32 @@
    11
    #!/usr/bin/env pwsh
    2-
    $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
    32

    4-
    $exe=""
    5-
    if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
    6-
    # Fix case when both the Windows and Linux builds of Node
    7-
    # are installed in the same directory
    8-
    $exe=".exe"
    3+
    $NODE_EXE="$PSScriptRoot/node.exe"
    4+
    if (-not (Test-Path $NODE_EXE)) {
    5+
    $NODE_EXE="$PSScriptRoot/node"
    96
    }
    10-
    $ret=0
    11-
    12-
    $nodeexe = "node$exe"
    13-
    $nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source
    14-
    if ($nodebin -eq $null) {
    15-
    Write-Host "$nodeexe not found."
    16-
    exit 1
    7+
    if (-not (Test-Path $NODE_EXE)) {
    8+
    $NODE_EXE="node"
    179
    }
    18-
    $nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path
    1910

    20-
    $npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js"
    21-
    $npmprefix=(& $nodeexe $npmprefixjs)
    11+
    $NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js"
    12+
    $NPX_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npx-cli.js"
    13+
    $NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS)
    14+
    2215
    if ($LASTEXITCODE -ne 0) {
    2316
    Write-Host "Could not determine Node.js install directory"
    2417
    exit 1
    2518
    }
    26-
    $npmprefixclijs="$npmprefix/node_modules/npm/bin/npx-cli.js"
    19+
    20+
    $NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
    21+
    if (Test-Path $NPM_PREFIX_NPX_CLI_JS) {
    22+
    $NPX_CLI_JS=$NPM_PREFIX_NPX_CLI_JS
    23+
    }
    2724

    2825
    # Support pipeline input
    2926
    if ($MyInvocation.ExpectingInput) {
    30-
    $input | & $nodeexe $npmprefixclijs $args
    27+
    $input | & $NODE_EXE $NPX_CLI_JS $args
    3128
    } else {
    32-
    & $nodeexe $npmprefixclijs $args
    29+
    & $NODE_EXE $NPX_CLI_JS $args
    3330
    }
    34-
    $ret=$LASTEXITCODE
    35-
    exit $ret
    31+
    32+
    exit $LASTEXITCODE

    deps/npm/docs/content/commands/npm-access.md

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@ description: Set access level on published packages
    77
    ### Synopsis
    88

    99
    ```bash
    10-
    npm access list packages [<user>|<scope>|<scope:team> [<package>]
    10+
    npm access list packages [<user>|<scope>|<scope:team>] [<package>]
    1111
    npm access list collaborators [<package> [<user>]]
    1212
    npm access get status [<package>]
    1313
    npm access set status=public|private [<package>]

    deps/npm/docs/content/commands/npm-doctor.md

    Lines changed: 11 additions & 10 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@ description: Check the health of your npm environment
    77
    ### Synopsis
    88

    99
    ```bash
    10-
    npm doctor [ping] [registry] [versions] [environment] [permissions] [cache]
    10+
    npm doctor [connection] [registry] [versions] [environment] [permissions] [cache]
    1111
    ```
    1212

    1313
    Note: This command is unaware of workspaces.
    @@ -38,20 +38,21 @@ there are any recommended changes, it will display them. By default npm
    3838
    runs all of these checks. You can limit what checks are ran by
    3939
    specifying them as extra arguments.
    4040

    41-
    #### `npm ping`
    41+
    #### `Connecting to the registry`
    4242

    4343
    By default, npm installs from the primary npm registry,
    44-
    `registry.npmjs.org`. `npm doctor` hits a special ping endpoint within the
    45-
    registry. This can also be checked with `npm ping`. If this check fails,
    46-
    you may be using a proxy that needs to be configured, or may need to talk
    47-
    to your IT staff to get access over HTTPS to `registry.npmjs.org`.
    44+
    `registry.npmjs.org`. `npm doctor` hits a special connection testing
    45+
    endpoint within the registry. This can also be checked with `npm ping`.
    46+
    If this check fails, you may be using a proxy that needs to be
    47+
    configured, or may need to talk to your IT staff to get access over
    48+
    HTTPS to `registry.npmjs.org`.
    4849

    4950
    This check is done against whichever registry you've configured (you can
    5051
    see what that is by running `npm config get registry`), and if you're using
    5152
    a private registry that doesn't support the `/whoami` endpoint supported by
    5253
    the primary registry, this check may fail.
    5354

    54-
    #### `npm -v`
    55+
    #### `Checking npm version`
    5556

    5657
    While Node.js may come bundled with a particular version of npm, it's the
    5758
    policy of the CLI team that we recommend all users run `npm@latest` if they
    @@ -61,7 +62,7 @@ support releases typically only receive critical security and regression
    6162
    fixes. The team believes that the latest tested version of npm is almost
    6263
    always likely to be the most functional and defect-free version of npm.
    6364

    64-
    #### `node -v`
    65+
    #### `Checking node version`
    6566

    6667
    For most users, in most circumstances, the best version of Node will be the
    6768
    latest long-term support (LTS) release. Those of you who want access to new
    @@ -70,7 +71,7 @@ be running a newer version, and some may be required to run an older
    7071
    version of Node because of enterprise change control policies. That's OK!
    7172
    But in general, the npm team recommends that most users run Node.js LTS.
    7273

    73-
    #### `npm config get registry`
    74+
    #### `Checking configured npm registry`
    7475

    7576
    You may be installing from private package registries for your project or
    7677
    company. That's great! Others may be following tutorials or StackOverflow
    @@ -79,7 +80,7 @@ Sometimes, this may entail changing the registry you're pointing at. This
    7980
    part of `npm doctor` just lets you, and maybe whoever's helping you with
    8081
    support, know that you're not using the default registry.
    8182

    82-
    #### `which git`
    83+
    #### `Checking for git executable in PATH`
    8384

    8485
    While it's documented in the README, it may not be obvious that npm needs
    8586
    Git installed to do many of the things that it does. Also, in some cases

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

    Lines changed: 1 addition & 1 deletion
    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-
    npm@10.5.2 /path/to/npm
    30+
    npm@10.7.0 /path/to/npm
    3131
    └─┬ init-package-json@0.0.4
    3232
    └── promzard@0.1.5
    3333
    ```

    deps/npm/docs/content/commands/npm-profile.md

    Lines changed: 11 additions & 22 deletions
    Original file line numberDiff line numberDiff line change
    @@ -24,28 +24,17 @@ support this interface.
    2424
    * `npm profile get [<property>]`: Display all of the properties of your
    2525
    profile, or one or more specific properties. It looks like:
    2626

    27-
    ```bash
    28-
    +-----------------+---------------------------+
    29-
    | name | example |
    30-
    +-----------------+---------------------------+
    31-
    | email | me@example.com (verified) |
    32-
    +-----------------+---------------------------+
    33-
    | two factor auth | auth-and-writes |
    34-
    +-----------------+---------------------------+
    35-
    | fullname | Example User |
    36-
    +-----------------+---------------------------+
    37-
    | homepage | |
    38-
    +-----------------+---------------------------+
    39-
    | freenode | |
    40-
    +-----------------+---------------------------+
    41-
    | twitter | |
    42-
    +-----------------+---------------------------+
    43-
    | github | |
    44-
    +-----------------+---------------------------+
    45-
    | created | 2015-02-26T01:38:35.892Z |
    46-
    +-----------------+---------------------------+
    47-
    | updated | 2017-10-02T21:29:45.922Z |
    48-
    +-----------------+---------------------------+
    27+
    ```
    28+
    name: example
    29+
    email: e@example.com (verified)
    30+
    two-factor auth: auth-and-writes
    31+
    fullname: Example User
    32+
    homepage:
    33+
    freenode:
    34+
    twitter:
    35+
    github:
    36+
    created: 2015-02-26T01:38:35.892Z
    37+
    updated: 2017-10-02T21:29:45.922Z
    4938
    ```
    5039

    5140
    * `npm profile set <property> <value>`: Set the value of a profile

    deps/npm/docs/content/commands/npm-search.md

    Lines changed: 1 addition & 10 deletions
    Original file line numberDiff line numberDiff line change
    @@ -7,7 +7,7 @@ description: Search for packages
    77
    ### Synopsis
    88

    99
    ```bash
    10-
    npm search [search terms ...]
    10+
    npm search <search term> [<search term> ...]
    1111

    1212
    aliases: find, s, se
    1313
    ```
    @@ -39,15 +39,6 @@ expression characters in most shells.)
    3939

    4040
    ### Configuration
    4141

    42-
    #### `long`
    43-
    44-
    * Default: false
    45-
    * Type: Boolean
    46-
    47-
    Show extended information in `ls`, `search`, and `help-search`.
    48-
    49-
    50-
    5142
    #### `json`
    5243

    5344
    * Default: false

    deps/npm/docs/content/commands/npm-token.md

    Lines changed: 10 additions & 28 deletions
    Original file line numberDiff line numberDiff line change
    @@ -22,24 +22,14 @@ This lets you list, create and revoke authentication tokens.
    2222
    Shows a table of all active authentication tokens. You can request
    2323
    this as JSON with `--json` or tab-separated values with `--parseable`.
    2424

    25-
    ```bash
    26-
    +--------+---------+------------+----------+----------------+
    27-
    | id | token | created | read-only | CIDR whitelist |
    28-
    +--------+---------+------------+----------+----------------+
    29-
    | 7f3134 | 1fa9ba… | 2017-10-02 | yes | |
    30-
    +--------+---------+------------+----------+----------------+
    31-
    | c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 |
    32-
    +--------+---------+------------+----------+----------------+
    33-
    | e0cf92 | 3a436a… | 2017-10-02 | no | |
    34-
    +--------+---------+------------+----------+----------------+
    35-
    | 63eb9d | 74ef35… | 2017-09-28 | no | |
    36-
    +--------+---------+------------+----------+----------------+
    37-
    | 2daaa8 | cbad5f… | 2017-09-26 | no | |
    38-
    +--------+---------+------------+----------+----------------+
    39-
    | 68c2fe | 127e51… | 2017-09-23 | no | |
    40-
    +--------+---------+------------+----------+----------------+
    41-
    | 6334e1 | 1dadd1… | 2017-09-23 | no | |
    42-
    +--------+---------+------------+----------+----------------+
    25+
    ```
    26+
    Read only token npm_1f… with id 7f3134 created 2017-10-21
    27+
    28+
    Publish token npm_af… with id c03241 created 2017-10-02
    29+
    with IP Whitelist: 192.168.0.1/24
    30+
    31+
    Publish token npm_… with id e0cf92 created 2017-10-02
    32+
    4333
    ```
    4434

    4535
    * `npm token create [--read-only] [--cidr=<cidr-ranges>]`:
    @@ -55,16 +45,8 @@ This lets you list, create and revoke authentication tokens.
    5545
    website](https://docs.npmjs.com/creating-and-viewing-access-tokens)
    5646
    for more information on generating automation tokens.
    5747

    58-
    ```bash
    59-
    +----------------+--------------------------------------+
    60-
    | token | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
    61-
    +----------------+--------------------------------------+
    62-
    | cidr_whitelist | |
    63-
    +----------------+--------------------------------------+
    64-
    | readonly | false |
    65-
    +----------------+--------------------------------------+
    66-
    | created | 2017-10-02T07:52:24.838Z |
    67-
    +----------------+--------------------------------------+
    48+
    ```
    49+
    Created publish token a73c9572-f1b9-8983-983d-ba3ac3cc913d
    6850
    ```
    6951

    7052
    * `npm token revoke <token|id>`:

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

    Lines changed: 1 addition & 1 deletion
    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.5.2
    17+
    10.7.0
    1818

    1919
    ### Description
    2020

    0 commit comments

    Comments
     (0)
    0