diff options
-rw-r--r-- | docs/content/commands/npm-adduser.md | 19 | ||||
-rw-r--r-- | docs/content/using-npm/config.md | 12 | ||||
-rw-r--r-- | lib/adduser.js | 1 | ||||
-rw-r--r-- | lib/utils/config/definitions.js | 10 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/config/definitions.js.test.cjs | 1 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs | 8 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 4 | ||||
-rw-r--r-- | test/lib/utils/config/definitions.js | 6 |
8 files changed, 8 insertions, 53 deletions
diff --git a/docs/content/commands/npm-adduser.md b/docs/content/commands/npm-adduser.md index d0ddd68c2..9ad4c27c6 100644 --- a/docs/content/commands/npm-adduser.md +++ b/docs/content/commands/npm-adduser.md @@ -7,7 +7,7 @@ description: Add a registry user account ### Synopsis ```bash -npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy] +npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy] aliases: login, add-user ``` @@ -58,23 +58,6 @@ npm adduser --registry=http://myregistry.example.com --scope=@myco This will set a registry for the given scope and login or create a user for that registry at the same time. -#### always-auth - -Default: false - -If specified, save configuration indicating that all requests to the given -registry should include authorization information. Useful for private -registries. Can be used with `--registry` and / or `--scope`, e.g. - -```bash -npm adduser --registry=http://private-registry.example.com --always-auth -``` - -This will ensure that all requests to that registry (including for tarballs) -include an authorization header. This setting may be necessary for use with -private registries where metadata and package tarballs are stored on hosts with -different hostnames. See `always-auth` in [`config`](/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration. - #### auth-type * Default: `'legacy'` diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 1a70c29f9..76ac4192f 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -165,14 +165,6 @@ upon by the current project. Prevents throwing an error when `npm version` is used to set the new version to the same value as the current version. -#### `always-auth` - -* Default: false -* Type: Boolean - -Force npm to always require authentication when accessing the registry, even -for `GET` requests. - #### `audit` * Default: true @@ -1087,8 +1079,8 @@ installation of packages specified according to the pattern * Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows * Type: null or String -The shell to use for scripts run with the `npm exec`, `npm run` and -`npm init <pkg>` commands. +The shell to use for scripts run with the `npm exec`, `npm run` and `npm +init <pkg>` commands. #### `searchexclude` diff --git a/lib/adduser.js b/lib/adduser.js index f35b9829f..fb1e32351 100644 --- a/lib/adduser.js +++ b/lib/adduser.js @@ -21,7 +21,6 @@ class AddUser extends BaseCommand { return [ 'registry', 'scope', - 'always-auth', ] } diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index f8c6b41f3..3a50175d5 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -199,16 +199,6 @@ define('also', { }, }) -define('always-auth', { - default: false, - type: Boolean, - description: ` - Force npm to always require authentication when accessing the registry, - even for \`GET\` requests. - `, - flatten, -}) - define('audit', { default: true, type: Boolean, diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index b3d920a0c..32443c57a 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -12,7 +12,6 @@ Array [ "all", "allow-same-version", "also", - "always-auth", "audit", "audit-level", "auth-type", diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index ce520e748..d6761ea30 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -44,14 +44,6 @@ upon by the current project. Prevents throwing an error when \`npm version\` is used to set the new version to the same value as the current version. -#### \`always-auth\` - -* Default: false -* Type: Boolean - -Force npm to always require authentication when accessing the registry, even -for \`GET\` requests. - #### \`audit\` * Default: true diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs index 946cfba90..ad61dc796 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -190,7 +190,7 @@ All commands: npm adduser Options: - [--registry <registry>] [--scope <@scope>] [--always-auth] + [--registry <registry>] [--scope <@scope>] aliases: login, add-user @@ -565,7 +565,7 @@ All commands: npm adduser Options: - [--registry <registry>] [--scope <@scope>] [--always-auth] + [--registry <registry>] [--scope <@scope>] aliases: login, add-user diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js index dce69b7f6..f73522365 100644 --- a/test/lib/utils/config/definitions.js +++ b/test/lib/utils/config/definitions.js @@ -29,9 +29,9 @@ t.equal(definitions['node-version'].default, process.version, 'node-version defa t.test('basic flattening function camelCases from css-case', t => { const flat = {} - const obj = { 'always-auth': true } - definitions['always-auth'].flatten('always-auth', obj, flat) - t.strictSame(flat, { alwaysAuth: true }) + const obj = { 'prefer-online': true } + definitions['prefer-online'].flatten('prefer-online', obj, flat) + t.strictSame(flat, { preferOnline: true }) t.end() }) |