mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-27 10:30:58 -04:00
Adds native `pnpm deprecate` and `pnpm undeprecate` commands that interact with the npm registry directly instead of delegating to the npm CLI. ## Changes - **New package `@pnpm/registry-access.commands`** — a new top-level domain for commands that manage packages on the registry - **`pnpm deprecate <package>[@<version>] <message>`** — sets a deprecation message on matching versions - **`pnpm undeprecate <package>[@<version>]`** — removes deprecation from already-deprecated versions - Updated `pnpm-workspace.yaml`, CLI registration, and meta-updater config - Removed `deprecate` from the not-implemented commands list - Added changeset ## Implementation Details - `registry-access/commands/src/deprecation/common.ts` — shared logic (auth, registry fetch, version matching) - `registry-access/commands/src/deprecation/deprecate.ts` — deprecate command handler - `registry-access/commands/src/deprecation/undeprecate.ts` — undeprecate command handler - Uses `pickRegistryForPackage` for per-scope registry support - Uses `createFetchFromRegistry`/`fetchWithDispatcher` for proxy/TLS support - Uses `@pnpm/npm-package-arg` for package spec parsing - Reuses `PackageMeta`/`PackageInRegistry` types from `@pnpm/resolving.registry.types` - Sends minimal payload (only `name` + modified `versions.deprecated` fields) to the registry ## Usage ```bash # Deprecate all versions pnpm deprecate my-package "This package is deprecated" # Deprecate a specific version pnpm deprecate my-package@1.0.0 "Use v2 instead" # Undeprecate all versions pnpm undeprecate my-package # Undeprecate a specific version pnpm undeprecate my-package@1.0.0 ``` --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
19 lines
303 B
JSON
19 lines
303 B
JSON
{
|
|
"extends": "../tsconfig.json",
|
|
"compilerOptions": {
|
|
"noEmit": false,
|
|
"outDir": "../node_modules/.test.lib",
|
|
"rootDir": "..",
|
|
"isolatedModules": true
|
|
},
|
|
"include": [
|
|
"**/*.ts",
|
|
"../../../__typings__/**/*.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": ".."
|
|
}
|
|
]
|
|
}
|