-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core:release 9.9.2 #6
base: latest
Are you sure you want to change the base?
Changes from 250 commits
5a28a29
64bcf4c
3760dd2
ef381b1
f69052e
49fb9b7
699a1de
ca15992
c16dd4e
4736b0d
2a80dab
9622597
d3a0cfa
9351570
ac98fd3
0e7789b
ee4b3e0
9027266
79f79c7
b8f8b41
39e4da0
60faa90
ee9bf6e
87f6c09
9123de4
7678a3d
6512112
38ed048
9216d59
140b9c9
8eae4b3
ad7ab8c
9333e9d
fc6e291
2ec690d
c209e98
dfa4cab
d531f8b
c77f035
b0ca163
03958c3
78447d7
157d0ae
486d46c
36adff3
ea66e95
dd39de7
4ab6401
469f788
28019d5
03634be
fc68547
08e0c0e
7e04417
2538438
7ca6d84
3cbc258
694dba9
43e6194
f309c1c
e5f1948
06202f0
7f4e667
0708b3b
180b919
c060e60
0e74ee4
9fea383
57ebebf
71cbd91
762888a
5230647
9da5738
104fcb5
7e349f4
bcc781a
1674136
bc4c342
2558283
432efb5
2cffdfe
cadc0f0
2fba4b7
d679ce8
abcbc54
65d76db
a785766
a7145d4
80eec03
356c374
a1b95eb
f76e769
3ec86a0
796971e
f6fff32
4ab6cf4
4cbc2d4
261ea19
63ef498
8ded848
2b7ec54
9c4d3c4
e39d422
ca1a68d
1e375c1
effe910
6dfaebb
8234412
43331e4
f94d672
714e3e1
4c5bf77
18c3b40
e71f541
310a7a5
e2fdb65
a9a6dcd
8b20f8c
7e15b6d
552113e
d440011
18e5312
dade2c8
419f9b9
ff6c5d1
2146e1f
26fefb8
5b2317b
722c0fa
268303c
8d161a4
ea0b07d
1524cfd
e9fdc9a
2ec2e75
67ebb66
d3b9587
56a27fa
58f773c
f078c82
6d456bb
c3d2819
e290352
7c7fba4
bdd2aae
db62910
4e53e33
fd42986
9064ffc
c2b28f9
e189873
8add914
6f64148
e40454c
b54cdb8
b2ce025
76aef74
dcfc3de
cb85973
fec3c94
898bcfd
1cdc662
10256e8
aa5d7b1
badeac2
12f103c
d5c3289
328f63c
ef4c975
3cefdf6
4dfc7d2
61d5771
53cda32
b1db070
9e6686b
9122fb6
7d89b55
fd6479f
2d1d8d0
8f94ae8
e4c7a41
6278fe4
2508a83
5c6759d
18b42a4
41291ba
83fed2e
447a8d7
6574dc9
4b57b95
e3f0fd4
2d84091
4a36d78
6b55646
6109960
4ef4830
04d6910
d185c9b
15be6dd
92e71e6
93883bb
71c6848
2273183
55639ef
a8e666e
ac937d4
29204c8
6f0d7ce
4646768
8b8ce7a
941d0d7
7b584d3
e5451e1
3b8b111
2490b49
6f33d74
3101a40
1c8d41d
094c4ea
76dab91
d8fa116
5e4fa18
1c1adae
dbe7d98
9214be9
a947f25
86b05fc
4e81a6a
91e46a3
a303ddd
1a9ac86
12587fa
4e965ad
a44ab26
2986f4e
7342c24
df58b0c
d7e462b
3fd7a48
ed4add1
24d5350
2404c7e
e674987
8035725
1772276
7e61151
ec105f4
fefd509
366c07e
63d6a73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ module.exports = { | |
ignorePatterns: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains console logs. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains console logs. Please review or remove them. |
||
'docs/**', | ||
'smoke-tests/**', | ||
'mock-globals/**', | ||
'mock-registry/**', | ||
'workspaces/**', | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const { resolve, relative } = require('path') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains console logs. Please review or remove them. |
||
|
||
// Create an override to lockdown a file to es6 syntax only | ||
// and only allow it to require an allowlist of files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. |
||
const rel = (p) => relative(__dirname, resolve(__dirname, p)) | ||
const braces = (a) => a.length > 1 ? `{${a.map(rel).join(',')}}` : a[0] | ||
|
||
const es6Files = (e) => Object.entries(e).map(([file, allow]) => ({ | ||
files: `./${rel(file)}`, | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
}, | ||
rules: Array.isArray(allow) ? { | ||
'node/no-restricted-require': ['error', [{ | ||
name: ['/**', `!${__dirname}/${braces(allow)}`], | ||
message: `This file can only require: ${allow.join(',')}`, | ||
}]], | ||
} : {}, | ||
})) | ||
|
||
module.exports = { | ||
rules: { | ||
'no-console': 'error', | ||
}, | ||
overrides: es6Files({ | ||
'index.js': ['lib/cli.js'], | ||
'bin/npm-cli.js': ['lib/cli.js'], | ||
'lib/cli.js': ['lib/es6/validate-engines.js'], | ||
'lib/es6/validate-engines.js': ['package.json'], | ||
// TODO: This file should also have its requires restricted as well since it | ||
// is an entry point but it currently pulls in config definitions which have | ||
// a large require graph, so that is not currently feasible. A future config | ||
// refactor should keep that in mind and see if only config definitions can | ||
// be exported in a way that is compatible with ES6. | ||
'bin/npx-cli.js': null, | ||
}), | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
/node_modules/** linguist-generated=false | ||
Ishmaello marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. |
||
/package-lock.json linguist-generated=false | ||
# normalize all line endings by default | ||
* text=auto | ||
|
||
# our shell/bin scripts always need to be LF | ||
/bin/* text eol=lf | ||
/workspaces/arborist/bin/index.js text eol=lf | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. |
||
/configure text eol=lf | ||
|
||
# our cmd scripts always need to be CRLF | ||
/bin/**/*.cmd text eol=crlf | ||
|
||
# ignore all line endings in node_modules since we dont control that | ||
/node_modules/** -text | ||
|
||
# the files we write should be LF so they can be generated cross platform | ||
/node_modules/.gitignore text eol=lf | ||
/workspaces/arborist/test/fixtures/.gitignore text eol=lf | ||
/DEPENDENCIES.md text eol=lf | ||
/AUTHORS text eol=lf | ||
|
||
# fixture tarballs should be treated as binary | ||
/workspaces/*/test/fixtures/**/*.tgz binary | ||
|
||
# these hint to GitHub to show these files as not generated so they default to | ||
# showing the full diff in pull requests | ||
/node_modules/** linguist-generated=false | ||
/package-lock.json linguist-generated=false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 🐞 Bug v10 | ||
description: File a bug/issue against v10.x | ||
title: "[BUG] <title>" | ||
labels: [Bug, Needs Triage, Release 10.x] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. |
||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing issue for this? | ||
description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem. | ||
options: | ||
- label: I have searched the existing issues | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: This issue exists in the latest npm version | ||
description: Please make sure you have installed the latest npm and verified it is still an issue. | ||
options: | ||
- label: I am using the latest npm | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Current Behavior | ||
description: A clear & concise description of what you're experiencing. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear & concise description of what you expected to happen. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Steps to reproduce the behavior. | ||
value: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Environment | ||
description: | | ||
examples: | ||
- **`npm -v`**: **npm**: 10.0.0 | ||
- **`node -v`**: **Node.js**: 18.0.0 | ||
- **OS Name**: Ubuntu 20.04 | ||
- **System Model Name**: Macbook Pro | ||
- **`npm config ls`**: `; "user" config from ...` | ||
value: | | ||
- npm: | ||
- Node.js: | ||
- OS Name: | ||
- System Model Name: | ||
- npm config: | ||
```ini | ||
; copy and paste output from `npm config ls` here | ||
``` | ||
validations: | ||
required: false |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,16 @@ jobs: | |
git config --global user.name "npm CLI robot" | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
id: node | ||
with: | ||
node-version: 18.x | ||
node-version: 20.x | ||
check-latest: contains('20.x', '.x') | ||
cache: npm | ||
|
||
- name: Check Git Status | ||
run: node scripts/git-dirty.js | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. |
||
- name: Reset Deps | ||
run: node . run resetdeps -- --package-lock | ||
run: node scripts/resetdeps.js --package-lock | ||
- name: Run Production Audit | ||
run: node . audit --omit=dev | ||
- name: Run Full Audit | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
- '*' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file contains at least one console log. Please remove any present. |
||
paths: | ||
- lib/** | ||
- workspaces/**/lib/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR contains leftover multi-line comments. Please review or remove them. |
||
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, | ||
}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains at least one console log. Please remove any present.