npm_deprecate
Deprecate npm packages or specific versions with a warning message shown on install. Specify a semver range or target all versions to alert users.
Instructions
Deprecate a package or specific versions. Shows a warning message on install. Uses the HTTP API with NPM_TOKEN, so no CLI login or OTP prompt is involved; a token without 2FA bypass is refused with 401 or 403. Registry hard limit: deprecation messages must be <= 1024 characters. A message over the limit, or a versionRange matching no published version, is rejected locally as HTTP 400 before any write; a 422 from the registry describes the packument that was sent. Message punctuation is never checked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name (e.g. '@yawlabs/spend') | |
| message | Yes | Deprecation message. Use npm_undeprecate to clear. | |
| versionRange | No | Semver range. Omit to deprecate ALL versions. Example: '<1.0.0' or '0.3.x'. Standard semver applies — bare integers are x-ranges (e.g. '0' means '0.x.x', not exact version 0). For a single version use '=1.2.3'. |