Skip to content

Commit 66ed584

Browse files
authored
feat: default auth-type to web (#5551)
BREAKING CHANGE: the default `auth-type` config value is now `web`
1 parent 0d90a01 commit 66ed584

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

docs/content/commands/npm-adduser.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ npm init --scope=@foo --yes
8282

8383
#### `auth-type`
8484

85-
* Default: "legacy"
85+
* Default: "web"
8686
* Type: "legacy" or "web"
8787

8888
What authentication strategy to use with `login`.

docs/content/commands/npm-login.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ npm init --scope=@foo --yes
8989

9090
#### `auth-type`
9191

92-
* Default: "legacy"
92+
* Default: "web"
9393
* Type: "legacy" or "web"
9494

9595
What authentication strategy to use with `login`.

docs/content/using-npm/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ exit code.
217217

218218
#### `auth-type`
219219

220-
* Default: "legacy"
220+
* Default: "web"
221221
* Type: "legacy" or "web"
222222

223223
What authentication strategy to use with `login`.

lib/utils/config/definitions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ define('audit-level', {
237237
})
238238

239239
define('auth-type', {
240-
default: 'legacy',
240+
default: 'web',
241241
type: ['legacy', 'web'],
242242
description: `
243243
What authentication strategy to use with \`login\`.

tap-snapshots/test/lib/commands/config.js.test.cjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
2020
"also": null,
2121
"audit": true,
2222
"audit-level": null,
23-
"auth-type": "legacy",
23+
"auth-type": "web",
2424
"before": null,
2525
"bin-links": true,
2626
"browser": null,
@@ -173,7 +173,7 @@ allow-same-version = false
173173
also = null
174174
audit = true
175175
audit-level = null
176-
auth-type = "legacy"
176+
auth-type = "web"
177177
before = null
178178
bin-links = true
179179
browser = null

tap-snapshots/test/lib/utils/config/definitions.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ exit code.
251251
exports[`test/lib/utils/config/definitions.js TAP > config description for auth-type 1`] = `
252252
#### \`auth-type\`
253253
254-
* Default: "legacy"
254+
* Default: "web"
255255
* Type: "legacy" or "web"
256256
257257
What authentication strategy to use with \`login\`.

tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ exit code.
9090
9191
#### \`auth-type\`
9292
93-
* Default: "legacy"
93+
* Default: "web"
9494
* Type: "legacy" or "web"
9595
9696
What authentication strategy to use with \`login\`.

test/lib/commands/adduser.js

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ t.test('legacy', async t => {
2525
'process.stdout': new stream.PassThrough(), // to quiet readline
2626
}, { replace: true })
2727
const { npm, home } = await loadMockNpm(t, {
28+
config: { 'auth-type': 'legacy' },
2829
homeDir: {
2930
// These all get cleaned up by config.setCredentialsByURI
3031
'.npmrc': [
@@ -72,6 +73,7 @@ t.test('legacy', async t => {
7273
}, { replace: true })
7374
const { npm, home } = await loadMockNpm(t, {
7475
config: {
76+
'auth-type': 'legacy',
7577
scope: '@myscope',
7678
},
7779
})
@@ -109,6 +111,7 @@ t.test('legacy', async t => {
109111
'.npmrc': '@myscope:registry=https://diff-registry.npmjs.org',
110112
},
111113
config: {
114+
'auth-type': 'legacy',
112115
scope: '@myscope',
113116
},
114117
})
@@ -142,6 +145,7 @@ t.test('legacy', async t => {
142145
'process.stdout': new stream.PassThrough(), // to quiet readline
143146
}, { replace: true })
144147
const { npm } = await loadMockNpm(t, {
148+
config: { 'auth-type': 'legacy' },
145149
homeDir: {
146150
'.npmrc': {},
147151
},

0 commit comments

Comments
 (0)