From 906aaccf7ab9279ae51db7fb291b0007fcea7a92 Mon Sep 17 00:00:00 2001 From: "liang.chen" Date: Mon, 14 Apr 2025 20:25:57 +0800 Subject: [PATCH 1/2] docs: clarify legacy token creation in npm login and adduser commands --- docs/lib/content/commands/npm-adduser.md | 2 ++ docs/lib/content/commands/npm-login.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/lib/content/commands/npm-adduser.md b/docs/lib/content/commands/npm-adduser.md index 061c020ecb28b..305e8d2ff8ced 100644 --- a/docs/lib/content/commands/npm-adduser.md +++ b/docs/lib/content/commands/npm-adduser.md @@ -14,6 +14,8 @@ Create a new user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`registry`](/using-npm/registry)). +When you run `npm adduser`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). + When using `legacy` for your `auth-type`, the username, password, and email are read in from prompts. diff --git a/docs/lib/content/commands/npm-login.md b/docs/lib/content/commands/npm-login.md index a3f416e5042e9..6843109382855 100644 --- a/docs/lib/content/commands/npm-login.md +++ b/docs/lib/content/commands/npm-login.md @@ -14,6 +14,8 @@ Verify a user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`config`](/using-npm/config)). +When you run `npm login`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). + When using `legacy` for your `auth-type`, the username and password, are read in from prompts. From 877674262f515866e41b1f82e51df0c837886e5b Mon Sep 17 00:00:00 2001 From: "liang.chen" Date: Mon, 14 Apr 2025 23:28:10 +0800 Subject: [PATCH 2/2] docs: format publish as code to highlight it --- docs/lib/content/commands/npm-adduser.md | 2 +- docs/lib/content/commands/npm-login.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/lib/content/commands/npm-adduser.md b/docs/lib/content/commands/npm-adduser.md index 305e8d2ff8ced..63626bec2cf56 100644 --- a/docs/lib/content/commands/npm-adduser.md +++ b/docs/lib/content/commands/npm-adduser.md @@ -14,7 +14,7 @@ Create a new user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`registry`](/using-npm/registry)). -When you run `npm adduser`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). +When you run `npm adduser`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). When using `legacy` for your `auth-type`, the username, password, and email are read in from prompts. diff --git a/docs/lib/content/commands/npm-login.md b/docs/lib/content/commands/npm-login.md index 6843109382855..45dd04abdbad4 100644 --- a/docs/lib/content/commands/npm-login.md +++ b/docs/lib/content/commands/npm-login.md @@ -14,7 +14,7 @@ Verify a user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`config`](/using-npm/config)). -When you run `npm login`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). +When you run `npm login`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens). When using `legacy` for your `auth-type`, the username and password, are read in from prompts.