Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1821 commits
Select commit Hold shift + click to select a range
6b4c5f9
deps: @npmcli/run-script@10.0.0
wraithgar Sep 17, 2025
da81a37
deps: cacache@20.0.1
wraithgar Sep 17, 2025
6221e27
deps: @npmcli/metavuln-calculator@9.0.2
wraithgar Sep 17, 2025
b5bd5e3
deps: npm-profile@12.0.0
wraithgar Sep 17, 2025
1149971
deps: npm-registry-fetch@19.0.0
wraithgar Sep 17, 2025
a2bdecc
deps: sigstore@4.0.0
wraithgar Sep 17, 2025
1f85f94
deps: @sigstore/tuf@4.0.0
wraithgar Sep 17, 2025
66f64eb
deps: make-fetch-happen@15.0.2
wraithgar Sep 17, 2025
633c4ed
deps: hosted-git-info@9.0.0
wraithgar Sep 17, 2025
0082083
deps: normalize-package-data@8.0.0
wraithgar Sep 17, 2025
9392488
deps: npm-package-manifest@11.0.1
wraithgar Sep 17, 2025
bf6b686
deps: npm-package-arg@13.0.0
wraithgar Sep 17, 2025
521823b
deps: @npmcli/git@7.0.0
wraithgar Sep 18, 2025
ea7ca5f
deps: lru-cache@11.2.1
wraithgar Sep 18, 2025
24252a1
deps: @npmcli/agent@4.0.0
wraithgar Sep 18, 2025
38fa2c2
deps: negotiator@1.0.0
wraithgar Sep 18, 2025
79a4e67
deps: minizlib@3.0.2
wraithgar Sep 18, 2025
817f0b1
deps: ignore-walk@8.0.0
wraithgar Sep 18, 2025
1676626
deps: glob@11.0.3
wraithgar Sep 18, 2025
ac33497
deps: mkdirp@3.0.1
wraithgar Sep 18, 2025
566f1b7
deps: minimatch@10.0.3
wraithgar Sep 18, 2025
9f9146f
chore: @tufjs/repo-mock@4.0.0
wraithgar Sep 18, 2025
d4eef14
deps: rimraf@6.0.1
wraithgar Sep 18, 2025
dfd034e
deps: @npmcli/promise-spawn@8.0.3
wraithgar Sep 18, 2025
34bafd1
deps: node-gyp@11.4.2
wraithgar Sep 18, 2025
9519f18
deps: npm-install-checks@7.1.2
wraithgar Sep 18, 2025
6a392f3
deps: tinyglobby@0.2.15
wraithgar Sep 18, 2025
5516583
deps: socks@2.8.7
wraithgar Sep 18, 2025
5f6664b
deps: spdx-license-ids@3.0.22
wraithgar Sep 18, 2025
46035db
deps: debug@4.4.3
wraithgar Sep 18, 2025
c5157c9
deps: chalk@5.6.2
wraithgar Sep 18, 2025
09a7494
deps: supports-color@10.2.2
wraithgar Sep 18, 2025
3b43bf7
chore: dev dependency updates
wraithgar Sep 18, 2025
6e4d673
deps: isexe@3.1.1
wraithgar Sep 18, 2025
099238a
deps: fdir@6.5.0
wraithgar Sep 18, 2025
48285e0
deps: add fdir, isexe, and picomatch to node_modules
wraithgar Sep 18, 2025
402a0ab
chore: @npmcli/template-oss@4.25.1
wraithgar Sep 18, 2025
ef87ec6
deps: diff@8.0.2
wraithgar Sep 18, 2025
6afdda9
chore: ajv-formats@3.0.1
wraithgar Sep 18, 2025
07bf540
deps: is-cidr@6.0.0
wraithgar Sep 18, 2025
0f41bac
deps: tiny-relative-date@2.0.2
wraithgar Sep 18, 2025
05301a4
chore: remark@15.0.1
wraithgar Sep 18, 2025
93d190b
chore: remark-parse@11.0.0
wraithgar Sep 18, 2025
4a46b5a
chore: remark-github@12.0.0
wraithgar Sep 18, 2025
208cb93
chore: remark-gfm@4.0.1
wraithgar Sep 18, 2025
1c6bb4c
chore: rehype-stringify@10.0.1
wraithgar Sep 18, 2025
30fe3ba
chore: remark-man@9.0.0
wraithgar Sep 18, 2025
064deb3
chore: remark-rehype@11.1.2
wraithgar Sep 18, 2025
420a569
chore: unified@11.0.5
wraithgar Sep 18, 2025
0d00fd8
chore: jsdom@27.0.0
wraithgar Sep 18, 2025
ea15731
deps: binary-extensions@3.1.0
wraithgar Sep 23, 2025
4059dfa
chore: properly use arborist and cache in test
owlstronaut Sep 22, 2025
7eb5c09
chore: update package-lock with peer flag fixes
wraithgar Sep 23, 2025
60aa94b
fix: attach path to json parse error
wraithgar Sep 23, 2025
849dcb6
deps: tar@7.5.1 (#8589)
wraithgar Sep 23, 2025
c4ba7f4
chore: release 11.6.1
github-actions[bot] Sep 23, 2025
f73e65d
chore: fix build url code for remark-github@12 (#8592)
wraithgar Sep 25, 2025
79e3c1e
fix: use @npmcli/package-json to normalize package data
wraithgar Sep 25, 2025
fe9484a
deps: remove normalize-package-data
wraithgar Sep 25, 2025
bb4b739
chore: remove stale comment (#8598)
jsoref Sep 26, 2025
91393de
chore: Update references for arborist to cli (#8599)
jsoref Sep 26, 2025
180e9f7
chore: fix spelling in workspaces/arborist (#8610)
jsoref Sep 29, 2025
6c4c387
chore: Fix spelling in workspaces/libnpmdiff (#8609)
jsoref Sep 29, 2025
7455fc0
chore: Fix spelling in workspaces/config (#8608)
jsoref Sep 29, 2025
7f1c3a3
chore: fix spelling - permissions (#8606)
jsoref Sep 29, 2025
62d73e7
chore: remove references to benchmarks workflow (#8601)
jsoref Sep 29, 2025
ac9143e
chore: Improve link accessibility for screen reader users (#8604)
jsoref Sep 29, 2025
7fbe07a
docs: clean up deprecated `npm access` commands (#8603)
jsoref Sep 29, 2025
13d8df6
fix: optional set calculation (#8537)
liamcmitchell Sep 29, 2025
1b0429a
docs: Fix spelling (#8607)
jsoref Sep 30, 2025
c3e1790
chore: Remove reference to nonexistent calendar (#8605)
jsoref Sep 30, 2025
54fd27f
fix: refactor node.ideallyInert to node.inert (#8602)
liamcmitchell Sep 30, 2025
f6028e6
fix: skip redacting urls meant for opening by the user (#8614)
wraithgar Sep 30, 2025
6324370
docs: fix spelling (#8616)
jsoref Oct 1, 2025
dd884e3
fix: spelling (#8618)
jsoref Oct 1, 2025
17ddc0d
chore: fix spelling (#8622)
jsoref Oct 1, 2025
9197995
fix: spelling (#8619)
jsoref Oct 1, 2025
5ac3678
fix: spelling in ./lib and ./test/lib (#8617)
jsoref Oct 1, 2025
0a8b8c2
fix: typo bugs and other spelling fixes (#8621)
jsoref Oct 1, 2025
f367507
fix: spelling (#8624)
jsoref Oct 1, 2025
5e0909b
chore: fix spelling in workspaces (#8620)
jsoref Oct 1, 2025
d62c5fe
fix: spelling in workspaces/libnpmexec (#8625)
jsoref Oct 1, 2025
8e5d204
chore: fix spelling: different (#8626)
jsoref Oct 1, 2025
67cfaf3
chore: fix spelling: different (#8627)
jsoref Oct 1, 2025
d352e27
fix: do not redact notice logs going to stdout (#8629)
wraithgar Oct 2, 2025
9ceb9c1
docs: rewrap markdown (#8636)
jsoref Oct 4, 2025
0469c5e
docs: rewrap markdown (#8639)
jsoref Oct 5, 2025
1fde042
docs: rewrap markdown (#8640)
jsoref Oct 5, 2025
268e4f8
docs: rewrap markdown (#8642)
jsoref Oct 5, 2025
e8de81b
chore: Add automatically generated annotation to dependencies.md (#8643)
jsoref Oct 5, 2025
c54d1e9
fix: progress bar code cleanup (#8633)
wraithgar Oct 6, 2025
5b4a7fc
fix: handle missing node-gyp gracefully in @npmcli/config definitions
owlstronaut Oct 6, 2025
9aa4fa6
deps: semver@7.7.3
wraithgar Oct 8, 2025
f577504
deps: npm-packlist@10.0.2
wraithgar Oct 8, 2025
8044e07
deps: npm-package-arg@13.0.1
wraithgar Oct 8, 2025
a33f106
deps: lru-cache@11.2.2
wraithgar Oct 8, 2025
bdaf323
deps: is-cidr@6.0.1
wraithgar Oct 8, 2025
f255c92
deps: hosted-git-info@9.0.2
wraithgar Oct 8, 2025
c5191b5
deps: ci-info@4.3.1
wraithgar Oct 8, 2025
b3409f4
chore: dev dependency updates
wraithgar Oct 8, 2025
c31de22
deps: downgrade ci-info to 4.3.0 (#8661)
wraithgar Oct 8, 2025
b05461b
deps: @sigstore/sign@4.0.1 (#8663)
bdehamer Oct 8, 2025
fa7cc6f
deps: ci-info@4.3.1 (#8662)
wraithgar Oct 8, 2025
0722535
chore: release 11.6.2
github-actions[bot] Oct 8, 2025
b1aee62
fix: dep flag calculation (#8645)
liamcmitchell Oct 13, 2025
679486b
chore: fix lockfile (#8672)
wraithgar Oct 13, 2025
49a4eef
fix: use look behind regex for trailing slash stripping (#8676)
wraithgar Oct 15, 2025
4bff14b
chore: write tarball to testDir (#8670)
wraithgar Oct 15, 2025
05319f0
fix: code cleanup (#8677)
wraithgar Oct 16, 2025
06510a8
docs: add ignore-scripts option to npm version help and docs (#8683)
Tejas242 Oct 20, 2025
11dbd7e
fix: display full token when creating authentication tokens (#8709)
MaxBlack-dev Nov 3, 2025
cbc6fa9
fix: order of version information in error message (#8731)
piotrd Nov 13, 2025
a3b5559
Fix typos in some files
namkhanh20xx Nov 15, 2025
7a419df
deps: @npmcli/map-workspaces@5.0.1
wraithgar Nov 4, 2025
bcc7ec8
deps: @npmcli/metavuln-calculator@9.0.3
wraithgar Nov 4, 2025
d6830f4
deps: @npmcli/run-script@10.0.2
wraithgar Nov 4, 2025
d347329
deps: exponential-backoff@3.1.3
wraithgar Nov 4, 2025
b96e86c
deps: minimatch@10.1.1
wraithgar Nov 4, 2025
2a3c338
deps: node-gyp@11.5.0
wraithgar Nov 4, 2025
0e042ec
deps: npm-packlist@10.0.3
wraithgar Nov 4, 2025
de619a4
deps: npm-pick-manifest@11.0.3
wraithgar Nov 4, 2025
1bb9a7d
deps: npm-profile@12.0.1
wraithgar Nov 4, 2025
5383f3a
deps: npm-registry-fetch@19.1.0
wraithgar Nov 4, 2025
89e14d3
deps: tar@7.5.2
wraithgar Nov 4, 2025
542fcf3
deps: @npmcli/node-gyp@5.0.0
wraithgar Nov 4, 2025
3404dca
deps: npm-install-checks@8.0.0
wraithgar Nov 4, 2025
00d9c7d
deps: nopt@9.0.0
wraithgar Nov 4, 2025
a085745
deps: abbrev@4.0.0
wraithgar Nov 4, 2025
a1b0fea
deps: @npmcli/name-from-folder@4.0.0
wraithgar Nov 4, 2025
041b9b2
deps: parse-conflict-json@5.0.1
wraithgar Nov 4, 2025
9c0cefa
deps: json-parse-even-better-errors@5.0.0
wraithgar Nov 4, 2025
c02ce5c
deps: @npmcli/package-json@7.0.2
wraithgar Nov 4, 2025
32bdd83
chore: fix package-lock
wraithgar Nov 4, 2025
0a74f6d
deps: bin-links@6.0.0
wraithgar Nov 5, 2025
05ac7a7
deps: proc-log@6.0.0
wraithgar Nov 5, 2025
6cb77df
deps: @npmcli/installed-package-contents@4.0.0
wraithgar Nov 5, 2025
4811a86
deps: @npmcli/run-script@10.0.3
wraithgar Nov 13, 2025
34d8599
deps: npm-registry-fetch@19.1.1
wraithgar Nov 13, 2025
c6d109d
deps: make-fetch-happen@15.0.3
wraithgar Nov 13, 2025
89c4151
deps: @npmcli/git@7.0.1
wraithgar Nov 13, 2025
578abad
deps: node-gyp@12.1.0
wraithgar Nov 13, 2025
59b3c6a
deps: @npmcli/redact@4.0.0
wraithgar Nov 13, 2025
0b7274f
deps: pacote@21.0.4
wraithgar Nov 13, 2025
8cc9f70
deps: ssri@13.0.0
wraithgar Nov 13, 2025
b7c9f96
deps: @npmcli/promise-spawn@9.0.0
wraithgar Nov 13, 2025
e49286e
deps: ini@5.0.0
wraithgar Nov 13, 2025
599c819
deps: which@6.0.0
wraithgar Nov 13, 2025
aa1d486
deps: @npmcli/promise-spawn@9.0.1
wraithgar Nov 13, 2025
6b1fbe1
deps: npm-package-arg@13.0.2
wraithgar Nov 13, 2025
41e97c6
deps: validate-npm-package-name@7.0.0
wraithgar Nov 13, 2025
7ac9db8
deps: init-package-json@8.2.3
wraithgar Nov 17, 2025
7f72238
deps: cacache@20.0.2
wraithgar Nov 17, 2025
e9f0418
fix(arborist): improve override conflict detection with semantic comp…
Artur- Nov 18, 2025
c6242d9
fix: change npm profile to create tokens with GAT support (#8706)
owlstronaut Nov 18, 2025
3439a89
fix(libnpmexec): fix lock compromise logic (#8733)
jenseng Nov 18, 2025
e71ca0e
docs: add --save flag to documentation (#8746)
MaxBlack-dev Nov 19, 2025
ca53c21
docs: add workspace usage examples (#8745)
MaxBlack-dev Nov 19, 2025
3225fa3
fix: fix usage of path of custom registry (#8737)
flj2mu2 Nov 19, 2025
7da8fdd
chore: release 11.6.3
github-actions[bot] Nov 19, 2025
958b10e
fix: move config.list to a getter (#8761)
wraithgar Nov 20, 2025
664ac34
deps: @npmcli/package-json@7.0.4
owlstronaut Nov 21, 2025
224afa2
deps: @npmcli/map-workspaces@5.0.3
owlstronaut Nov 21, 2025
00511d4
deps: @npmcli/cacache@20.0.3
owlstronaut Nov 21, 2025
4a11146
deps: glob@13.0.0
owlstronaut Nov 21, 2025
58650dc
deps: @npmcli/fs@5.0.0
owlstronaut Nov 21, 2025
6430446
deps: npm-audit-report@7.0.0
owlstronaut Nov 21, 2025
a4aa218
deps: npm-user-validate@4.0.0
owlstronaut Nov 21, 2025
7f8e237
deps: p-map@7.0.4
owlstronaut Nov 21, 2025
6e5bfd9
deps: init-package-json@8.2.4
owlstronaut Nov 21, 2025
e2ac092
deps: read@5.0.1
owlstronaut Nov 21, 2025
9d77b84
deps: @npmcli/installed-package-contents@4.0.0
owlstronaut Nov 21, 2025
2d15040
deps: @npmcli/query@5.0.0
owlstronaut Nov 21, 2025
f51e4aa
deps: nopt@9.0.0
owlstronaut Nov 21, 2025
f963223
deps: proggy@4.0.0
owlstronaut Nov 21, 2025
8d72bc9
docs: add os, cpu, and funding fields to package-lock.json
Nov 19, 2025
1e51a25
docs: fix lifecycle event order for prepare script
Nov 19, 2025
17e154c
docs: standardize env vars to uppercase convention
Nov 19, 2025
22cddb8
docs: add workspace dependencies example to workspaces
Nov 19, 2025
1333d57
docs: clarify .npmrc naming convention for environment variable overr…
MaxBlack-dev Nov 25, 2025
1b1e227
docs: remove outdated roadmap link (#8750)
MaxBlack-dev Nov 25, 2025
dfb83c7
docs: add example for keywords field (#8749)
MaxBlack-dev Nov 25, 2025
b118364
fix: undefined override set conflicts shouldn't error
owlstronaut Nov 20, 2025
f56bb13
deps: proc-log@6.1.0 (#8779)
wraithgar Nov 25, 2025
5271485
chore: release 11.6.4
github-actions[bot] Nov 25, 2025
0c0faae
fix(adduser): improve email prompt (#8780)
mbtools Nov 26, 2025
b380d15
feat: add deduping to notices unless in verbose+ mode
owlstronaut Oct 24, 2025
4a32606
docs: updates the token create documentation (#8785)
owlstronaut Nov 26, 2025
73688ca
docs: clarify npm version behavior with prerelease versions (#8735)
yashwantbezawada Dec 1, 2025
ffc9b71
docs(npm-install): clarify --tag does not override package.json (#8801)
MaxBlack-dev Dec 1, 2025
35e8d38
fix: properly handle newlines with input when using the spinner (#8322)
mbtools Dec 1, 2025
a367f9b
docs(package-lock-json): clarify that version field may be omitted fo…
Nov 30, 2025
95d25cd
docs(package-json): clarify repository field normalization during pub…
Nov 30, 2025
4864dd4
docs(npm-install): document engines field priority when installing pa…
Nov 30, 2025
4850639
docs(package-json): add examples for replacing dependencies with fork…
Nov 30, 2025
2fc689d
docs: add field access patterns to npm view
Nov 29, 2025
a864f80
docs: document gypfile field in package.json
Nov 29, 2025
090b6ca
docs(npx): clarify that arguments are passed to executed command
Nov 30, 2025
1298530
docs: clarify version field can be omitted in package-lock
Nov 30, 2025
39c2f2e
docs: add examples for command line flags including --prefix
Nov 30, 2025
9f818e8
docs(npm-view): clarify object property access syntax and provide exa…
Nov 30, 2025
58afdcc
docs(install): clarify prerelease version range behavior
Nov 30, 2025
dd104da
docs(version): add note about git version requirements
Dec 3, 2025
3f48487
docs(package-spec): fix alias syntax in examples
Dec 3, 2025
aa1dd7e
docs(scripts): document that prepare scripts run concurrently in work…
Dec 3, 2025
50508f9
docs(package-json): add documentation for type field (#8793)
MaxBlack-dev Dec 3, 2025
33a50d7
docs(scripts): update npm_package_* environment variables documentation
Dec 3, 2025
2030250
docs(scripts): clarify prepare script runs with --production
Dec 3, 2025
0765289
fix: handle ENOTEMPTY errors in moveFile
keegancsmith Nov 4, 2025
8ab8668
fix(query): support package-lock-only in workspaces
watilde Dec 8, 2025
54929ce
chore: update baseline-browser-mapping
watilde Dec 8, 2025
91ebab7
docs: remove note about token create being disabled
owlstronaut Dec 9, 2025
7896e51
fix: update the token list text
owlstronaut Dec 8, 2025
7f2ab9d
docs(scripts): replace deprecated prepublish and install examples wit…
Dec 3, 2025
4ebb831
fix: updates hints to use cli paradigm
owlstronaut Dec 8, 2025
6d1db87
chore: release 11.7.0
github-actions[bot] Dec 9, 2025
f2c3af7
fix: more intuitive byte formatting boundaries for rounding (#8840)
watilde Dec 11, 2025
5a444d5
feat: export environment config variable names
Dec 15, 2025
545e861
feat: show proxy environment variables in npm config list
Dec 15, 2025
c2f784d
fix: preserve serialNumber UUID in CycloneDX SBOM output #8837 (#8859)
saksham-malhotra-27 Dec 16, 2025
5552e46
docs(npm-install): explain package-lock.json behavior (#8797)
MaxBlack-dev Dec 17, 2025
3474ec3
docs: fix typo/logic error in npm-dedupe docs (#8866)
Schweinepriester Dec 19, 2025
32b2001
deps: tar@7.5.4
wraithgar Jan 20, 2026
149823d
deps: diff@8.0.3
wraithgar Jan 20, 2026
be221ea
deps: validate-npm-package-name@7.0.2
wraithgar Jan 20, 2026
dc8a8e8
deps: @sigstore/tuf@4.0.1
wraithgar Jan 20, 2026
b4a6a41
deps: @sigstore/core@3.1.0
wraithgar Jan 20, 2026
6979ce1
deps: @sigstore/sign@4.1.0
wraithgar Jan 20, 2026
7a949ad
deps: @sigstore/verify@3.1.0
wraithgar Jan 20, 2026
f951820
deps: common-ancestor-path@2.0.0
wraithgar Jan 20, 2026
9e756ae
deps: ip-address@10.1.0
wraithgar Jan 20, 2026
e7f5d1e
deps: lru-cache@11.2.4
wraithgar Jan 20, 2026
19096f2
deps: sigstore@4.1.0
wraithgar Jan 20, 2026
2b6a71f
deps: path-scurry@2.0.1
wraithgar Jan 20, 2026
f478ca0
deps: postcss-selector-parser@7.1.1
wraithgar Jan 20, 2026
f4f1161
chore: dev dependency updates
wraithgar Jan 20, 2026
8f599df
chore: pin jsdom to 27.0.0
wraithgar Jan 20, 2026
f8d25cd
chore: release 11.8.0
github-actions[bot] Jan 21, 2026
e0bc212
deps: pacote@21.1.0
wraithgar Jan 28, 2026
f5f6cf7
feat(config): add --allow-git
wraithgar Jan 22, 2026
a74a19c
deps: node-gyp@12.2.0
wraithgar Feb 2, 2026
164c355
deps: tar@7.5.7
wraithgar Feb 2, 2026
b65af73
deps: lru-cache@11.2.5
wraithgar Feb 2, 2026
4404002
deps: ci-info@4.4.0
wraithgar Feb 2, 2026
924171b
deps: is-cidr@6.0.2
wraithgar Feb 2, 2026
4a82a8f
chore: dev dependency updates
wraithgar Feb 2, 2026
b3f8475
deps: minipass-fetch@5.0.1
wraithgar Feb 2, 2026
2242f25
fix(webauth): improve error messages around webauth in non-TTY (#8952)
Andarist Feb 3, 2026
eca02c7
deps: minimatch@10.1.2 @isaacs/brace-expansion@5.0.1
wraithgar Feb 4, 2026
332c9f3
deps: glob@13.0.1
wraithgar Feb 4, 2026
417daa7
chore: release 11.9.0
github-actions[bot] Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
'header-max-length': [2, 'always', 80],
'subject-case': [0],
'body-max-line-length': [0],
'footer-max-line-length': [0],
},
}
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

'use strict'

const { readdirSync: readdir } = require('fs')

const localConfigs = readdir(__dirname)
Expand All @@ -6,6 +10,16 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
'/node_modules/.bin/',
'/node_modules/.cache/',
'docs/**',
'smoke-tests/**',
'mock-globals/**',
'mock-registry/**',
'workspaces/**',
],
extends: [
'@npmcli',
...localConfigs,
Expand Down
37 changes: 37 additions & 0 deletions .eslintrc.local.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const { resolve, relative } = require('path')

// Create an override to lockdown a file to es6 syntax only
// and only allow it to require an allowlist of files
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/cli/validate-engines.js'],
'lib/cli/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,
}),
}
20 changes: 0 additions & 20 deletions .eslintrc.local.json

This file was deleted.

30 changes: 28 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
/node_modules/** linguist-generated=false
/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
/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
/DEPENDENCIES.json 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
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @npm/cli-team
# This file is automatically added by @npmcli/template-oss. Do not edit.

* @npm/cli-team
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 🐞 Bug
description: File a bug/issue against the latest version of npm
title: "[BUG] <title>"
labels: [Bug, Needs Triage]
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
63 changes: 0 additions & 63 deletions .github/ISSUE_TEMPLATE/bug_8.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contact_links:
url: https://github.community/c/software-development/47
about: Find/file tickets with the community
- name: ⭐️ Feature Request
url: https://github.com/npm/feedback
url: https://github.com/orgs/community/discussions/categories/npm
about: Add your request or discuss the project w/ the community
- name: 📃 RFC
url: https://github.com/npm/rfcs
Expand Down
52 changes: 52 additions & 0 deletions .github/actions/create-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: 'Create Check'
inputs:
name:
required: true
token:
required: true
sha:
required: true
check-name:
default: ''
outputs:
check-id:
value: ${{ steps.create-check.outputs.check_id }}
runs:
using: "composite"
steps:
- name: Get Workflow Job
uses: actions/github-script@v7
id: workflow
env:
JOB_NAME: "${{ inputs.name }}"
SHA: "${{ inputs.sha }}"
with:
result-encoding: string
script: |
const { repo: { owner, repo}, runId, serverUrl } = context
const { JOB_NAME, SHA } = process.env

const job = await github.rest.actions.listJobsForWorkflowRun({
owner,
repo,
run_id: runId,
per_page: 100
}).then(r => r.data.jobs.find(j => j.name.endsWith(JOB_NAME)))

return [
`This check is assosciated with ${serverUrl}/${owner}/${repo}/commit/${SHA}.`,
'Run logs:',
job?.html_url || `could not be found for a job ending with: "${JOB_NAME}"`,
].join(' ')
- name: Create Check
uses: LouisBrunner/checks-action@v1.6.0
id: create-check
with:
token: ${{ inputs.token }}
sha: ${{ inputs.sha }}
status: in_progress
name: ${{ inputs.check-name || inputs.name }}
output: |
{"summary":"${{ steps.workflow.outputs.result }}"}
58 changes: 58 additions & 0 deletions .github/actions/install-latest-npm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: 'Install Latest npm'
description: 'Install the latest version of npm compatible with the Node version'
inputs:
node:
description: 'Current Node version'
required: true
runs:
using: "composite"
steps:
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
- name: Update Windows npm
if: |
runner.os == 'Windows' && (
startsWith(inputs.node, 'v10.') ||
startsWith(inputs.node, 'v12.') ||
startsWith(inputs.node, 'v14.')
)
shell: cmd
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Install Latest npm
shell: bash
env:
NODE_VERSION: ${{ inputs.node }}
working-directory: ${{ runner.temp }}
run: |
MATCH=""
SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6")

echo "node@$NODE_VERSION"

for SPEC in ${SPECS[@]}; do
ENGINES=$(npm view npm@$SPEC --json | jq -r '.engines.node')
echo "Checking if node@$NODE_VERSION satisfies npm@$SPEC ($ENGINES)"

if npx semver -r "$ENGINES" "$NODE_VERSION" > /dev/null; then
MATCH=$SPEC
echo "Found compatible version: npm@$MATCH"
break
fi
done

if [ -z $MATCH ]; then
echo "Could not find a compatible version of npm for node@$NODE_VERSION"
exit 1
fi

npm i --prefer-online --no-fund --no-audit -g npm@$MATCH
- name: npm Version
shell: bash
run: npm -v
Loading