← All procedures

pnpm.update

Update packages to their newest versions in the ranges, or with latest to the latest versions

CLI
Package
@procedures/pnpm · README
Path
["pnpm","update"]
CLI
mark pnpm update
As data
{"$proc":["pnpm","update"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/pnpm/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["pnpm","update"], {});
console.log(JSON.stringify(result));

From the command line

$ mark pnpm update

As data, in a program

{ "$proc": ["pnpm", "update"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
packagesstring[]noUpdate only these packages (names or patterns). Default: all
latestbooleannoUpdate to the latest versions, also out of the ranges of package.json (--latest)
prodbooleannoOnly the dependencies, not the dev dependencies (--prod)
devbooleannoOnly the dev dependencies (--dev)
filterstring[]noRun in the workspace packages that these pnpm selectors match, for example @scope/app or ./packages/** (--filter)
recursivebooleannoRun in each package of the workspace (--recursive)
cwdstringnoWorking directory
timeoutnumbernoTimeout in milliseconds

Output

FieldTypeRequiredDefaultDescription
exitCodenumberyesThe exit code of pnpm (0 is success)
stdoutstringyesThe standard output of pnpm
stderrstringyesThe standard error of pnpm, or the error message when pnpm did not start
successbooleanyesTrue when the exit code is 0
durationnumberyesThe time of the command, in milliseconds
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "packages": {
        "description": "Update only these packages (names or patterns). Default: all",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "latest": {
        "description": "Update to the latest versions, also out of the ranges of package.json (--latest)",
        "type": "boolean"
      },
      "prod": {
        "description": "Only the dependencies, not the dev dependencies (--prod)",
        "type": "boolean"
      },
      "dev": {
        "description": "Only the dev dependencies (--dev)",
        "type": "boolean"
      },
      "filter": {
        "description": "Run in the workspace packages that these pnpm selectors match, for example @scope/app or ./packages/** (--filter)",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "recursive": {
        "description": "Run in each package of the workspace (--recursive)",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      },
      "timeout": {
        "description": "Timeout in milliseconds",
        "type": "number"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "exitCode": {
        "type": "number",
        "description": "The exit code of pnpm (0 is success)"
      },
      "stdout": {
        "type": "string",
        "description": "The standard output of pnpm"
      },
      "stderr": {
        "type": "string",
        "description": "The standard error of pnpm, or the error message when pnpm 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": {}
  }
}