Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a4570a5
chore: fix spelling: a
jsoref Sep 28, 2025
b0b7484
chore: fix spelling: access
jsoref Sep 28, 2025
b41e232
chore: fix spelling: appropriately
jsoref Sep 28, 2025
4b25359
chore: fix spelling: cannot
jsoref Sep 28, 2025
8c70e6b
fix: spelling: color
jsoref Sep 28, 2025
3187ed8
chore: fix spelling: containing
jsoref Sep 28, 2025
976775b
chore: fix spelling: depended
jsoref Sep 28, 2025
1e95c14
chore: fix spelling: disabled
jsoref Sep 26, 2025
5e7ee7c
chore: fix spelling: doesn't
jsoref Sep 26, 2025
edd604a
fix: spelling: engines
jsoref Sep 26, 2025
d0b3f59
chore: fix spelling: error
jsoref Sep 26, 2025
b0f1587
chore: fix spelling: grammar
jsoref Sep 26, 2025
203b051
chore: fix spelling: highest
jsoref Sep 26, 2025
ff7eeb0
chore: fix spelling: implicit
jsoref Sep 28, 2025
140b0a9
chore: fix spelling: in
jsoref Sep 28, 2025
51b4212
chore: fix spelling: include
jsoref Sep 26, 2025
aa2ed7e
chore: fix spelling: missing
jsoref Sep 28, 2025
2762243
chore: fix spelling: nonexistent
jsoref Sep 28, 2025
02a6690
chore: fix spelling: option
jsoref Sep 28, 2025
e946f3c
chore: fix spelling: output
jsoref Sep 28, 2025
acf7ea6
chore: fix spelling: polluting
jsoref Sep 28, 2025
cd042f2
chore: fix spelling: received
jsoref Sep 28, 2025
fac9412
chore: fix spelling: sensitive
jsoref Sep 28, 2025
3409139
chore: fix spelling: setting
jsoref Sep 28, 2025
68a4b1a
chore: fix spelling: similar
jsoref Sep 28, 2025
c1698b6
chore: fix spelling: update
jsoref Sep 28, 2025
c31b144
chore: fix spelling: workspaces
jsoref Sep 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
### Bug Fixes
* [`2f5392a`](https://github.com/npm/cli/commit/2f5392ae1f87fd3df3d7e521e0e69222fb9899e5) [#8135](https://github.com/npm/cli/pull/8135) make `npm run` autocomplete work with workspaces (#8135) (@terrainvidia)
### Documentation
* [`26b6454`](https://github.com/npm/cli/commit/26b64543ebb27e421c05643eb996f6765c13444c) fix grammer in local path note (@cgay)
* [`26b6454`](https://github.com/npm/cli/commit/26b64543ebb27e421c05643eb996f6765c13444c) fix grammar in local path note (@cgay)
* [`1c0e83d`](https://github.com/npm/cli/commit/1c0e83d6c165a714c7c37c0887e350042e53cf34) [#7886](https://github.com/npm/cli/pull/7886) fix typo in package-json.md (#7886) (@stoneLeaf)
* [`14efa57`](https://github.com/npm/cli/commit/14efa57f13b2bbbf10b0b217b981f919556789cd) [#8178](https://github.com/npm/cli/pull/8178) fix example package name in `overrides` explainer (#8178) (@G-Rath)
* [`4183cba`](https://github.com/npm/cli/commit/4183cba3e13bcfea83fa3ef2b6c5b0c9685f79bc) [#8162](https://github.com/npm/cli/pull/8162) logging: replace proceeding with preceding in loglevels details (#8162) (@tyleralbee)
Expand Down Expand Up @@ -316,7 +316,7 @@
* [`31455b2`](https://github.com/npm/cli/commit/31455b2e177b721292f3382726e3f5f3f2963b1d) [#8054](https://github.com/npm/cli/pull/8054) publish: honor force for no dist tag and registry version check (#8054) (@reggi)
* [`dc31c1b`](https://github.com/npm/cli/commit/dc31c1bdc6658ab69554adcf2988ee99a615c409) [#8038](https://github.com/npm/cli/pull/8038) remove max-len linting bypasses (@wraithgar)
* [`8a911ff`](https://github.com/npm/cli/commit/8a911ff895967678aa786595db3418fc28e6966a) [#8038](https://github.com/npm/cli/pull/8038) publish: disregard deprecated versions when calculating highest version (@wraithgar)
* [`7f72944`](https://github.com/npm/cli/commit/7f72944e43f009cf4d55ff4fe24c459e07f588fd) [#8038](https://github.com/npm/cli/pull/8038) publish: accept publishConfig.tag to override highes semver check (@wraithgar)
* [`7f72944`](https://github.com/npm/cli/commit/7f72944e43f009cf4d55ff4fe24c459e07f588fd) [#8038](https://github.com/npm/cli/pull/8038) publish: accept publishConfig.tag to override highest semver check (@wraithgar)
* [`ab9ddc0`](https://github.com/npm/cli/commit/ab9ddc0413374fbf4879da535f82e03bc4e62cf3) [#7992](https://github.com/npm/cli/pull/7992) sbom: deduplicate sbom dependencies (#7992) (@bdehamer)
* [`f7da341`](https://github.com/npm/cli/commit/f7da341322c2f860156e8144b208583596504479) [#7980](https://github.com/npm/cli/pull/7980) search: properly display multiple search terms (#7980) (@wraithgar)
### Documentation
Expand Down Expand Up @@ -370,7 +370,7 @@
## [11.0.0-pre.1](https://github.com/npm/cli/compare/v11.0.0-pre.0...v11.0.0-pre.1) (2024-12-06)
### ⚠️ BREAKING CHANGES
* Upon publishing, in order to apply a default "latest" dist tag, the command now retrieves all prior versions of the package. It will require that the version you're trying to publish is above the latest semver version in the registry, not including pre-release tags.
* `npm init` now has a `type` prompt, and sorts the entries the created packages differently
* `npm init` now has a `type` prompt, and sorts the entries in created packages differently
* `bun.lockb` files are now included in the strict ignore list during packing
### Features
* [`f3ac7b7`](https://github.com/npm/cli/commit/f3ac7b7460e1d9e1f9d3d8056317e36bb9813d5d) [#7939](https://github.com/npm/cli/pull/7939) no implicit latest tag on publish when latest > version (#7939) (@reggi, @ljharb)
Expand Down
22 changes: 11 additions & 11 deletions tap-snapshots/test/lib/commands/ls.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ exports[`test/lib/commands/ls.js TAP ls --parseable no args > should output pars
{CWD}/prefix/node_modules/dog
`

exports[`test/lib/commands/ls.js TAP ls --parseable overridden dep > should contain overridden outout 1`] = `
exports[`test/lib/commands/ls.js TAP ls --parseable overridden dep > should contain overridden output 1`] = `
{CWD}/prefix:test-overridden@1.0.0
{CWD}/prefix/node_modules/foo:foo@1.0.0
{CWD}/prefix/node_modules/bar:bar@1.0.0:OVERRIDDEN
Expand Down Expand Up @@ -288,19 +288,19 @@ exports[`test/lib/commands/ls.js TAP ls --parseable using aliases > should outpu
{CWD}/prefix/node_modules/a
`

exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg > should output parseable contaning only occurrences of filtered by package 1`] = `
exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg > should output parseable containing only occurrences of filtered by package 1`] = `
{CWD}/prefix/node_modules/chai
`

exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg nested dep > should output parseable contaning only occurrences of filtered package 1`] = `
exports[`test/lib/commands/ls.js TAP ls --parseable with filter arg nested dep > should output parseable containing only occurrences of filtered package 1`] = `
{CWD}/prefix/node_modules/dog
`

exports[`test/lib/commands/ls.js TAP ls --parseable with missing filter arg > should output parseable output containing no dependencies info 1`] = `

`

exports[`test/lib/commands/ls.js TAP ls --parseable with multiple filter args > should output parseable contaning only occurrences of multiple filtered packages and their ancestors 1`] = `
exports[`test/lib/commands/ls.js TAP ls --parseable with multiple filter args > should output parseable containing only occurrences of multiple filtered packages and their ancestors 1`] = `
{CWD}/prefix/node_modules/chai
{CWD}/prefix/node_modules/dog
`
Expand Down Expand Up @@ -453,7 +453,7 @@ workspaces-tree@1.0.0 {CWD}/prefix
\`-- bar@1.0.0
`

exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should inlude root and specified workspace > output 1`] = `
exports[`test/lib/commands/ls.js TAP ls loading a tree containing workspaces should include root and specified workspace > output 1`] = `
workspaces-tree@1.0.0 {CWD}/prefix
+-- d@1.0.0 -> ./d
| \`-- foo@1.1.1
Expand Down Expand Up @@ -541,13 +541,13 @@ test-npm-ls@1.0.0 {CWD}/prefix
\`-- dog@1.0.0
`

exports[`test/lib/commands/ls.js TAP ls overridden dep > should contain overridden outout 1`] = `
exports[`test/lib/commands/ls.js TAP ls overridden dep > should contain overridden output 1`] = `
test-overridden@1.0.0 {CWD}/prefix
\`-- foo@1.0.0
\`-- bar@1.0.0 overridden
`

exports[`test/lib/commands/ls.js TAP ls overridden dep w/ color > should contain overridden outout 1`] = `
exports[`test/lib/commands/ls.js TAP ls overridden dep w/ color > should contain overridden output 1`] = `
test-overridden@1.0.0 {CWD}/prefix
\`-- foo@1.0.0
 \`-- bar@1.0.0 overridden
Expand Down Expand Up @@ -609,18 +609,18 @@ dedupe-entries@1.0.0 {CWD}/prefix
\`-- @npmcli/c@1.0.0
`

exports[`test/lib/commands/ls.js TAP ls with dot filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = `
exports[`test/lib/commands/ls.js TAP ls with dot filter arg > should output tree containing only occurrences of filtered by package and colored output 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- (empty)
`

exports[`test/lib/commands/ls.js TAP ls with filter arg > should output tree contaning only occurrences of filtered by package and colored output 1`] = `
exports[`test/lib/commands/ls.js TAP ls with filter arg > should output tree containing only occurrences of filtered by package and colored output 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- chai@1.0.0

`

exports[`test/lib/commands/ls.js TAP ls with filter arg nested dep > should output tree contaning only occurrences of filtered package and its ancestors 1`] = `
exports[`test/lib/commands/ls.js TAP ls with filter arg nested dep > should output tree containing only occurrences of filtered package and its ancestors 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
\`-- foo@1.0.0
\`-- dog@1.0.0
Expand All @@ -631,7 +631,7 @@ test-npm-ls@1.0.0 {CWD}/prefix
\`-- (empty)
`

exports[`test/lib/commands/ls.js TAP ls with multiple filter args > should output tree contaning only occurrences of multiple filtered packages and their ancestors 1`] = `
exports[`test/lib/commands/ls.js TAP ls with multiple filter args > should output tree containing only occurrences of multiple filtered packages and their ancestors 1`] = `
test-npm-ls@1.0.0 {CWD}/prefix
+-- chai@1.0.0
\`-- foo@1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/lib/commands/outdated.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ exports[`test/lib/commands/outdated.js TAP workspaces should display ws outdated
:theta@1.0.1:MISSING:theta@1.0.1:e
`

exports[`test/lib/commands/outdated.js TAP workspaces should highlight ws in dependend by section > output 1`] = `
exports[`test/lib/commands/outdated.js TAP workspaces should highlight ws in depended by section > output 1`] = `
Package Current Wanted Latest Location Depended by
cat 1.0.0 1.0.1 1.0.1 node_modules/cat a@1.0.0
dog 1.0.1 1.0.1 2.0.0 node_modules/dog prefix
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/lib/commands/sbom.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ exports[`test/lib/commands/sbom.js TAP sbom extraneous dep > must match snapshot
}
`

exports[`test/lib/commands/sbom.js TAP sbom loading a tree containing workspaces should filter worksapces with --workspace > must match snapshot 1`] = `
exports[`test/lib/commands/sbom.js TAP sbom loading a tree containing workspaces should filter workspaces with --workspace > must match snapshot 1`] = `
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/lib/utils/error-message.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ Object {
}
`

exports[`test/lib/utils/error-message.js TAP replace message/stack sensistive info > must match snapshot 1`] = `
exports[`test/lib/utils/error-message.js TAP replace message/stack sensitive info > must match snapshot 1`] = `
Object {
"detail": Array [],
"summary": Array [
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/lib/utils/open-url.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm home:
https://www.npmjs.com
`

exports[`test/lib/utils/open-url.js TAP open url prompt does not error when opener can not find command > Outputs extra Browser unavailable message and url 1`] = `
exports[`test/lib/utils/open-url.js TAP open url prompt does not error when opener cannot find command > Outputs extra Browser unavailable message and url 1`] = `
npm home:
https://www.npmjs.com

Expand Down
6 changes: 3 additions & 3 deletions test/lib/cli/update-notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const packumentResponse = {
[HAVE_BETA]: { version: HAVE_BETA, engines: { node: '>1' } },
[NEXT_VERSION_ENGINE_COMPATIBLE]: {
version: NEXT_VERSION_ENGINE_COMPATIBLE,
engiges: { node: '<=1' },
engines: { node: '<=1' },
},
[NEXT_VERSION_ENGINE_COMPATIBLE_MINOR]: {
version: NEXT_VERSION_ENGINE_COMPATIBLE_MINOR,
Expand Down Expand Up @@ -68,7 +68,7 @@ const runUpdateNotifier = async (t, {
...require('node:fs/promises'),
stat: async (path) => {
if (basename(path) !== '_update-notifier-last-checked') {
t.fail('no stat allowed for non upate notifier files')
t.fail('no stat allowed for non update notifier files')
}
if (STAT_ERROR) {
throw STAT_ERROR
Expand All @@ -81,7 +81,7 @@ const runUpdateNotifier = async (t, {
t.fail('no write file content allowed')
}
if (basename(path) !== '_update-notifier-last-checked') {
t.fail('no writefile allowed for non upate notifier files')
t.fail('no writefile allowed for non update notifier files')
}
if (WRITE_ERROR) {
throw WRITE_ERROR
Expand Down
6 changes: 3 additions & 3 deletions test/lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ t.test('config delete single key', async t => {

await npm.exec('config', ['delete', 'access'])

t.equal(npm.config.get('access'), null, 'acces should be defaulted')
t.equal(npm.config.get('access'), null, 'access should be defaulted')

const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' })
const rc = ini.parse(contents)
Expand Down Expand Up @@ -294,7 +294,7 @@ t.test('config delete key --global', async t => {
t.test('config set invalid option', async t => {
const { npm } = await loadMockNpm(t)
await t.rejects(
npm.exec('config', ['set', 'nonexistantconfigoption', 'something']),
npm.exec('config', ['set', 'nonexistentconfigoption', 'something']),
/not a valid npm option/
)
})
Expand All @@ -317,7 +317,7 @@ t.test('config set nerf-darted option', async t => {
)
})

t.test('config set scoped optoin', async t => {
t.test('config set scoped option', async t => {
const { npm } = await loadMockNpm(t)
await npm.exec('config', ['set', '@npm:registry', 'https://registry.npmjs.org'])
t.equal(
Expand Down
6 changes: 3 additions & 3 deletions test/lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const mockNpm = async (t, { noLog, libnpmexec, initPackageJson, ...opts } = {})
},
globals: {
// init-package-json prints directly to console.log
// this avoids poluting test output with those logs
// this avoids polluting test output with those logs
...(noLog ? { 'console.log': () => {} } : {}),
},
})
Expand Down Expand Up @@ -324,7 +324,7 @@ t.test('workspaces', async t => {
)
})

await t.test('missing top-level package.json when settting workspace', async t => {
await t.test('missing top-level package.json when setting workspace', async t => {
const { npm, logs } = await mockNpm(t, {
config: { workspace: 'a' },
})
Expand All @@ -338,7 +338,7 @@ t.test('workspaces', async t => {
t.equal(logs.warn[0], 'init Missing package.json. Try with `--include-workspace-root`.')
})

await t.test('bad package.json when settting workspace', async t => {
await t.test('bad package.json when setting workspace', async t => {
const { npm, logs } = await mockNpm(t, {
prefixDir: {
'package.json': '{{{{',
Expand Down
36 changes: 18 additions & 18 deletions test/lib/commands/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ t.test('ls', async t => {
await

ls.exec([])
t.matchSnapshot(cleanCwd(result()), 'should contain overridden outout')
t.matchSnapshot(cleanCwd(result()), 'should contain overridden output')
})

t.test('overridden dep w/ color', async t => {
Expand Down Expand Up @@ -305,7 +305,7 @@ t.test('ls', async t => {
})

await ls.exec([])
t.matchSnapshot(cleanCwd(result()), 'should contain overridden outout')
t.matchSnapshot(cleanCwd(result()), 'should contain overridden output')
})

t.test('with filter arg', async t => {
Expand All @@ -329,7 +329,7 @@ t.test('ls', async t => {
await ls.exec(['chai'])
t.matchSnapshot(
cleanCwd(result()),
'should output tree contaning only occurrences of filtered by package and colored output'
'should output tree containing only occurrences of filtered by package and colored output'
)
})

Expand All @@ -355,7 +355,7 @@ t.test('ls', async t => {
await ls.exec(['.'])
t.matchSnapshot(
cleanCwd(result()),
'should output tree contaning only occurrences of filtered by package and colored output'
'should output tree containing only occurrences of filtered by package and colored output'
)
})

Expand All @@ -377,7 +377,7 @@ t.test('ls', async t => {
await ls.exec(['dog'])
t.matchSnapshot(
cleanCwd(result()),
'should output tree contaning only occurrences of filtered package and its ancestors'
'should output tree containing only occurrences of filtered package and its ancestors'
)
})

Expand Down Expand Up @@ -408,7 +408,7 @@ t.test('ls', async t => {
await ls.exec(['dog@*', 'chai@1.0.0'])
t.matchSnapshot(
cleanCwd(result()),
'should output tree contaning only occurrences of multiple filtered packages and their ancestors'
'should output tree containing only occurrences of multiple filtered packages and their ancestors'
)
})

Expand Down Expand Up @@ -1650,7 +1650,7 @@ t.test('ls', async t => {
}))

// filter out a single workspace and include root
t.test('should inlude root and specified workspace', t => mockWorkspaces(t, [], {
t.test('should include root and specified workspace', t => mockWorkspaces(t, [], {
'include-workspace-root': true,
workspace: 'd',
}))
Expand Down Expand Up @@ -1823,7 +1823,7 @@ t.test('ls --parseable', async t => {
})

await ls.exec([])
t.matchSnapshot(cleanCwd(result()), 'should contain overridden outout')
t.matchSnapshot(cleanCwd(result()), 'should contain overridden output')
})

t.test('with filter arg', async t => {
Expand All @@ -1844,7 +1844,7 @@ t.test('ls --parseable', async t => {
await ls.exec(['chai'])
t.matchSnapshot(
cleanCwd(result()),
'should output parseable contaning only occurrences of filtered by package'
'should output parseable containing only occurrences of filtered by package'
)
})

Expand All @@ -1866,7 +1866,7 @@ t.test('ls --parseable', async t => {
await ls.exec(['dog'])
t.matchSnapshot(
cleanCwd(result()),
'should output parseable contaning only occurrences of filtered package'
'should output parseable containing only occurrences of filtered package'
)
})

Expand Down Expand Up @@ -1897,7 +1897,7 @@ t.test('ls --parseable', async t => {
await ls.exec(['dog@*', 'chai@1.0.0'])
t.matchSnapshot(
cleanCwd(result()),
'should output parseable contaning only occurrences of multiple filtered packages and their ancestors'
'should output parseable containing only occurrences of multiple filtered packages and their ancestors'
)
})

Expand Down Expand Up @@ -2941,7 +2941,7 @@ t.test('ls --json', async t => {
},
},
},
'should output json contaning only occurrences of filtered by package'
'should output json containing only occurrences of filtered by package'
)
t.not(process.exitCode, 1, 'should not exit with error code 1')
})
Expand Down Expand Up @@ -2982,7 +2982,7 @@ t.test('ls --json', async t => {
},
},
},
'should output json contaning only occurrences of filtered by package'
'should output json containing only occurrences of filtered by package'
)
t.notOk(jsonParse(result()).dependencies.chai)
})
Expand Down Expand Up @@ -3036,7 +3036,7 @@ t.test('ls --json', async t => {
},
},
},
'should output json contaning only occurrences of multiple filtered packages and their ancestors'
'should output json containing only occurrences of multiple filtered packages and their ancestors'
)
})

Expand Down Expand Up @@ -3838,7 +3838,7 @@ t.test('ls --json', async t => {
await t.rejects(
ls.exec([]),
{ code: 'EJSONPARSE', message: 'Failed to parse root package.json' },
'should have missin root package.json msg'
'should have missing root package.json msg'
)
t.same(
jsonParse(result()),
Expand Down Expand Up @@ -4664,7 +4664,7 @@ t.test('ls --package-lock-only', async t => {
},
},
},
'should output json contaning only occurrences of filtered by package'
'should output json containing only occurrences of filtered by package'
)
t.notOk(process.exitCode, 'should not set exit code')
})
Expand Down Expand Up @@ -4724,7 +4724,7 @@ t.test('ls --package-lock-only', async t => {
},
},
},
'should output json contaning only occurrences of filtered by package'
'should output json containing only occurrences of filtered by package'
)
})

Expand Down Expand Up @@ -4788,7 +4788,7 @@ t.test('ls --package-lock-only', async t => {
},
},
},
'should output json contaning only occurrences of multiple filtered packages and their ancestors'
'should output json containing only occurrences of multiple filtered packages and their ancestors'
)
})

Expand Down
Loading