From cb92b01e95bc282ece09398e8db220b3d39ecdec Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Wed, 8 Apr 2026 16:13:35 +0200 Subject: [PATCH] docs: recommend pnpm-workspace.yaml for pnpm-registry config The pnpm-registry setting is workspace-specific, not a global npm config. Move it from pnpmConfigFileKeys to excludedPnpmKeys (workspace-only settings) and update both READMEs to show pnpm-workspace.yaml usage. --- config/reader/src/configFileKey.ts | 2 +- registry/client/README.md | 6 +++--- registry/server/README.md | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/config/reader/src/configFileKey.ts b/config/reader/src/configFileKey.ts index 8cf928181e..8f6f7ef787 100644 --- a/config/reader/src/configFileKey.ts +++ b/config/reader/src/configFileKey.ts @@ -41,7 +41,6 @@ export const pnpmConfigFileKeys = [ 'npm-path', 'npmrc-auth-file', 'package-import-method', - 'pnpm-registry', 'prefer-frozen-lockfile', 'prefer-offline', 'prefer-symlinked-executables', @@ -103,6 +102,7 @@ export const excludedPnpmKeys = [ 'pack-gzip-level', 'patches-dir', 'pnpmfile', + 'pnpm-registry', 'package-manager-strict', 'package-manager-strict-version', 'prefer-workspace-packages', diff --git a/registry/client/README.md b/registry/client/README.md index 6906c71b74..a409b526f7 100644 --- a/registry/client/README.md +++ b/registry/client/README.md @@ -36,8 +36,8 @@ console.log(`${stats.alreadyInStore} cached, ${stats.filesToDownload} files down ## Configuration -Set in `.npmrc` to enable automatically during `pnpm install`: +Add to `pnpm-workspace.yaml` to enable automatically during `pnpm install`: -```ini -pnpm-registry=http://localhost:4000 +```yaml +pnpmRegistry: http://localhost:4000 ``` diff --git a/registry/server/README.md b/registry/server/README.md index 04294ca878..302477d097 100644 --- a/registry/server/README.md +++ b/registry/server/README.md @@ -70,11 +70,21 @@ Terminal 2 — use it from any project: ```bash cd my-project -echo 'pnpm-registry=http://localhost:4873' >> .npmrc +``` + +Add to `pnpm-workspace.yaml`: + +```yaml +pnpmRegistry: http://localhost:4873 +``` + +Then run: + +```bash pnpm install ``` -That's it. pnpm will resolve dependencies on the server, download only the files missing from your local store, and link `node_modules` as usual. Remove the `.npmrc` line to go back to normal behavior. +That's it. pnpm will resolve dependencies on the server, download only the files missing from your local store, and link `node_modules` as usual. Remove the `pnpmRegistry` line to go back to normal behavior. ## API