diff --git a/src/schemas/json/pnpm-workspace.json b/src/schemas/json/pnpm-workspace.json index 1e24fc47fac..2e16d7b7957 100644 --- a/src/schemas/json/pnpm-workspace.json +++ b/src/schemas/json/pnpm-workspace.json @@ -993,6 +993,14 @@ "type": "string" } }, + "namedRegistries": { + "description": "Defines named registry aliases that can be used as a prefix when installing packages, e.g. `pnpm add work:@corp/lib@^2.0.0` resolves `@corp/lib@^2.0.0` against the configured URL. Built-in aliases `gh:` (https://npm.pkg.github.com/) and `npmjs:` (https://registry.npmjs.org/) work without any configuration and can be overridden. An alias must start with a letter and contain only letters, digits, `.`, `_`, and `-`. Added in pnpm 11.1.0.", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uri" + } + }, "virtualStoreOnly": { "description": "When set to true, pnpm populates the virtual store without creating importer symlinks, hoisting, bin links, or running lifecycle scripts. This is useful for pre-populating a store (e.g., in Nix builds) without creating unnecessary project-level artifacts. pnpm fetch uses this mode internally.", "type": "boolean" diff --git a/src/test/pnpm-workspace/pnpm-workspace.yaml b/src/test/pnpm-workspace/pnpm-workspace.yaml index fb5c03d6f63..25d36ae0c06 100644 --- a/src/test/pnpm-workspace/pnpm-workspace.yaml +++ b/src/test/pnpm-workspace/pnpm-workspace.yaml @@ -53,3 +53,8 @@ versioning: - '!./packages/private-*' changelog: storage: repository + +# https://pnpm.io/settings/dependency-resolution#namedregistries +namedRegistries: + gh: https://npm.pkg.github.example.com/ + work: https://npm.work.example.com/