Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 13 additions & 13 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ safer to use a registry-provided authentication bearer token stored in the
If you do not want your scoped package to be publicly viewable (and
installable) set \`--access=restricted\`.

Unscoped packages can not be set to \`restricted\`.
Unscoped packages cannot be set to \`restricted\`.

Note: This defaults to not changing the current access level for existing
packages. Specifying a value of \`restricted\` or \`public\` during publish will
Expand Down Expand Up @@ -405,7 +405,7 @@ are same as \`cpu\` field of package.json, which comes from \`process.arch\`.

#### \`depth\`

* Default: \`Infinity\` if \`--all\` is set, otherwise \`0\`
* Default: \`Infinity\` if \`--all\` is set; otherwise, \`0\`
* Type: null or Number

The depth to go when recursing packages for \`npm ls\`.
Expand Down Expand Up @@ -544,7 +544,7 @@ This can be overridden by setting the \`--force\` flag.

Tells to expect a specific number of results from the command.

This config can not be used with: \`expect-results\`
This config cannot be used with: \`expect-results\`

#### \`expect-results\`

Expand All @@ -554,7 +554,7 @@ This config can not be used with: \`expect-results\`
Tells npm whether or not to expect results from the command. Can be either
true (expect some results) or false (expect no results).

This config can not be used with: \`expect-result-count\`
This config cannot be used with: \`expect-result-count\`

#### \`fetch-retries\`

Expand Down Expand Up @@ -992,8 +992,8 @@ instead of the current working directory. See

#### \`lockfile-version\`

* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3,
otherwise maintain current lockfile version.
* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3;
otherwise, maintain current lockfile version.
* Type: null, 1, 2, 3, "1", "2", or "3"

Set the lockfile format version to be used in package-lock.json and
Expand Down Expand Up @@ -1129,7 +1129,7 @@ allow the CLI to fill in missing cache data, see \`--prefer-offline\`.
#### \`omit\`

* Default: 'dev' if the \`NODE_ENV\` environment variable is set to
'production', otherwise empty.
'production'; otherwise, empty.
* Type: "dev", "optional", or "peer" (can be set multiple times)

Dependency types to omit from the installation tree on disk.
Expand Down Expand Up @@ -1309,7 +1309,7 @@ Set to \`false\` to suppress the progress bar.
When publishing from a supported cloud CI/CD system, the package will be
publicly linked to where it was built and published from.

This config can not be used with: \`provenance-file\`
This config cannot be used with: \`provenance-file\`

#### \`provenance-file\`

Expand All @@ -1318,7 +1318,7 @@ This config can not be used with: \`provenance-file\`

When publishing, the provenance bundle at the given path will be used.

This config can not be used with: \`provenance\`
This config cannot be used with: \`provenance\`

#### \`proxy\`

Expand Down Expand Up @@ -1410,7 +1410,7 @@ Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled.

Save installed packages to a package.json file as \`devDependencies\`.

This config can not be used with: \`save-optional\`, \`save-peer\`, \`save-prod\`
This config cannot be used with: \`save-optional\`, \`save-peer\`, \`save-prod\`

#### \`save-exact\`

Expand All @@ -1429,7 +1429,7 @@ rather than using npm's default semver range operator.

Save installed packages to a package.json file as \`optionalDependencies\`.

This config can not be used with: \`save-dev\`, \`save-peer\`, \`save-prod\`
This config cannot be used with: \`save-dev\`, \`save-peer\`, \`save-prod\`

#### \`save-peer\`

Expand All @@ -1438,7 +1438,7 @@ This config can not be used with: \`save-dev\`, \`save-peer\`, \`save-prod\`

Save installed packages to a package.json file as \`peerDependencies\`

This config can not be used with: \`save-dev\`, \`save-optional\`, \`save-prod\`
This config cannot be used with: \`save-dev\`, \`save-optional\`, \`save-prod\`

#### \`save-prefix\`

Expand Down Expand Up @@ -1467,7 +1467,7 @@ you want to move it to be a non-optional production dependency.
This is the default behavior if \`--save\` is true, and neither \`--save-dev\`
or \`--save-optional\` are true.

This config can not be used with: \`save-dev\`, \`save-optional\`, \`save-peer\`
This config cannot be used with: \`save-dev\`, \`save-optional\`, \`save-peer\`

#### \`sbom-format\`

Expand Down
2 changes: 1 addition & 1 deletion workspaces/config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@

### Features

* [`9123de4`](https://github.com/npm/cli/commit/9123de4d282bfd19ea17ad613f5a2acab0e0e162) [#7373](https://github.com/npm/cli/pull/7373) do all ouput over proc-log events (@lukekarrys)
* [`9123de4`](https://github.com/npm/cli/commit/9123de4d282bfd19ea17ad613f5a2acab0e0e162) [#7373](https://github.com/npm/cli/pull/7373) do all output over proc-log events (@lukekarrys)

### Bug Fixes

Expand Down
4 changes: 2 additions & 2 deletions workspaces/config/lib/definitions/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const {
class Definition {
constructor (key, def) {
this.key = key
// if it's set falsey, don't export it, otherwise we do by default
// if it's set falsey, don't export it; otherwise, we do by default
this.envExport = true
Object.assign(this, def)
this.validate()
Expand Down Expand Up @@ -83,7 +83,7 @@ This value is not exported to the environment for child processes.
`
const deprecated = !this.deprecated ? '' : `* DEPRECATED: ${unindent(this.deprecated)}\n`
/* eslint-disable-next-line max-len */
const exclusive = !this.exclusive ? '' : `\nThis config can not be used with: \`${this.exclusive.join('`, `')}\``
const exclusive = !this.exclusive ? '' : `\nThis config cannot be used with: \`${this.exclusive.join('`, `')}\``
return wrapAll(`#### \`${this.key}\`

* Default: ${unindent(this.defaultDescription)}
Expand Down
10 changes: 5 additions & 5 deletions workspaces/config/lib/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const definitions = {
If you do not want your scoped package to be publicly viewable (and
installable) set \`--access=restricted\`.

Unscoped packages can not be set to \`restricted\`.
Unscoped packages cannot be set to \`restricted\`.

Note: This defaults to not changing the current access level for existing
packages. Specifying a value of \`restricted\` or \`public\` during
Expand Down Expand Up @@ -462,7 +462,7 @@ const definitions = {
depth: new Definition('depth', {
default: null,
defaultDescription: `
\`Infinity\` if \`--all\` is set, otherwise \`0\`
\`Infinity\` if \`--all\` is set; otherwise, \`0\`
`,
type: [null, Number],
description: `
Expand Down Expand Up @@ -1205,7 +1205,7 @@ const definitions = {
default: null,
type: [null, 1, 2, 3, '1', '2', '3'],
defaultDescription: `
Version 3 if no lockfile, auto-converting v1 lockfiles to v3, otherwise
Version 3 if no lockfile, auto-converting v1 lockfiles to v3; otherwise,
maintain current lockfile version.`,
description: `
Set the lockfile format version to be used in package-lock.json and
Expand Down Expand Up @@ -1356,8 +1356,8 @@ const definitions = {
omit: new Definition('omit', {
default: process.env.NODE_ENV === 'production' ? ['dev'] : [],
defaultDescription: `
'dev' if the \`NODE_ENV\` environment variable is set to 'production',
otherwise empty.
'dev' if the \`NODE_ENV\` environment variable is set to 'production';
otherwise, empty.
`,
type: [Array, 'dev', 'optional', 'peer'],
description: `
Expand Down
6 changes: 3 additions & 3 deletions workspaces/config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Config {
}

try {
// This does not have an actual definition because this is not user defineable
// This does not have an actual definition because this is not user definable
defaultsObject['npm-version'] = require(join(this.npmPath, 'package.json')).version
} catch {
// in some weird state where the passed in npmPath does not have a package.json
Expand Down Expand Up @@ -589,7 +589,7 @@ class Config {
if (this.definitions[key]?.exclusive) {
for (const exclusive of this.definitions[key].exclusive) {
if (!this.isDefault(exclusive)) {
throw new TypeError(`--${key} can not be provided when using --${exclusive}`)
throw new TypeError(`--${key} cannot be provided when using --${exclusive}`)
}
}
}
Expand Down Expand Up @@ -672,7 +672,7 @@ class Config {
// if we're in the ~ directory, and there happens to be a node_modules
// folder (which is not TOO uncommon, it turns out), then we can end
// up loading the "project" config where the "userconfig" will be,
// which causes some calamaties. So, we only load project config if
// which causes some calamities. So, we only load project config if
// it doesn't match what the userconfig will be.
if (projectFile !== this.#get('userconfig')) {
return this.#loadFile(projectFile, 'project')
Expand Down
2 changes: 1 addition & 1 deletion workspaces/config/lib/set-envs.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const setEnvs = (config) => {
env.EDITOR = cliConf.editor
}

// note: this doesn't afect the *current* node process, of course, since
// note: this doesn't affect the *current* node process, of course, since
// it's already started, but it does affect the options passed to scripts.
if (cliConf['node-options']) {
env.NODE_OPTIONS = cliConf['node-options']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`test/definitions/definition.js TAP basic definition > description of de

a number

This config can not be used with: \`x\`
This config cannot be used with: \`x\`
`

exports[`test/definitions/definition.js TAP basic definition > human-readable description 1`] = `
Expand Down
2 changes: 1 addition & 1 deletion workspaces/config/test/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ t.test('search options', t => {
description: 'test description',
exclude: 'test search exclude',
limit: 99,
staleneess: 99,
staleness: 99,

}
const obj = {}
Expand Down
4 changes: 2 additions & 2 deletions workspaces/config/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ loglevel = yolo
t.notOk(config.isDefault('cli-config'),
'should return false for a cli-defined value')
t.notOk(config.isDefault('foo'),
'should return false for a env-defined value')
'should return false for an env-defined value')
t.notOk(config.isDefault('project-config'),
'should return false for a project-defined value')
t.notOk(config.isDefault('default-user-config-in-home'),
Expand Down Expand Up @@ -1431,7 +1431,7 @@ t.test('exclusive options conflict', async t => {
})
await t.rejects(config.load(), {
name: 'TypeError',
message: '--lie can not be provided when using --truth',
message: '--lie cannot be provided when using --truth',
})
})

Expand Down
Loading