pnpm
Status
Section titled “Status”Version: 1.0.0 | Tests: Passing
{
"features": {
"ghcr.io/infrashift/trusted-devcontainer-features/pnpm:latest": {
"target_version": "10.12.1"
}
}
} Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
target_version | string | 10.12.1 | Select a supported pnpm version |
target_checksum | string | "" | SHA256 checksum for the pnpm binary |
Dependencies
Section titled “Dependencies”How It Works
Section titled “How It Works”This feature downloads the pnpm binary from the official GitHub releases. The Ansible playbook creates the ~/.local/share/pnpm directory, downloads the pnpm binary for the specified version, and optionally verifies the SHA256 checksum if one is provided via the target_checksum option. Once downloaded, the executable bit is set and PNPM_HOME and PATH are configured so the pnpm command is immediately available.
pnpm requires Node.js to be installed, as it uses the Node.js runtime under the hood. This dependency is declared in the feature configuration, so including pnpm in your devcontainer will automatically trigger Node.js installation first through the dependency chain.
pnpm is an alternative package manager for Node.js that uses a content-addressable store and hard links to save disk space and improve installation speed. It enforces strict dependency isolation by default, which prevents phantom dependencies that can cause subtle bugs in projects managed by npm or Yarn. If your project uses a pnpm-lock.yaml lockfile, this feature ensures you have the right pnpm version available in the devcontainer.