diff --git a/CHANGELOG.md b/CHANGELOG.md index cac6a23c35330..d1040f15af9e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) @@ -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 @@ -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) diff --git a/tap-snapshots/test/lib/commands/ls.js.test.cjs b/tap-snapshots/test/lib/commands/ls.js.test.cjs index 86394b702f19a..3b303261fd635 100644 --- a/tap-snapshots/test/lib/commands/ls.js.test.cjs +++ b/tap-snapshots/test/lib/commands/ls.js.test.cjs @@ -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 @@ -288,11 +288,11 @@ 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 ` @@ -300,7 +300,7 @@ exports[`test/lib/commands/ls.js TAP ls --parseable with missing filter arg > sh ` -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 ` @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/tap-snapshots/test/lib/commands/outdated.js.test.cjs b/tap-snapshots/test/lib/commands/outdated.js.test.cjs index 164440d68c34c..8eac2cc92dd4f 100644 --- a/tap-snapshots/test/lib/commands/outdated.js.test.cjs +++ b/tap-snapshots/test/lib/commands/outdated.js.test.cjs @@ -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 diff --git a/tap-snapshots/test/lib/commands/sbom.js.test.cjs b/tap-snapshots/test/lib/commands/sbom.js.test.cjs index 5b2e93a3df6d6..1eb269e5671b2 100644 --- a/tap-snapshots/test/lib/commands/sbom.js.test.cjs +++ b/tap-snapshots/test/lib/commands/sbom.js.test.cjs @@ -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", diff --git a/tap-snapshots/test/lib/utils/error-message.js.test.cjs b/tap-snapshots/test/lib/utils/error-message.js.test.cjs index 7dd9c7d945f68..80cfdd880c582 100644 --- a/tap-snapshots/test/lib/utils/error-message.js.test.cjs +++ b/tap-snapshots/test/lib/utils/error-message.js.test.cjs @@ -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 [ diff --git a/tap-snapshots/test/lib/utils/open-url.js.test.cjs b/tap-snapshots/test/lib/utils/open-url.js.test.cjs index fa256ba131447..2b3fed2b326e4 100644 --- a/tap-snapshots/test/lib/utils/open-url.js.test.cjs +++ b/tap-snapshots/test/lib/utils/open-url.js.test.cjs @@ -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 diff --git a/test/lib/cli/update-notifier.js b/test/lib/cli/update-notifier.js index a4f1ee6885a6b..023a44294622e 100644 --- a/test/lib/cli/update-notifier.js +++ b/test/lib/cli/update-notifier.js @@ -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, @@ -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 @@ -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 diff --git a/test/lib/commands/config.js b/test/lib/commands/config.js index bcd88915dc97a..64977c6f6c2f0 100644 --- a/test/lib/commands/config.js +++ b/test/lib/commands/config.js @@ -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) @@ -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/ ) }) @@ -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( diff --git a/test/lib/commands/init.js b/test/lib/commands/init.js index 9a73f4924e7d1..1b59cc418c678 100644 --- a/test/lib/commands/init.js +++ b/test/lib/commands/init.js @@ -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': () => {} } : {}), }, }) @@ -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' }, }) @@ -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': '{{{{', diff --git a/test/lib/commands/ls.js b/test/lib/commands/ls.js index cf96452d6cb5d..c876af9e83ddf 100644 --- a/test/lib/commands/ls.js +++ b/test/lib/commands/ls.js @@ -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 => { @@ -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 => { @@ -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' ) }) @@ -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' ) }) @@ -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' ) }) @@ -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' ) }) @@ -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', })) @@ -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 => { @@ -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' ) }) @@ -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' ) }) @@ -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' ) }) @@ -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') }) @@ -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) }) @@ -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' ) }) @@ -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()), @@ -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') }) @@ -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' ) }) @@ -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' ) }) diff --git a/test/lib/commands/org.js b/test/lib/commands/org.js index 7a1538d9c69e4..ad82e79dc5cc3 100644 --- a/test/lib/commands/org.js +++ b/test/lib/commands/org.js @@ -424,7 +424,7 @@ t.test('npm org ls', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame(outputs, [ 'one - developer', @@ -450,7 +450,7 @@ t.test('npm org ls - user filter', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame(outputs, [ 'username - admin', @@ -473,7 +473,7 @@ t.test('npm org ls - user filter, missing user', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame(outputs, []) }) @@ -503,7 +503,7 @@ t.test('npm org ls - json output', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame(JSON.parse(outputs[0]), orgList, 'prints the correct output') }) @@ -528,7 +528,7 @@ t.test('npm org ls - parseable output', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame( outputs.map(line => line.split(/\t/)), @@ -562,7 +562,7 @@ t.test('npm org ls - silent output', async t => { org: 'orgname', opts: npm.flatOptions, }, - 'receieved the correct args' + 'received the correct args' ) t.strictSame(outputs, [], 'printed no output') }) diff --git a/test/lib/commands/outdated.js b/test/lib/commands/outdated.js index 36c3b9c9cabeb..e3709bf7c2b41 100644 --- a/test/lib/commands/outdated.js +++ b/test/lib/commands/outdated.js @@ -582,7 +582,7 @@ t.test('workspaces', async t => { await t.test('should display all dependencies', t => mockWorkspaces(t, { all: true })) - await t.test('should highlight ws in dependend by section', t => + await t.test('should highlight ws in depended by section', t => mockWorkspaces(t, { color: 'always' })) await t.test('should display results filtered by ws', t => @@ -666,7 +666,7 @@ t.test('aliases with version range', async t => { t.test('dependent location', async t => { const testDir = { 'package.json': JSON.stringify({ - name: 'similer-name', + name: 'similar-name', version: '1.0.0', workspaces: ['a', 'nest/a'], }), diff --git a/test/lib/commands/profile.js b/test/lib/commands/profile.js index 2204f2e9df1fb..e11ab4c05fa6c 100644 --- a/test/lib/commands/profile.js +++ b/test/lib/commands/profile.js @@ -727,7 +727,7 @@ t.test('enable-2fa', async t => { mode: 'auth-only', }, }, - 'should set tfa mode approprietly in follow-up call' + 'should set tfa mode appropriately in follow-up call' ) } else if (setCount === 3) { t.match( @@ -968,7 +968,7 @@ t.test('disable-2fa', async t => { await profile.exec(['disable-2fa']) t.equal(result(), 'Two factor authentication not enabled.', - 'should output already disalbed msg') + 'should output already disabled msg') }) t.test('requests otp', async t => { @@ -1101,7 +1101,7 @@ t.test('disable-2fa', async t => { await profile.exec(['disable-2fa']) - t.equal(result(), 'Two factor authentication disabled.', 'should output already disalbed msg') + t.equal(result(), 'Two factor authentication disabled.', 'should output already disabled msg') }) }) diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index b06655d346026..3588750077e71 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -1191,7 +1191,7 @@ t.test('oidc token exchange - no provenance', t => { constructor (...args) { const [url] = args if (url === ACTIONS_ID_TOKEN_REQUEST_URL) { - throw 'Specifically throwing a non errror object to test global try-catch' + throw 'Specifically throwing a non error object to test global try-catch' } super(...args) } diff --git a/test/lib/commands/sbom.js b/test/lib/commands/sbom.js index c08756414d25e..2603c26469eab 100644 --- a/test/lib/commands/sbom.js +++ b/test/lib/commands/sbom.js @@ -581,7 +581,7 @@ t.test('sbom', async t => { workspaces: false, })) - t.test('should filter worksapces with --workspace', t => mockWorkspaces(t, [], { + t.test('should filter workspaces with --workspace', t => mockWorkspaces(t, [], { 'sbom-format': 'spdx', workspace: 'a', })) diff --git a/test/lib/commands/team.js b/test/lib/commands/team.js index 1a5480293edc9..1a00e64cadddc 100644 --- a/test/lib/commands/team.js +++ b/test/lib/commands/team.js @@ -422,7 +422,7 @@ t.test('completion', async t => { t.test('npm team unknown subcommand autocomplete', async t => { t.rejects( team.completion({ conf: { argv: { remain: ['npm', 'team', 'missing-subcommand'] } } }), - { message: 'missing-subcommand not recognized' }, 'should throw a a not recognized error' + { message: 'missing-subcommand not recognized' }, 'should throw a not recognized error' ) t.end() diff --git a/test/lib/load-all-commands.js b/test/lib/load-all-commands.js index 892dd466ac5c4..6bd0534a3b54e 100644 --- a/test/lib/load-all-commands.js +++ b/test/lib/load-all-commands.js @@ -1,4 +1,4 @@ -// Our coverage mapping means that stuff like this doen't count for coverage. +// Our coverage mapping means that stuff like this doesn't count for coverage. // It does ensure that every command has a usage that renders, contains its // name, a description, and if it has completion it is a function. That it // renders also ensures that any params we've defined in our commands work. @@ -37,7 +37,7 @@ t.test('load each command', async t => { t.ok(impl.exec.length <= 1, 'exec fn has 0 or 1 args') // workspaces - t.type(ctor.ignoreImplicitWorkspace, 'boolean', 'ctor has ignoreImplictWorkspace boolean') + t.type(ctor.ignoreImplicitWorkspace, 'boolean', 'ctor has ignoreImplicitWorkspace boolean') if (ctor.ignoreImplicitWorkspace !== BaseCommand.ignoreImplicitWorkspace) { counts.ignoreImplicitWorkspace++ } diff --git a/test/lib/utils/display.js b/test/lib/utils/display.js index 26f52b17a8528..bc4e23485fa3e 100644 --- a/test/lib/utils/display.js +++ b/test/lib/utils/display.js @@ -15,7 +15,7 @@ const mockDisplay = async (t, { mocks, load } = {}) => { const displayLoad = async (opts) => display.load({ loglevel: 'silly', stderrColor: false, - stdoutColot: false, + stdoutColor: false, heading: 'npm', ...opts, }) diff --git a/test/lib/utils/error-message.js b/test/lib/utils/error-message.js index 1939e27c8ba92..380e8611645e9 100644 --- a/test/lib/utils/error-message.js +++ b/test/lib/utils/error-message.js @@ -91,7 +91,7 @@ t.test('just simple messages', async t => { } }) -t.test('replace message/stack sensistive info', async t => { +t.test('replace message/stack sensitive info', async t => { const { errorMessage } = await loadMockNpm(t, { command: 'audit' }) const er = Object.assign(new Error('Error at registry: https://user:pass@registry.npmjs.org/'), { code: 'ENOAUDIT', diff --git a/test/lib/utils/open-url.js b/test/lib/utils/open-url.js index 096533140757e..e094effea2efe 100644 --- a/test/lib/utils/open-url.js +++ b/test/lib/utils/open-url.js @@ -180,7 +180,7 @@ t.test('open url prompt', async t => { t.equal(openerUrl, 'https://www.npmjs.com', 'did not open') }) - t.test('does not error when opener can not find command', async t => { + t.test('does not error when opener cannot find command', async t => { const { OUTPUT, error, openerUrl } = await mockOpenUrlPrompt(t, { openerResult: Object.assign(new Error('Opener failed'), { code: 127 }), }) diff --git a/test/lib/utils/queryable.js b/test/lib/utils/queryable.js index fb0db5d021b57..7716d203261d5 100644 --- a/test/lib/utils/queryable.js +++ b/test/lib/utils/queryable.js @@ -829,7 +829,7 @@ t.test('set arrays', async t => { t.throws( () => qqqqq.set('lorem[]', 4), { code: 'ENOAPPEND' }, - 'should throw error if using empty square bracket in an non-array item' + 'should throw error if using empty square bracket in a non-array item' ) qqqqq.set('lorem[0]', 3) t.strictSame( @@ -960,6 +960,6 @@ t.test('bracket lovers', async t => { '[iLoveBrackets]': 'seriously?', '[0]': '-.-', }, - 'any top-level item can not be parsed with square bracket notation' + 'any top-level item cannot be parsed with square bracket notation' ) })