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.9.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.9.1
Choose a head ref
  • 15 commits
  • 23 files changed
  • 3 contributors

Commits on Oct 6, 2023

  1. Copy the full SHA
    4f95a27 View commit details
  2. chore: filter node prs by base branch

    This is a fix to allow multiple Node PRs to be open.
    Previously the script would attempt to edit an existing PR but
    PRs to different branches were getting incorrectly edited.
    lukekarrys committed Oct 6, 2023
    Copy the full SHA
    db34bba View commit details
  3. Copy the full SHA
    0c00d9c View commit details
  4. Copy the full SHA
    a2cc6e1 View commit details
  5. chore: benchmark script fixes (#6824)

    This passes the token to the github-script action and now skips the PR workflow for forks in the if statement instead of while running the script
    lukekarrys committed Oct 6, 2023
    Copy the full SHA
    974a5fc View commit details
  6. Copy the full SHA
    d8d6fe1 View commit details
  7. chore: use proxy instead of http-proxy (#6814)

    The proxy package is more spec compliant and works out-of-the-box
    so we no longer have to pass --registry=PROXY to the tests.
    
    The goal here is to make it simpler to help debug #6793.
    lukekarrys committed Oct 6, 2023
    Copy the full SHA
    e79f28f View commit details

Commits on Oct 9, 2023

  1. chore: cleanup release please config

    We have decided in the future we will always bring npm and workspaces
    in and out of prerelease at the same time. Therefore we will only need
    the top-level prelease config for release-please
    lukekarrys committed Oct 9, 2023
    Copy the full SHA
    f6f4e08 View commit details

Commits on Oct 10, 2023

  1. chore: correct publish script tag/version logic

    The publish script will now never attempt to publish a package that already exists.
    The tag to publish to is now only figured out after determining if the package already exists on the registry instead of before.
    This also added a confirmation prompt with a full table of name/version/tag of everything that will be published
    lukekarrys committed Oct 10, 2023

    Verified

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

Commits on Oct 23, 2023

  1. docs: use markdown links instead of html

    This does lose the _target information associated with the links
    but that should be left to the markdown generator generally. In this
    case the npm/documentation repo will decide based on the href whether
    to apply any target or rel attributes to the links.
    lukekarrys committed Oct 23, 2023

    Verified

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

Commits on Oct 26, 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
    1275cae View commit details
  2. fix: add back bin/node-gyp-bin/node-gyp files

    This was an unintended breaking change as part of #6554. The `node-gyp`
    bin files are not used by the CLI directly but they are relied on by
    other tooling. This change is only intended to land on the v9 release
    line.
    
    This partially reverts commit 3a7378d.
    lukekarrys committed Oct 26, 2023

    Verified

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

Commits on Oct 30, 2023

  1. fix: add back bin/node-gyp-bin/node-gyp files

    This is a continuation of #6932. This makes a few more changes
    identified in also porting these changes to v10.
    lukekarrys committed Oct 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0dba79a View commit details
  2. Copy the full SHA
    908ee54 View commit details

Commits on Nov 7, 2023

  1. chore: release 9.9.1

    github-actions[bot] authored and wraithgar committed Nov 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6f9f0a1 View commit details
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
/configure text eol=lf

# our cmd scripts always need to be CRLF
/bin/*.cmd text eol=crlf
/bin/**/*.cmd text eol=crlf

# ignore all line endings in node_modules since we dont control that
/node_modules/** -text
114 changes: 61 additions & 53 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ on:
- '*'
paths:
- lib/**
- workspaces/**/lib/**
issue_comment:
types:
- created
@@ -17,63 +18,70 @@ jobs:
steps:
- name: Incoming Pull Request
if: |
github.event_name == 'pull_request' || (
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == 'npm/cli'
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.issue.state == 'open' &&
startsWith(github.event.comment.body, '@npm-cli-bot benchmark this')
)
env:
# gh cli uses these env vars for owner/repo/token
GH_REPO: "npm/benchmarks"
GITHUB_TOKEN: ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
run: |
EVENT_NAME="${{ github.event_name }}"
OWNER="${{ github.event.repository.owner.login }}"
REPO="${{ github.event.repository.name }}"
PR=""
if [[ "$EVENT_NAME" == "pull_request" ]]; then
if [[ "$GITHUB_TOKEN" == "" ]]; then
echo "No auth - from fork pull request, exiting"
exit 0
fi
PR="${{ github.event.pull_request.number }}"
else
PR="${{ github.event.issue.number }}"
SENDER="${{ github.event.comment.user.login }}"
ROLE=$(gh api repos/${OWNER}/${REPO}/collaborators/${SENDER}/permission -q '.permission')
if [[ "$ROLE" != "admin" ]]; then
echo "${SENDER} is ${ROLE}, not an admin, exiting"
exit 0
fi
# add emoji to comment if user is an admin to signal
# benchmark is running
COMMENT_NODE_ID="${{ github.event.comment.node_id }}"
QUERY='mutation ($inputData:AddReactionInput!) {
addReaction (input:$inputData) {
reaction { content }
}
}'
echo '{
"query": "'${QUERY}'",
"variables": {
"inputData": {
"subjectId": "'"${COMMENT_NODE_ID}"'",
"content": "ROCKET"
}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.BENCHMARK_DISPATCH_TOKEN }}
script: |
const {
payload,
eventName,
repo: { owner, repo },
issue: { number },
} = context
if (eventName === 'issue_comment') {
const res = await github.rest.repos.getCollaboratorPermissionLevel({
owner,
repo,
username: payload.comment.user.login,
})
if (res.data.permission !== 'admin') {
core.info(`Commenter is not an admin, exiting`)
return
}
}' | gh api graphql --input -
fi
EVENT="${EVENT_NAME} ${OWNER}/${REPO}#${PR}"
echo '{
"event_type": "'"$EVENT"'",
"client_payload": {
"pr_id": "'"$PR"'",
"repo": "'"$REPO"'",
"owner": "'"$OWNER"'"
// add emoji to comment if user is an admin to signal benchmark is running
await github.rest.reactions.createForIssueComment({
owner,
repo,
comment_id: payload.comment.node_id,
content: 'rocket',
})
}
}' | gh api repos/{owner}/{repo}/dispatches --input -
const pullRequest = payload.pull_request || await github.rest.pulls.get({
owner,
repo,
pull_number: number,
}).then(r => r.data)
core.info(`Pull request: ${pullRequest.number}`)
core.info(`Base ref: ${pullRequest.base.ref}`)
const matchesRelease = pullRequest.base.ref.match(/^release\/v(\d+)$/)
const targetSpec = matchesRelease ? matchesRelease[1] : 'latest'
core.info(`Target spec: ${targetSpec}`)
const eventType = `"${eventName} ${owner}/${repo}#${pullRequest.number}"`
core.info(`Event type: ${eventType}`)
await github.rest.repos.createDispatchEvent({
owner: 'npm',
repo: 'benchmarks',
event_type: eventType,
client_payload: {
owner,
repo,
pr_id: number,
target_spec: targetSpec,
},
})
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
".": "9.9.0",
".": "9.9.1",
"workspaces/arborist": "6.5.0",
"workspaces/libnpmaccess": "7.0.2",
"workspaces/libnpmdiff": "5.0.20",
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [9.9.1](https://github.com/npm/cli/compare/v9.9.0...v9.9.1) (2023-10-30)

### Bug Fixes

* [`0dba79a`](https://github.com/npm/cli/commit/0dba79a848254ca5e7f02a2ea76f1d4d84dc95d8) [#6942](https://github.com/npm/cli/pull/6942) add back bin/node-gyp-bin/node-gyp files (@lukekarrys)
* [`c93edb5`](https://github.com/npm/cli/commit/c93edb55f52532e666a9ba2719bee0da725fe6f0) [#6932](https://github.com/npm/cli/pull/6932) add back `bin/node-gyp-bin/node-gyp` files (@lukekarrys)

### Documentation

* [`e6cce28`](https://github.com/npm/cli/commit/e6cce28ddd300923f616be4a6fa3946d5e96480c) [#6925](https://github.com/npm/cli/pull/6925) use markdown links instead of html (@lukekarrys)

## [9.9.0](https://github.com/npm/cli/compare/v9.8.1...v9.9.0) (2023-10-06)

### Features
2 changes: 1 addition & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
@@ -720,11 +720,11 @@ graph LR;
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->read-package-json-fast;
npmcli-run-script-->which;
npmcli-smoke-tests-->http-proxy;
npmcli-smoke-tests-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-smoke-tests-->npmcli-mock-registry["@npmcli/mock-registry"];
npmcli-smoke-tests-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-smoke-tests-->npmcli-template-oss["@npmcli/template-oss"];
npmcli-smoke-tests-->proxy;
npmcli-smoke-tests-->tap;
npmcli-smoke-tests-->which;
npmlog-->are-we-there-yet;
6 changes: 6 additions & 0 deletions bin/node-gyp-bin/node-gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
if [ "x$npm_config_node_gyp" = "x" ]; then
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
else
"$npm_config_node_gyp" "$@"
fi
5 changes: 5 additions & 0 deletions bin/node-gyp-bin/node-gyp.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if not defined npm_config_node_gyp (
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
) else (
node "%npm_config_node_gyp%" %*
)
4 changes: 2 additions & 2 deletions docs/lib/content/commands/npm-audit.md
Original file line number Diff line number Diff line change
@@ -81,13 +81,13 @@ The `sig` is generated using the following template: `${package.name}@${package.

Keys response:

- `expires`: null or a simplified extended <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ`
- `expires`: null or a simplified extended [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601"): `YYYY-MM-DDTHH:mm:ss.sssZ`
- `keydid`: sha256 fingerprint of the public key
- `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
- `key`: base64 encoded public key

See this <a href="https://registry.npmjs.org/-/npm/v1/keys" target="_blank">example key's response from the public npm registry</a>.
See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys").

### Audit Endpoints

2 changes: 1 addition & 1 deletion docs/lib/content/commands/npm-team.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ on your `authtype`.

* create / destroy:
Create a new team, or destroy an existing one. Note: You cannot remove the
`developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a>
`developers` team, [learn more.](https://docs.npmjs.com/about-developers-team)

Here's how to create a new team `newteam` under the `org` org:

5 changes: 2 additions & 3 deletions docs/lib/content/commands/npm-unpublish.md
Original file line number Diff line number Diff line change
@@ -8,9 +8,8 @@ description: Remove a package from the registry

<!-- AUTOGENERATED USAGE DESCRIPTIONS -->

To learn more about how the npm registry treats unpublish, see our <a
href="https://docs.npmjs.com/policies/unpublish" target="_blank"
rel="noopener noreferrer"> unpublish policies</a>
To learn more about how the npm registry treats unpublish, see our
[unpublish policies](https://docs.npmjs.com/policies/unpublish).

### Warning

6 changes: 3 additions & 3 deletions node_modules/is-core-module/core.json
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@
"sys": [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"test/reporters": ">= 19.9 && < 20.2",
"node:test/reporters": [">= 19.9", ">= 20"],
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
"node:test": [">= 16.17 && < 17", ">= 18"],
"timers": true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
@@ -149,8 +149,8 @@
"node:v8": [">= 14.18 && < 15", ">= 16"],
"vm": true,
"node:vm": [">= 14.18 && < 15", ">= 16"],
"wasi": [">= 13.4 && < 13.5", ">= 20"],
"node:wasi": ">= 20",
"wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
"node:wasi": [">= 18.17 && < 19", ">= 20"],
"worker_threads": ">= 11.7",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
"zlib": ">= 0.5",
10 changes: 5 additions & 5 deletions node_modules/is-core-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "is-core-module",
"version": "2.12.1",
"version": "2.13.0",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
@@ -45,17 +45,17 @@
"has": "^1.0.3"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.0.1",
"aud": "^2.0.2",
"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.3",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"mock-property": "^1.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.0",
"tape": "^5.6.3"
"semver": "^6.3.1",
"tape": "^5.6.6"
},
"auto-changelog": {
"output": "CHANGELOG.md",
Loading