pnpm
Install locked Node.js dependencies with pnpm.
Install locked Node.js dependencies with pnpm.
The task runs in a node container and keeps node_modules as its output, so it
is skipped when package.json and pnpm-lock.yaml are unchanged.
includes:
pnpm:
git: https://github.com/no0dles/hammerkit.git
ref: v1.16.0
path: catalog/pnpm
tasks:
build:
image: node:24-alpine
deps: [pnpm:install]
cmds:
- npm run buildTasks
| Task | What it does | Reads | Produces |
|---|---|---|---|
install | Install locked Node.js dependencies with pnpm. | package.json, pnpm-lock.yaml | node_modules |
Inputs
| Input | Default | Meaning |
|---|---|---|
NODE_VERSION | 24 | Tag of the node image the install runs in, e.g. 22 or 24. The image is node:<NODE_VERSION>-alpine. |
PNPM_VERSION | 10 | pnpm release to run, fetched with corepack the first time, e.g. 9 or 10.28.0. |
The entry
# Installs the locked dependencies of a Node.js project with pnpm.
envs:
# tag of the node image the install runs in
NODE_VERSION: 24
# pnpm release to run, fetched with corepack
PNPM_VERSION: 10
tasks:
install:
description: install the locked dependencies with pnpm
image: node:${NODE_VERSION}-alpine
src: [package.json, pnpm-lock.yaml]
generates: [node_modules]
envs:
COREPACK_HOME: /tmp/corepack
cmds:
- corepack pnpm@${PNPM_VERSION} install --frozen-lockfile