From 7e3eb231e5b4b5bee315079a5e85073478325473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Tue, 28 Jun 2022 13:57:13 +0200 Subject: [PATCH 1/2] chore: Deprecate singular auth-type config values --- lib/utils/config/definition.js | 1 + lib/utils/config/definitions.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils/config/definition.js b/lib/utils/config/definition.js index f88d8334cf01f..dfe5ac49af2d5 100644 --- a/lib/utils/config/definition.js +++ b/lib/utils/config/definition.js @@ -12,6 +12,7 @@ const allowed = [ 'default', 'defaultDescription', 'deprecated', + 'deprecatedValues', 'description', 'flatten', 'hint', diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 6b35e7d4d05b4..87e97f22af875 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -240,9 +240,10 @@ define('auth-type', { default: 'legacy', type: ['legacy', 'webauthn', 'sso', 'saml', 'oauth'], deprecated: ` - The SSO/SAML/OAuth methods are deprecated and will be removed in + The SSO/SAML/OAuth/Webauthn methods are deprecated and will be removed in a future version of npm in favor of web-based login. `, + deprecatedValues: ['webauthn', 'sso', 'saml', 'oauth'], description: ` What authentication strategy to use with \`adduser\`/\`login\`. From a321b33c4c65d7631d525b1e33770ec76ff42451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Fri, 1 Jul 2022 12:28:38 +0200 Subject: [PATCH 2/2] Docs --- docs/content/using-npm/config.md | 4 ++-- tap-snapshots/test/lib/utils/config/definitions.js.test.cjs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 3fb431402669f..47f5ab27eca92 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -1909,8 +1909,8 @@ When set to `dev` or `development`, this is an alias for `--include=dev`. * Default: "legacy" * Type: "legacy", "webauthn", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with `adduser`/`login`. 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 19909d8c5b35d..b90a9796c4724 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -254,8 +254,8 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for auth- * Default: "legacy" * Type: "legacy", "webauthn", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with \`adduser\`/\`login\`.