← All procedures
npm.deprecate
Deprecate versions of a package in the registry. An empty message removes it. It needs confirm: true
CLI- Package
- @procedures/npm · README
- Path
["npm","deprecate"]- CLI
mark npm deprecate --package <string> --message <string> --confirm <boolean>- As data
{"$proc":["npm","deprecate"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/npm/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["npm","deprecate"], { package: "<package>", message: "<message>", confirm: true });
console.log(JSON.stringify(result));From the command line
$ mark npm deprecate --package <string> --message <string> --confirm <boolean>
As data, in a program
{
"$proc": ["npm", "deprecate"],
"input": {
"package": "<package>",
"message": "<message>",
"confirm": true
}
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"package": {
"type": "string",
"description": "The package and the versions, for example my-package@<2.0.0. Without a range: all versions"
},
"message": {
"type": "string",
"description": "The message that npm shows at each install of the versions. An empty message removes the deprecation"
},
"confirm": {
"type": "boolean",
"const": true,
"description": "Must be true: the call changes the registry for each user of the package"
},
"otp": {
"description": "A one-time password, when the account has two-factor authentication",
"type": "string"
},
"registry": {
"description": "The URL of the registry (default: the registry of the npm configuration)",
"type": "string"
},
"cwd": {
"description": "Working directory",
"type": "string"
},
"timeout": {
"description": "Timeout in milliseconds",
"type": "number"
}
},
"required": [
"package",
"message",
"confirm"
]
},
"output": {
"type": "object",
"properties": {
"exitCode": {
"type": "number",
"description": "The exit code of npm (0 is success)"
},
"stdout": {
"type": "string",
"description": "The standard output of npm"
},
"stderr": {
"type": "string",
"description": "The standard error of npm, or the error message when npm did not start"
},
"success": {
"type": "boolean",
"description": "True when the exit code is 0"
},
"duration": {
"type": "number",
"description": "The time of the command, in milliseconds"
}
},
"required": [
"exitCode",
"stdout",
"stderr",
"success",
"duration"
],
"additionalProperties": {}
}
}