mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -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>
181 lines
3.0 KiB
JSON
181 lines
3.0 KiB
JSON
{
|
|
"extends": "@pnpm/tsconfig",
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"outDir": "lib",
|
|
"rootDir": "src",
|
|
"ignoreDeprecations": "5.0"
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"../__typings__/**/*.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../__utils__/assert-project"
|
|
},
|
|
{
|
|
"path": "../__utils__/prepare"
|
|
},
|
|
{
|
|
"path": "../__utils__/test-fixtures"
|
|
},
|
|
{
|
|
"path": "../__utils__/test-ipc-server"
|
|
},
|
|
{
|
|
"path": "../auth/commands"
|
|
},
|
|
{
|
|
"path": "../building/commands"
|
|
},
|
|
{
|
|
"path": "../cache/commands"
|
|
},
|
|
{
|
|
"path": "../cli/command"
|
|
},
|
|
{
|
|
"path": "../cli/commands"
|
|
},
|
|
{
|
|
"path": "../cli/common-cli-options-help"
|
|
},
|
|
{
|
|
"path": "../cli/default-reporter"
|
|
},
|
|
{
|
|
"path": "../cli/meta"
|
|
},
|
|
{
|
|
"path": "../cli/parse-cli-args"
|
|
},
|
|
{
|
|
"path": "../cli/utils"
|
|
},
|
|
{
|
|
"path": "../config/commands"
|
|
},
|
|
{
|
|
"path": "../config/reader"
|
|
},
|
|
{
|
|
"path": "../config/version-policy"
|
|
},
|
|
{
|
|
"path": "../core/constants"
|
|
},
|
|
{
|
|
"path": "../core/core-loggers"
|
|
},
|
|
{
|
|
"path": "../core/error"
|
|
},
|
|
{
|
|
"path": "../core/logger"
|
|
},
|
|
{
|
|
"path": "../core/types"
|
|
},
|
|
{
|
|
"path": "../crypto/hash"
|
|
},
|
|
{
|
|
"path": "../deps/compliance/commands"
|
|
},
|
|
{
|
|
"path": "../deps/inspection/commands"
|
|
},
|
|
{
|
|
"path": "../deps/path"
|
|
},
|
|
{
|
|
"path": "../engine/pm/commands"
|
|
},
|
|
{
|
|
"path": "../engine/runtime/commands"
|
|
},
|
|
{
|
|
"path": "../exec/commands"
|
|
},
|
|
{
|
|
"path": "../hooks/pnpmfile"
|
|
},
|
|
{
|
|
"path": "../installing/client"
|
|
},
|
|
{
|
|
"path": "../installing/commands"
|
|
},
|
|
{
|
|
"path": "../installing/env-installer"
|
|
},
|
|
{
|
|
"path": "../installing/modules-yaml"
|
|
},
|
|
{
|
|
"path": "../lockfile/fs"
|
|
},
|
|
{
|
|
"path": "../lockfile/types"
|
|
},
|
|
{
|
|
"path": "../patching/commands"
|
|
},
|
|
{
|
|
"path": "../pkg-manifest/reader"
|
|
},
|
|
{
|
|
"path": "../registry-access/commands"
|
|
},
|
|
{
|
|
"path": "../releasing/commands"
|
|
},
|
|
{
|
|
"path": "../shell/path"
|
|
},
|
|
{
|
|
"path": "../store/cafs"
|
|
},
|
|
{
|
|
"path": "../store/commands"
|
|
},
|
|
{
|
|
"path": "../store/connection-manager"
|
|
},
|
|
{
|
|
"path": "../store/index"
|
|
},
|
|
{
|
|
"path": "../worker"
|
|
},
|
|
{
|
|
"path": "../workspace/commands"
|
|
},
|
|
{
|
|
"path": "../workspace/project-manifest-reader"
|
|
},
|
|
{
|
|
"path": "../workspace/project-manifest-writer"
|
|
},
|
|
{
|
|
"path": "../workspace/projects-filter"
|
|
},
|
|
{
|
|
"path": "../workspace/projects-graph"
|
|
},
|
|
{
|
|
"path": "../workspace/projects-reader"
|
|
},
|
|
{
|
|
"path": "../workspace/root-finder"
|
|
},
|
|
{
|
|
"path": "../workspace/state"
|
|
},
|
|
{
|
|
"path": "../workspace/workspace-manifest-reader"
|
|
}
|
|
]
|
|
}
|