Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: npm/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.8.0
Choose a base ref
...
head repository: npm/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.8.1
Choose a head ref
  • 16 commits
  • 70 files changed
  • 5 contributors

Commits on Jul 17, 2023

  1. fix: much clearer npx 'canceled' error (#6642)

    Co-authored-by: AaronHamilton965 <91709196+AaronHamilton965@users.noreply.github.com>
    rahulio96 and AaronHamilton965 authored Jul 17, 2023
    Copy the full SHA
    02c7ddb View commit details
  2. docs: Added steps for using npm/npx locally to CONTRIBUTING.md (#6643)

    Co-authored-by: Rahul <122141535+rahulio96@users.noreply.github.com>
    AaronHamilton965 and rahulio96 authored Jul 17, 2023
    Copy the full SHA
    36bf5fe View commit details

Commits on Jul 18, 2023

  1. Copy the full SHA
    9c077d2 View commit details
  2. Copy the full SHA
    c1ffd6a View commit details
  3. chore: disable linting rule in dev workspaces

    npm can't differentiate between workspaces that are devDependencies so
    these workspaces have devDeps set to bypass audit warnings since they
    are ultimately devDeps.  The linting rule won't work here
    wraithgar committed Jul 18, 2023
    1
    Copy the full SHA
    47be5ce View commit details
  4. deps: semver@7.5.4

    wraithgar committed Jul 18, 2023
    Copy the full SHA
    daad9ad View commit details
  5. deps: bin-links@3.0.2

    wraithgar committed Jul 18, 2023
    Copy the full SHA
    fc9a843 View commit details
  6. deps: minimatch@9.0.3

    wraithgar committed Jul 18, 2023
    Copy the full SHA
    44d60eb View commit details
  7. deps: chalk@5.3.0

    wraithgar committed Jul 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f45498b View commit details
  8. deps: supports-color@9.4.0

    wraithgar committed Jul 18, 2023
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    24f5a8b View commit details
  9. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    352ae82 View commit details
  10. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3829998 View commit details
  11. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a0763d3 View commit details
  12. 1
    Copy the full SHA
    38351c9 View commit details
  13. chore(deps): bump tough-cookie from 4.1.2 to 4.1.3

    Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
    - [Release notes](https://github.com/salesforce/tough-cookie/releases)
    - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
    - [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3)
    
    ---
    updated-dependencies:
    - dependency-name: tough-cookie
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and wraithgar committed Jul 18, 2023
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8ecbcb9 View commit details

Commits on Jul 19, 2023

  1. chore: release 9.8.1

    github-actions[bot] authored and wraithgar committed Jul 19, 2023
    1
    Copy the full SHA
    facda25 View commit details
Showing with 1,001 additions and 500 deletions.
  1. +1 −1 .github/workflows/ci-libnpmaccess.yml
  2. +1 −1 .github/workflows/ci-libnpmdiff.yml
  3. +1 −1 .github/workflows/ci-libnpmexec.yml
  4. +1 −1 .github/workflows/ci-libnpmfund.yml
  5. +1 −1 .github/workflows/ci-libnpmhook.yml
  6. +1 −1 .github/workflows/ci-libnpmorg.yml
  7. +1 −1 .github/workflows/ci-libnpmpack.yml
  8. +1 −1 .github/workflows/ci-libnpmpublish.yml
  9. +1 −1 .github/workflows/ci-libnpmsearch.yml
  10. +1 −1 .github/workflows/ci-libnpmteam.yml
  11. +1 −1 .github/workflows/ci-libnpmversion.yml
  12. +1 −1 .github/workflows/ci-npmcli-arborist.yml
  13. +1 −1 .github/workflows/ci-npmcli-config.yml
  14. +1 −1 .github/workflows/ci-npmcli-docs.yml
  15. +1 −1 .github/workflows/ci-npmcli-mock-globals.yml
  16. +1 −1 .github/workflows/ci-npmcli-mock-registry.yml
  17. +1 −1 .github/workflows/ci-npmcli-smoke-tests.yml
  18. +6 −6 .github/workflows/ci-release.yml
  19. +1 −1 .github/workflows/ci.yml
  20. +2 −2 .github/workflows/codeql-analysis.yml
  21. +3 −1 .github/workflows/pull-request.yml
  22. +5 −6 .github/workflows/release.yml
  23. +2 −2 .release-please-manifest.json
  24. +2 −0 AUTHORS
  25. +22 −0 CHANGELOG.md
  26. +22 −0 CONTRIBUTING.md
  27. +4 −2 DEPENDENCIES.md
  28. +5 −0 docs/.eslintrc.local.json
  29. +2 −2 docs/package.json
  30. +10 −3 lib/commands/publish.js
  31. +2 −2 mock-globals/package.json
  32. +5 −0 mock-registry/.eslintrc.local.json
  33. +2 −2 mock-registry/package.json
  34. +0 −2 node_modules/@npmcli/package-json/lib/index.js
  35. +211 −25 node_modules/@npmcli/package-json/lib/normalize.js
  36. +6 −5 node_modules/@npmcli/package-json/package.json
  37. +1 −1 node_modules/bin-links/lib/link-gently.js
  38. +4 −3 node_modules/bin-links/package.json
  39. +4 −2 node_modules/chalk/package.json
  40. +2 −1 node_modules/chalk/source/vendor/supports-color/index.js
  41. +47 −24 node_modules/minimatch/dist/cjs/ast.js
  42. +47 −24 node_modules/minimatch/dist/mjs/ast.js
  43. +3 −3 node_modules/minimatch/package.json
  44. +4 −1 node_modules/semver/classes/range.js
  45. +5 −0 node_modules/semver/internal/constants.js
  46. +32 −13 node_modules/semver/internal/re.js
  47. +3 −3 node_modules/semver/package.json
  48. +1 −1 node_modules/supports-color/index.js
  49. +5 −6 node_modules/supports-color/package.json
  50. +307 −290 package-lock.json
  51. +14 −12 package.json
  52. +13 −6 scripts/template-oss/root.js
  53. +2 −2 smoke-tests/package.json
  54. +105 −0 tap-snapshots/test/lib/commands/publish.js.test.cjs
  55. +35 −0 test/lib/commands/exec.js
  56. +2 −2 workspaces/arborist/package.json
  57. +2 −2 workspaces/config/package.json
  58. +2 −2 workspaces/libnpmaccess/package.json
  59. +2 −2 workspaces/libnpmdiff/package.json
  60. +6 −0 workspaces/libnpmexec/CHANGELOG.md
  61. +5 −3 workspaces/libnpmexec/lib/index.js
  62. +3 −3 workspaces/libnpmexec/package.json
  63. +2 −2 workspaces/libnpmfund/package.json
  64. +2 −2 workspaces/libnpmhook/package.json
  65. +2 −2 workspaces/libnpmorg/package.json
  66. +2 −2 workspaces/libnpmpack/package.json
  67. +2 −2 workspaces/libnpmpublish/package.json
  68. +2 −2 workspaces/libnpmsearch/package.json
  69. +2 −2 workspaces/libnpmteam/package.json
  70. +2 −2 workspaces/libnpmversion/package.json
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmaccess.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmaccess/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmaccess/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmdiff.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmdiff/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmdiff/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmexec.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmexec/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmexec/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmfund.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmfund/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmfund/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmhook.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmhook/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmhook/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmorg.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmorg/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmorg/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmpack.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmpack/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmpack/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmpublish.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmpublish/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmpublish/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmsearch.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmsearch/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmsearch/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmteam.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmteam/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmteam/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-libnpmversion.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/libnpmversion/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/libnpmversion/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-arborist.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/arborist/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/arborist/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-config.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- workspaces/config/**
push:
branches:
- main
- latest
- release/v*
paths:
- workspaces/config/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-docs.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- docs/**
push:
branches:
- main
- latest
- release/v*
paths:
- docs/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-mock-globals.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- mock-globals/**
push:
branches:
- main
- latest
- release/v*
paths:
- mock-globals/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-mock-registry.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- mock-registry/**
push:
branches:
- main
- latest
- release/v*
paths:
- mock-registry/**
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/ci-npmcli-smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ on:
- smoke-tests/**
push:
branches:
- main
- latest
- release/v*
paths:
- smoke-tests/**
schedule:
12 changes: 6 additions & 6 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ jobs:
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
id: check
if: inputs.check-sha
with:
@@ -92,7 +92,7 @@ jobs:
- name: Post Lint
run: node . run postlint --ignore-scripts -ws -iwr --if-present
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
if: steps.check.outputs.check_id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -161,7 +161,7 @@ jobs:
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
id: check
if: inputs.check-sha
with:
@@ -194,7 +194,7 @@ jobs:
- name: Check Git Status
run: node scripts/git-dirty.js
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
if: steps.check.outputs.check_id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -264,7 +264,7 @@ jobs:
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
id: check
if: inputs.check-sha
with:
@@ -312,7 +312,7 @@ jobs:
exit 1
fi
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
if: steps.check.outputs.check_id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ on:
- workspaces/**
push:
branches:
- main
- latest
- release/v*
paths-ignore:
- docs/**
- smoke-tests/**
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -5,12 +5,12 @@ name: CodeQL
on:
push:
branches:
- main
- latest
- release/v*
pull_request:
branches:
- main
- latest
- release/v*
schedule:
# "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1
- cron: "0 10 * * 1"
4 changes: 3 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -43,5 +43,7 @@ jobs:
npx --offline commitlint -V --from 'origin/${{ github.base_ref }}' --to ${{ github.event.pull_request.head.sha }}
- name: Run Commitlint on PR Title
if: steps.commit.outcome == 'failure'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo '${{ github.event.pull_request.title }}' | npx --offline commitlint -V
echo "$PR_TITLE" | npx --offline commitlint -V
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ on:
type: string
push:
branches:
- main
- latest
- release/v*

@@ -77,7 +76,7 @@ jobs:
let commentId = comments.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith(body))?.id
body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Update This Release\n\n`
body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`latest\`. `
body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`${REF_NAME}\`. `
body += `To force CI to update this PR, run this command:\n\n`
body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME} -R ${owner}/${repo} -f release-pr=${issue_number}\n\`\`\``
@@ -123,7 +122,7 @@ jobs:
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
id: check
if: steps.release.outputs.pr-sha
with:
@@ -213,7 +212,7 @@ jobs:
return { summary }
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
id: check
if: steps.commit.outputs.sha
with:
@@ -223,7 +222,7 @@ jobs:
sha: ${{ steps.commit.outputs.sha }}
output: ${{ steps.check-output.outputs.result }}
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
if: needs.release.outputs.check-id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
@@ -261,7 +260,7 @@ jobs:
fi
echo "result=$result" >> $GITHUB_OUTPUT
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
uses: LouisBrunner/checks-action@v1.6.0
if: needs.update.outputs.check-id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
".": "9.8.0",
".": "9.8.1",
"workspaces/arborist": "6.3.0",
"workspaces/libnpmaccess": "7.0.2",
"workspaces/libnpmdiff": "5.0.19",
"workspaces/libnpmexec": "6.0.2",
"workspaces/libnpmexec": "6.0.3",
"workspaces/libnpmfund": "4.0.19",
"workspaces/libnpmhook": "9.0.3",
"workspaces/libnpmorg": "5.0.4",
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -888,3 +888,5 @@ may <63159454+m4rch3n1ng@users.noreply.github.com>
Rayyan Ul Haq <31252332+Rayyan98@users.noreply.github.com>
DaviDevMod <98312056+DaviDevMod@users.noreply.github.com>
Mike Ribbons <mribbons@gmail.com>
Rahul <122141535+rahulio96@users.noreply.github.com>
AaronHamilton965 <91709196+AaronHamilton965@users.noreply.github.com>
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [9.8.1](https://github.com/npm/cli/compare/v9.8.0...v9.8.1) (2023-07-18)

### Bug Fixes

* [`38351c9`](https://github.com/npm/cli/commit/38351c954040ddea56dc5db453f7f7d10964e5cd) [#6651](https://github.com/npm/cli/pull/6651) warn on autocorrected package.json entries during publish (@wraithgar)
* [`02c7ddb`](https://github.com/npm/cli/commit/02c7ddb4501682c9e84b8c1325638b7db1ca7deb) [#6642](https://github.com/npm/cli/pull/6642) much clearer npx 'canceled' error (#6642) (@rahulio96, @AaronHamilton965)

### Documentation

* [`36bf5fe`](https://github.com/npm/cli/commit/36bf5fe2a0a2ef7f7ffc0b302eea15e227556010) [#6643](https://github.com/npm/cli/pull/6643) Added steps for using npm/npx locally to CONTRIBUTING.md (#6643) (@AaronHamilton965, @rahulio96)

### Dependencies

* [`a0763d3`](https://github.com/npm/cli/commit/a0763d38d8934a6769e5aac08539291c5051f36e) [#6651](https://github.com/npm/cli/pull/6651) `@npmcli/package-json@4.0.1`
* [`24f5a8b`](https://github.com/npm/cli/commit/24f5a8b07909710e06f5aa3844d99c03cce0b9ca) [#6653](https://github.com/npm/cli/pull/6653) `supports-color@9.4.0`
* [`f45498b`](https://github.com/npm/cli/commit/f45498b33550d3874b9602ef027f215ea2590124) [#6653](https://github.com/npm/cli/pull/6653) `chalk@5.3.0`
* [`44d60eb`](https://github.com/npm/cli/commit/44d60eb0c4ee0456ee4c9f855f06348cfb4c0f9c) [#6653](https://github.com/npm/cli/pull/6653) `minimatch@9.0.3`
* [`fc9a843`](https://github.com/npm/cli/commit/fc9a843f59ec4c1733d427566b9df9a4b440bb7f) [#6653](https://github.com/npm/cli/pull/6653) `bin-links@3.0.2`
* [`daad9ad`](https://github.com/npm/cli/commit/daad9addc1e2587d162e06016498252cf0b6514a) [#6653](https://github.com/npm/cli/pull/6653) `semver@7.5.4`
* [`c1ffd6a`](https://github.com/npm/cli/commit/c1ffd6a2f91cdb5c8d3cd7524a3136346181f67f) [#6653](https://github.com/npm/cli/pull/6653) move @npmcli/fs, @npmcli/promise-spawn into dependencies
* [Workspace](https://github.com/npm/cli/releases/tag/libnpmexec-v6.0.3): `libnpmexec@6.0.3`

## [9.8.0](https://github.com/npm/cli/compare/v9.7.2...v9.8.0) (2023-07-05)

### Features
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -48,6 +48,28 @@ We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

We use [`tap`](https://node-tap.org/) for testing & expect that every new feature or bug fix comes with corresponding tests that validate the solutions. Tap also reports on code coverage and it will fail if that drops below 100%.

To run your repository's version of the npm cli on your local machine use the following commands:

**npm commands:**
```bash
node . <command>
```

**npx commands:**
```bash
node . exec
```

For example instead of:
```bash
npm exec -- <package>
```
Use:
```bash
node . exec -- <package>
```


## Performance & Benchmarks

We've set up an automated [benchmark](https://github.com/npm/benchmarks) integration that will run against all Pull Requests; Posting back a comment with the results of the run.
Loading