{"id":13485104,"url":"https://github.com/pnpm/action-setup","last_synced_at":"2025-04-08T22:20:08.454Z","repository":{"id":37073946,"uuid":"262289747","full_name":"pnpm/action-setup","owner":"pnpm","description":"Install pnpm package manager","archived":false,"fork":false,"pushed_at":"2024-08-14T14:07:48.000Z","size":3684,"stargazers_count":930,"open_issues_count":46,"forks_count":89,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T15:22:24.618Z","etag":null,"topics":["actions","ci","github-actions","nodejs","pnpm"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-pnpm","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://opencollective.com/pnpm"]}},"created_at":"2020-05-08T10:06:29.000Z","updated_at":"2024-10-28T21:21:26.000Z","dependencies_parsed_at":"2023-01-04T12:49:14.550Z","dependency_job_id":"d94a5c93-c733-4221-9c52-523066f8423a","html_url":"https://github.com/pnpm/action-setup","commit_stats":{"total_commits":171,"total_committers":28,"mean_commits":6.107142857142857,"dds":"0.32748538011695905","last_synced_commit":"ac5bf11548bf5e19b8aadb8182072616590fa4a6"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Faction-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Faction-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Faction-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Faction-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnpm","download_url":"https://codeload.github.com/pnpm/action-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247935087,"owners_count":21020770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","ci","github-actions","nodejs","pnpm"],"created_at":"2024-07-31T17:01:46.093Z","updated_at":"2025-04-08T22:20:08.416Z","avatar_url":"https://github.com/pnpm.png","language":"TypeScript","funding_links":["https://opencollective.com/pnpm"],"categories":["TypeScript","nodejs"],"sub_categories":[],"readme":"\u003e ## :warning: Upgrade from v2!\n\u003e\n\u003e The v2 version of this action [has stopped working](https://github.com/pnpm/action-setup/issues/135) with newer Node.js versions. Please, upgrade to the latest version to fix any issues.\n\n# Setup pnpm\n\nInstall pnpm package manager.\n\n## Inputs\n\n### `version`\n\nVersion of pnpm to install.\n\n**Optional** when there is a [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).\n\notherwise, this field is **required** It supports npm versioning scheme, it could be an exact version (such as `6.24.1`), or a version range (such as `6`, `6.x.x`, `6.24.x`, `^6.24.1`, `*`, etc.), or `latest`.\n\n### `dest`\n\n**Optional** Where to store pnpm files.\n\n### `run_install`\n\n**Optional** (_default:_ `null`) If specified, run `pnpm install`.\n\nIf `run_install` is either `null` or `false`, pnpm will not install any npm package.\n\nIf `run_install` is `true`, pnpm will install dependencies recursively.\n\nIf `run_install` is a YAML string representation of either an object or an array, pnpm will execute every install commands.\n\n#### `run_install.recursive`\n\n**Optional** (_type:_ `boolean`, _default:_ `false`) Whether to use `pnpm recursive install`.\n\n#### `run_install.cwd`\n\n**Optional** (_type:_ `string`) Working directory when run `pnpm [recursive] install`.\n\n#### `run_install.args`\n\n**Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--frozen-lockfile, --strict-peer-dependencies]`.\n\n### `package_json_file`\n\n**Optional** (_type:_ `string`, _default:_ `package.json`) File path to the `package.json`/[`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) to read \"packageManager\" configuration.\n\n### `standalone`\n\n**Optional** (_type:_ `boolean`, _default:_ `false`) When set to true, [@pnpm/exe](https://www.npmjs.com/package/@pnpm/exe), which is a Node.js bundled package, will be installed, enabling using `pnpm` without Node.js.\n\nThis is useful when you want to use a incompatible pair of Node.js and pnpm.\n\n## Outputs\n\n### `dest`\n\nExpanded path of inputs#dest.\n\n### `bin_dest`\n\nLocation of `pnpm` and `pnpx` command.\n\n## Usage example\n\n### Install only pnpm without `packageManager`\n\nThis works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager`.\n\n```yaml\non:\n  - push\n  - pull_request\n\njobs:\n  install:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: pnpm/action-setup@v4\n        with:\n          version: 10\n```\n\n###  Install only pnpm with `packageManager`\n\nOmit `version` input to use the version in the [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).\n\n```yaml\non:\n  - push\n  - pull_request\n\njobs:\n  install:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: pnpm/action-setup@v4\n```\n\n### Install pnpm and a few npm packages\n\n```yaml\non:\n  - push\n  - pull_request\n\njobs:\n  install:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: pnpm/action-setup@v4\n        with:\n          version: 10\n          run_install: |\n            - recursive: true\n              args: [--frozen-lockfile, --strict-peer-dependencies]\n            - args: [--global, gulp, prettier, typescript]\n```\n\n### Use cache to reduce installation time\n\n```yaml\non:\n  - push\n  - pull_request\n\njobs:\n  cache-and-install:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - uses: pnpm/action-setup@v4\n        name: Install pnpm\n        with:\n          version: 10\n          run_install: false\n\n      - name: Install Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: 'pnpm'\n\n      - name: Install dependencies\n        run: pnpm install\n```\n\n**Note:** You don't need to run `pnpm store prune` at the end; post-action has already taken care of that.\n\n## Notes\n\nThis action does not setup Node.js for you, use [actions/setup-node](https://github.com/actions/setup-node) yourself.\n\n## License\n\n[MIT](https://github.com/pnpm/action-setup/blob/master/LICENSE.md) © [Hoàng Văn Khải](https://github.com/KSXGitHub/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Faction-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnpm%2Faction-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Faction-setup/lists"}