1
0
mirror of https://github.com/pnpm/action-setup.git synced 2026-06-26 16:43:47 +08:00

Compare commits

...

154 Commits

Author SHA1 Message Date
Oscar Busk
8a1f0929f7 Merge 35353b8037 into 3a0024f066 2025-12-05 16:51:05 +01:00
silverwind
3a0024f066 Remove unused @types/node-fetch dependency (#186) 2025-12-05 16:50:59 +01:00
Roman Usherenko
72f04517b7 Update README.md (#175)
fix the string run_install example
2025-12-05 15:32:46 +01:00
Oscar Busk
35353b8037 Add store_prune to run name 2025-10-28 01:07:44 +01:00
Oscar Busk
4f04570f82 Add store_prune to tests 2025-10-28 00:58:14 +01:00
Oscar Busk
40fbc12c16 Actually check for run_install before store_prune, to match documentation 2025-10-28 00:45:12 +01:00
Oscar Busk
14f23f2699 Add more documentation regarding caching, pruning and the run_install and store_prune options 2025-10-28 00:44:29 +01:00
Oscar Busk
6a5147c614 Update documentation about pnpm store prune 2025-10-28 00:41:07 +01:00
Oscar Busk
82352014bc Add option to disable automatic pruning of store 2025-10-28 00:35:57 +01:00
Oscar Busk
37f0218d62 Make the message when not pruning more helpful
The original message made it sound like it checked the store and decided there was nothing to prune, in reality pruning just did not run if run_install was not set.
2025-10-28 00:31:32 +01:00
Oscar Busk
3cec5320c9 Run pruning as part of main action, not in post
The post action will execute too late to actually improve any caching. By pruning directly after running pnpm install(s), we make sure the store is as clean as possible before continuing. This means any attempt to cache the pnpm store will be caching a pruned store
2025-10-28 00:26:18 +01:00
Adrian Riedel
41ff726559 feat: support installation from custom NPM registry (#179)
copy .npmrc from GitHub workspace if it exists so that PNPM respects custom
registry configurations when self-installing
2025-10-08 10:48:14 +02:00
Matthias
f2b2b233b5 Remove --frozen-lockfile from examples (#171) 2025-07-11 00:08:35 +02:00
Matthias
77504a59bc Fix multiline run_install example in README.md (#167) 2025-06-25 18:10:02 +02:00
Kevin Cui
d648c2dd06 fix: not allow install multiple package manager (#161)
When a project has both npm and pnpm, using pnpm/action-setup will result in an error: `Multiple versions of pnpm specified`.

The previous implementation was only meant to avoid the "ERR_PNPM_BAD_PM_VERSION" error, but it did not take into account the situation of multiple different package managers.

Signed-off-by: Kevin Cui <bh@bugs.cc>
2025-03-28 08:37:14 +08:00
Zoltan Kochan
a7487c7e89 feat: update dist 2025-02-06 22:30:07 +01:00
Zoltan Kochan
fff70888d0 test: update pnpm to v9 2025-02-06 22:24:21 +01:00
Daniel Bayley
6e3017af18 docs: support package.yaml (#157) 2025-02-06 22:13:04 +01:00
Daniel Bayley
0cb0538c33 feat: support package.yaml (#156) 2025-02-06 22:04:41 +01:00
Azat S.
e303250a24 docs: update pnpm version in readme examples (#154) 2025-01-09 00:42:18 +01:00
Karl Horky
ac5bf11548 Update examples to use pnpm v9 (#142) 2024-08-14 16:07:48 +02:00
its-monotype
18ac635edf docs: remove redundant manual cache due to setup-node cache (#131) 2024-07-05 15:24:26 +02:00
Zoltan Kochan
0d0b43217a docs: add warning about v2 2024-07-05 14:37:28 +02:00
Karl Horky
0eb0e97082 Add readme example for omitting version (#134)
* Add readme example for omitting `version`

* docs: more detailed explanations

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>
2024-07-04 10:37:24 +02:00
hyesung oh
23657c8550 docs: change order of setup node and pnpm (#129) 2024-06-16 14:33:23 +02:00
Linda_pp
5d79380f29 fix: add missing outputs metadata to action.yml (#127) 2024-06-12 16:45:37 +02:00
Ben McCann
562dbbf611 fix: correct typo in error message (#125) 2024-06-12 16:44:03 +02:00
Ben McCann
00884bcdc5 docs: use cached pnpm installation (#128) 2024-06-12 16:38:46 +02:00
Zoltan Kochan
fe02b34f77 docs: bump action-setup version in README 2024-05-07 15:16:48 +02:00
Karl Horky
bee1f099e5 feat: throw error when multiple versions specified (#122)
* Throw error when multiple versions specified

* fix: fmt

* fix: fmt

* Swallow error on ENOENT

* Match versions

* refactor: install pnpm

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-05-06 23:24:46 +02:00
Sukka
ce859e384f refactor: replace fs-extra with Node.js built-in fs methods (#120) 2024-04-16 11:26:31 +02:00
Zoltan Kochan
2ab6dce4f5 docs(README): fix link to LICENSE 2024-03-27 22:17:57 +01:00
Ethan Neff
e280758d01 docs(README): update dependency versions (#117) 2024-03-27 22:12:51 +01:00
dependabot[bot]
129abb77bf Bump undici from 5.28.2 to 5.28.3 (#115)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 10:59:33 +01:00
Zoltan Kochan
a3252b78c4 docs(README): update version 2024-02-08 11:28:50 +01:00
Erik Burton
1ee9c9d01d feat!: node20 upgrade (#110)
* upgrade versions to latest

* remove usage of ts-schema-autogen

* fix: update pnpm sources

* update build/output

* use node20

* fix: run-install array output

* fix: maintain behaviour for parseRunInstall, error messages

* fix: another edge case for input.args

* fix: use zod for input validation

* fix: use zod.infer for exported RunInstall types

* fix: remove @types/js-yaml

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-02-08 11:22:15 +01:00
dependabot[bot]
ebcfd6995d Bump actions/setup-node from 3 to 4 (#103)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 21:58:17 +02:00
Steven Yung
d2613e087f docs: update pnpm version in caching example (#94) 2023-09-27 19:17:23 +03:00
dependabot[bot]
d928be8e0c Bump actions/checkout from 3 to 4 (#96)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 19:17:06 +03:00
Khải
d882d12c64 feat: standalone binary (#92)
* feat: add an option to install the self-contained binary version of pnpm

* test: add a test about nodejs_bundled

* style: remove an empty line

* chore: use newer pnpm

* chore: update dependencies

* feat: rename `nodejs_bundled` to `standalone`

as @zkochan suggested

* docs: add

---------

Co-authored-by: Takashi Sato <takashi@tks.st>
2023-07-26 14:50:04 +03:00
Khải
0b715c7ebb Merge pull request #75 from ojeytonwilliams/fix/caching-example
docs: update the caching example
2023-07-25 17:00:41 +07:00
Khải
2ed49cbb02 Merge pull request #88 from KengoTODA/make-path-configurable
support projects that have package.json in non-root directory
2023-07-25 16:59:00 +07:00
Khải
218cb35941 Merge pull request #69 from zakuro9715/zakuro9715-patch-2
Remove corepack url in error message
2023-07-25 14:16:42 +07:00
Khải
3723f63bb4 Merge pull request #90 from pnpm/optional-version
feat: make version actually optional
2023-07-25 14:05:04 +07:00
khai96_
849d884800 feat: make version actually optional
closes https://github.com/pnpm/action-setup/issues/85
2023-07-25 14:01:28 +07:00
khai96_
f92eb0edb6 docs: update pnpm version in readme
fixes https://github.com/pnpm/action-setup/issues/89
2023-07-25 13:50:35 +07:00
Kengo TODA
b27f801bf9 feat: add package_json_file option
Signed-off-by: Kengo TODA <skypencil@gmail.com>
2023-07-08 07:02:46 +08:00
Khải
11dd14d0c0 Change sponsor to pnpm's opencollective 2023-04-22 17:39:01 +07:00
Oliver Eyton-Williams
61eb8c655a docs: update the caching example 2023-03-08 00:13:47 +01:00
zakuro
65db188e28 Remove corepack url in error message 2022-11-09 06:54:12 +09:00
Khải
0609f0983b Merge pull request #66 from mrienstra/patch-1
docs: drop minor & patch version from examples
2022-11-02 12:09:43 +07:00
Michael Rienstra
7208fa2733 docs: drop minor & patch version from examples 2022-11-01 21:55:20 -07:00
Khải
1bd00a2972 Merge pull request #64 from mrienstra/patch-1
typo: not latest version
2022-10-26 10:32:07 +07:00
Michael Rienstra
d5601fb603 bump first occurrence of actions/checkout to v3 2022-10-25 10:52:54 -07:00
Michael Rienstra
bc06aa6030 typo: not latest version 2022-10-25 10:42:24 -07:00
Khải
cd2af74528 Merge pull request #62 from melMass/mel/fix-readme
fix: ️ cross-platform example
2022-10-18 17:29:18 +07:00
Mel Massadian
c8a150e137 fix: ️ just use shell:bash
set-output is deprecated see #58
2022-10-18 12:23:15 +02:00
Mel Massadian
ed0172a253 fix: ️ cross-platform example 2022-10-18 12:02:38 +02:00
Zoltan Kochan
c3b53f6a16 chore(release): 2.2.4 2022-10-15 21:12:50 +03:00
Zoltan Kochan
21e88da200 fix(deps): update 2022-10-15 21:12:13 +03:00
Zoltan Kochan
fc3334fa11 build 2022-10-15 21:09:00 +03:00
Sébastien Vanvelthem
d01953a678 Update action/core to 1.10.0 to fix deprecation warnings (#59)
* chore: update action/core to 1.10.0

* chore(lock): freshen
2022-10-15 20:57:21 +03:00
Khải
3360b50db7 Merge pull request #58 from belgattitude/doc-adapt-to-new-github-env
Doc update to account for deprecated `set-output`.
2022-10-13 22:23:23 +07:00
Sébastien Vanvelthem
6f9e9a867a docs: update to new github env 2022-10-13 16:58:06 +02:00
Khải
537643d491 Merge pull request #56 from i7eo/master
chore: bump node version
2022-10-11 11:58:06 +07:00
George Tan
f4129fb46e fix
Update node version, see https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2022-10-11 10:56:24 +08:00
Lew Blood
6e1964dde3 Fix spacing issue in README.md example (#48) 2022-06-17 23:17:05 +03:00
Zoltan Kochan
10693b3829 Update action.yml 2022-05-28 17:23:43 +03:00
Zoltan Kochan
99ecd24520 v2.2.2 2022-05-28 17:22:28 +03:00
Zoltan Kochan
958500fcab fix: do not download pnpm from get.pnpm.io (#46)
* fix: do not download pnpm from get.pnpm.io

* fix: remove redundant files
2022-05-28 16:54:43 +03:00
Khải
57b9359b4c Merge pull request #41 from nelson6e65/patch-1
docs(readme): improve Cache example
2022-05-07 10:00:37 +07:00
Khải
ec1a8b444c Change runs-on back to ubuntu-latest 2022-05-07 09:59:56 +07:00
Nelson Martell
73e15250cb docs(readme): improve and fix cache example
Dynamically detect the Store directory and use the latest GitHub actions.
2022-05-06 21:57:00 -05:00
Khải
10b4b0b462 Merge pull request #36 from pnpm/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-08 10:33:01 +07:00
Khải
5fa8980bf4 Update dependabot.yml 2022-03-08 10:32:48 +07:00
dependabot[bot]
ae78e9abbe Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:02:26 +00:00
Jack Works
35ab4267a1 fix: packageManager reader (#35)
* fix: packageManager reader

* chore: resolve review

* chore: run build
2022-02-25 12:43:26 +08:00
khai96_
11ba3424e0 fmt 2022-02-23 10:07:15 +07:00
Khải
847a737d63 Merge pull request #33 from pnpm/packageManager
feat: try support packageManager
2022-02-22 16:39:23 +07:00
Zoltan Kochan
225f3bb4b0 build 2022-02-22 11:34:20 +02:00
Zoltan Kochan
777a50d72e Update src/install-pnpm/run.ts 2022-02-22 11:32:59 +02:00
khai96_
e7c10c6fc5 Update dist/index.js 2022-02-22 13:04:41 +07:00
Jack Works
a576a70bc6 chore: resolve review 2022-02-22 13:37:35 +08:00
Jack Works
1d51e20937 feat: try support packageManager 2022-02-22 12:26:05 +08:00
Khải
ad2b35ae0c Merge pull request #32 from pnpm/retry-fetch
fix: retry fetch of pnpm script
2022-02-21 10:28:16 +07:00
Zoltan Kochan
d8ea532ac4 fix: retry fetch of pnpm script
close #22
2022-02-20 21:49:26 +02:00
khai96_
2270f39ef6 v2.1.0 2022-02-08 19:53:18 +07:00
khai96_
394c848db6 Update the bundle 2022-02-08 19:50:57 +07:00
Khải
e13928ccc5 Merge pull request #27 from metonym/fix-jobs-syntax
Specify job name to fix syntax error
2022-02-08 19:48:36 +07:00
Khải
93bd5a123d Merge pull request #29 from pnpm/pnpm-v7
The pnpm home directory should be added to PATH and PNPM_HOME
2022-02-08 19:47:28 +07:00
Zoltan Kochan
9eb14dd77c decrease bundle size 2022-02-08 14:44:50 +02:00
Zoltan Kochan
eafb777c56 download script from pnpm.io 2022-02-08 00:39:20 +02:00
Zoltan Kochan
e6378df420 PNPM_HOME_PATH=>PNPM_HOME 2022-02-08 00:21:53 +02:00
Zoltan Kochan
6ff6e97bc6 The pnpm home directory should be added to PATH and PNPM_HOME
This change is needed to make the action compatible with pnpm v7.

Related breaking change in pnpm: pnpm/pnpm#4280
2022-02-07 23:15:44 +02:00
Eric Liu
45d9c91ff6 Specify job name to fix syntax error 2022-01-29 08:17:29 -08:00
Khải
15569a497d Merge pull request #26 from ai/patch-1
Improve `version` docs
2021-12-16 21:20:06 +07:00
Andrey Sitnik
d70eebd14a Update README.md
Co-authored-by: Khải <hvksmr1996@gmail.com>
2021-12-16 17:18:46 +03:00
Andrey Sitnik
3bf8acf16f Improve version docs 2021-12-16 17:12:07 +03:00
Khải
3c2fe8c592 Merge pull request #21 from gaggle/patch-1
Spelling
2021-10-12 19:45:45 +07:00
Jon Lauridsen
76cc04cd5e Spelling 2021-10-12 13:34:10 +02:00
Khải
bcad811784 Remove unused env from examples 2021-07-24 08:25:23 +07:00
Khải
602b36f177 Remove uses of undefined variables from examples 2021-07-24 08:22:22 +07:00
Khải
74a0fdc1a4 Merge pull request #14 from Jack-Works-forks/master
Update README: use lockfile hash instead of package.json hash
2021-06-01 09:44:13 +07:00
Jack Works
493e98ec5e Update README.md 2021-06-01 10:42:26 +08:00
khai96_
646cdf4821 Update versions in README examples to the latest 2021-04-24 21:13:36 +07:00
Khải
a1ba6cf5ae Merge pull request #11 from pnpm/zkochan-patch-1
docs(readme): PNPM=>pnpm
2021-03-27 18:50:58 +07:00
Zoltan Kochan
41b381a08b docs(readme): PNPM=>pnpm 2021-03-27 13:45:01 +02:00
khai96_
3236b209b5 Merge branch 'v2' 2021-03-27 16:56:27 +07:00
khai96_
2124926520 Update README.md 2021-03-23 12:53:37 +07:00
khai96_
ba9826e81c Update test workflow 2021-03-23 12:53:25 +07:00
khai96_
7c4472dbcf Forgot to specify working directory 2021-03-23 12:48:54 +07:00
khai96_
0db7fb9961 Add .pnpm-store to .gitignore 2021-03-23 12:48:07 +07:00
khai96_
aefcd1e623 Use pnpm.js to install pnpm 2021-03-23 12:42:43 +07:00
khai96_
b7b9d6344b Instruct renovate to ignore ajv updates 2021-03-23 11:47:55 +07:00
khai96_
7e61ea5847 Add "$schema" to renovate.json 2021-03-23 11:46:56 +07:00
khai96_
3a2c7247e1 Fix js-yaml usage 2021-03-23 11:43:49 +07:00
khai96_
2a105263a5 Update dependencies 2021-03-23 11:43:36 +07:00
Khải
9facd4db8e Merge pull request #9 from hildjj/cache-docs
Adds documentation hints for caching
2021-02-18 08:31:04 +07:00
Khải
6c1466d327 Make some tweaks to example code snippets 2021-02-18 08:30:07 +07:00
Joe Hildebrand
b26427e53e Adds documentation hints for caching. Fixes #8. 2021-02-17 09:45:25 -07:00
Khải
086f5bd3b6 Update README.md
close https://github.com/pnpm/action-setup/issues/6
2020-10-19 14:10:51 +07:00
khai96_
bdb2a5ee76 Enable Dependabot 2020-10-05 22:16:14 +07:00
khai96_
8e1abe543f Update dist/index.js 2020-10-05 21:51:43 +07:00
khai96_
af6247d08a Fix https://github.com/pnpm/action-setup/issues/5 2020-10-05 21:45:45 +07:00
khai96_
f87c8a916e Fix TypeScript error 2020-10-05 21:45:20 +07:00
khai96_
d6790970e0 Update dependencies 2020-10-05 21:44:44 +07:00
khai96_
fa62771e12 Add workflow_dispatch event 2020-08-27 08:25:30 +07:00
khai96_
935101478d v1.2.0 2020-05-10 12:17:17 +07:00
Khải
4abca36d2a Merge pull request #2 from pnpm/install-command
Support install command
2020-05-10 12:16:23 +07:00
khai96_
56013f801f Add more examples 2020-05-10 12:14:27 +07:00
khai96_
fb99aeb8e3 Describe run_install in more details 2020-05-10 12:08:45 +07:00
khai96_
b78eaea668 Describe default values 2020-05-10 12:00:23 +07:00
khai96_
83681c63a7 Make logs foldable 2020-05-09 21:50:47 +07:00
khai96_
6eb237a86d Only warn on failure of post action 2020-05-09 21:43:19 +07:00
khai96_
b1febf84ed Fix pruneStore 2020-05-09 21:41:25 +07:00
khai96_
2546768411 Add matrix.os to name 2020-05-09 21:35:09 +07:00
khai96_
8cdddb18c5 Try fixing 2020-05-09 21:33:18 +07:00
khai96_
4457a83971 Test with run_install 2020-05-09 21:26:17 +07:00
khai96_
c8fc1974e1 Run pnpm store prune post action 2020-05-09 21:15:50 +07:00
khai96_
291e58ad85 Enable post action 2020-05-09 21:02:32 +07:00
khai96_
1790ca7f76 Add pnpm install 2020-05-09 20:24:52 +07:00
khai96_
9a1617cf46 Rename install to install-pnpm 2020-05-09 20:03:45 +07:00
khai96_
6fe65dc1af Move run-install to its own module 2020-05-09 20:01:25 +07:00
khai96_
91d3d73121 Correct validation error message 2020-05-09 19:52:48 +07:00
khai96_
7a5d08caa7 Update run.sh 2020-05-09 19:46:36 +07:00
khai96_
e373fffa0a Use ajv to validate schema 2020-05-09 19:45:31 +07:00
khai96_
bb24f595c2 Add schema generator 2020-05-09 19:24:07 +07:00
khai96_
d44b8c5e53 Add run_install input 2020-05-09 19:13:46 +07:00
khai96_
4b13327683 Re-add dist/index.js 2020-05-09 18:27:15 +07:00
khai96_
49ba4cbc60 Delete dist/index.js 2020-05-09 18:26:16 +07:00
Khải
9649109f2e Fix .gitattributes 2020-05-09 08:13:09 +07:00
khai96_
087311f996 refactor: Remove then 2020-05-08 21:55:03 +07:00
khai96_
9979c3d928 Use node-fetch 2020-05-08 21:34:25 +07:00
khai96_
738fb9213f Fix README.md 2020-05-08 21:23:23 +07:00
28 changed files with 238131 additions and 940 deletions

2
.gitattributes vendored
View File

@@ -1,2 +1,2 @@
* text=auto * text=auto
dist/index.js -text /dist/index.js binary

14
.github/FUNDING.yml vendored
View File

@@ -1,12 +1,2 @@
# These are supported funding model platforms custom:
- https://opencollective.com/pnpm
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: khai96_
open_collective: # Collective unavailable
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # disabled
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10

View File

@@ -3,6 +3,7 @@ name: Test Action
on: on:
- push - push
- pull_request - pull_request
- workflow_dispatch
jobs: jobs:
test_default_inputs: test_default_inputs:
@@ -14,19 +15,19 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
pnpm: pnpm:
- 4.11.1 - 9.15.5
os: os:
- ubuntu-latest - ubuntu-latest
- macos-latest - macos-latest
- windows-latest - windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Run the action - name: Run the action
uses: ./ uses: ./
with: with:
version: 4.11.1 version: 9.15.5
- name: 'Test: which' - name: 'Test: which'
run: which pnpm; which pnpx run: which pnpm; which pnpx
@@ -34,8 +35,8 @@ jobs:
- name: 'Test: install' - name: 'Test: install'
run: pnpm install run: pnpm install
test_explicit_inputs: test_dest:
name: Test with explicit inputs name: Test with dest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -43,25 +44,136 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
pnpm: pnpm:
- 4.11.1 - 9.15.5
os: os:
- ubuntu-latest - ubuntu-latest
- macos-latest - macos-latest
- windows-latest - windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Run the action - name: Run the action
uses: ./ uses: ./
with: with:
version: 4.11.1 version: 9.15.5
dest: ~/test/pnpm dest: ~/test/pnpm
bin_dest: ~/test/pnpm/.bin
registry: http://registry.yarnpkg.com/
- name: 'Test: which' - name: 'Test: which'
run: which pnpm && which pnpx run: which pnpm && which pnpx
- name: 'Test: install' - name: 'Test: install'
run: pnpm install run: pnpm install
test_standalone:
name: Test with standalone
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
standalone:
- true
- false
steps:
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 9.15.0
standalone: ${{ matrix.standalone }}
- name: install Node.js
uses: actions/setup-node@v4
with:
# pnpm@7.0.0 is not compatible with Node.js 12
node-version: 12.22.12
- name: 'Test: which (pnpm)'
run: which pnpm
- name: 'Test: which (pnpx)'
if: matrix.standalone == false
run: which pnpx
- name: 'Test: install when standalone is true'
if: matrix.standalone
run: pnpm install
- name: 'Test: install when standalone is false'
if: matrix.standalone == false
# Since the default shell on windows runner is pwsh, we specify bash explicitly
shell: bash
run: |
if pnpm install; then
echo "pnpm install should fail"
exit 1
else
echo "pnpm install failed as expected"
fi
test_run_install:
name: 'Test with run_install (${{ matrix.run_install.name }}, prune=${{matrix.store_prune}}, ${{ matrix.os }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
pnpm:
- 9.15.5
os:
- ubuntu-latest
- macos-latest
- windows-latest
run_install:
- name: 'null'
value: 'null'
- name: 'empty object'
value: '{}'
- name: 'recursive'
value: |
recursive: true
- name: 'global'
value: |
args:
- --global
- --global-dir=./pnpm-global
- npm
- yarn
- name: 'array'
value: |
- {}
- recursive: true
- args:
- --global
- --global-dir=./pnpm-global
- npm
- yarn
store_prune:
- 'true'
- 'false'
steps:
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 9.15.5
run_install: ${{ matrix.run_install.value }}
store_prune: ${{ matrix.store_prune }}
- name: 'Test: which'
run: which pnpm; which pnpx
- name: 'Test: install'
run: pnpm install

3
.gitignore vendored
View File

@@ -2,9 +2,12 @@ node_modules
*.log *.log
/dist/* /dist/*
!/dist/index.js !/dist/index.js
!/dist/pnpm.cjs
!/dist/worker.js
tmp tmp
temp temp
*.tmp *.tmp
*.temp *.temp
tmp.* tmp.*
temp.* temp.*
.pnpm-store

154
README.md
View File

@@ -1,24 +1,62 @@
# Setup PNPM > ## :warning: Upgrade from v2!
>
> 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.
Install PNPM package manager. # Setup pnpm
Install pnpm package manager.
## Inputs ## Inputs
### `version` ### `version`
**Required** Version of PNPM to install. Version of pnpm to install.
**Optional** when there is a [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
otherwise, 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`.
### `dest` ### `dest`
**Optional** Where to store PNPM files. **Optional** Where to store pnpm files.
### `bin_dest` ### `run_install`
**Optional** Where to store executables (`pnpm` and `pnpx` commands). **Optional** (_default:_ `null`) If specified, run `pnpm install`.
### `registry` If `run_install` is either `null` or `false`, pnpm will not install any npm package.
**Optional** Registry to download PNPM from. If `run_install` is `true`, pnpm will install dependencies recursively.
If `run_install` is a YAML string representation of either an object or an array, pnpm will execute every install commands.
If any `run_install` is not falsy, and `store_prune` is not set to `false`, `pnpm store prune` will be executed after all install commands have been executed. This is to ensure the pnpm store is pruned before caching.
#### `run_install.recursive`
**Optional** (_type:_ `boolean`, _default:_ `false`) Whether to use `pnpm recursive install`.
#### `run_install.cwd`
**Optional** (_type:_ `string`) Working directory when run `pnpm [recursive] install`.
#### `run_install.args`
**Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--ignore-scripts, --strict-peer-dependencies]`.
#### `store_prune`
**Optional** (_type:_ `boolean`, _default:_ `true`) Whether to run `pnpm store prune` after installation. If `run_install` is falsy, this option will be ignored. If you run `pnpm install` on your own, and intend to cache the pnpm store, it's recommended to run `pnpm store prune` yourself to make sure the store that will be cached is pruned.
### `package_json_file`
**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.
### `standalone`
**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.
This is useful when you want to use a incompatible pair of Node.js and pnpm.
## Outputs ## Outputs
@@ -28,33 +66,109 @@ Expanded path of inputs#dest.
### `bin_dest` ### `bin_dest`
Expanded path of inputs@bin_dest. Location of `pnpm` and `pnpx` command.
## Usage example ## Usage example
### Install only pnpm without `packageManager`
This works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager`.
```yaml ```yaml
on: on:
- push - push
- pull_request - pull_request
jobs: jobs:
runs-on: ubuntu-latest install:
runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: pnpm/action-setup@v4
with:
- uses: pnpm/action-setup@v1.1.0 version: 10
with:
version: 4.11.1
- name: Install dependencies
run: pnpm install
``` ```
### Install only pnpm with `packageManager`
Omit `version` input to use the version in the [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
```yaml
on:
- push
- pull_request
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
```
### Install pnpm and a few npm packages
```yaml
on:
- push
- pull_request
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
run_install: |
- recursive: true
args: [--strict-peer-dependencies]
- args: [--global, gulp, prettier, typescript]
```
### Use cache to reduce installation time
```yaml
on:
- push
- pull_request
jobs:
cache-and-install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Prune pnpm store
run: pnpm store prune
```
**Note:** If you you opt to run install on your own (`run_install: false`), it's recommended to run [`pnpm store prune`](https://pnpm.io/cli/store#prune) after installation to make sure the store that will be cached is pruned.
## Notes ## Notes
This action does not setup Node.js for you, use [actions/setup-node](https://github.com/actions/setup-node) yourself. This action does not setup Node.js for you, use [actions/setup-node](https://github.com/actions/setup-node) yourself.
## License ## License
[MIT](https://git.io/JfclH) © [Hoàng Văn Khải](https://github.com/KSXGitHub/) [MIT](https://github.com/pnpm/action-setup/blob/master/LICENSE.md) © [Hoàng Văn Khải](https://github.com/KSXGitHub/)

View File

@@ -1,24 +1,37 @@
name: Setup PNPM name: Setup pnpm
description: Install PNPM package manager description: Install pnpm package manager
branding: branding:
icon: package icon: package
color: orange color: orange
inputs: inputs:
version: version:
description: Version of PNPM to install description: Version of pnpm to install
required: true required: false
dest: dest:
description: Where to store PNPM files description: Where to store pnpm files
required: false required: false
default: ~/setup-pnpm default: ~/setup-pnpm
run_install:
description: If specified, run `pnpm install`
required: false
default: 'null'
store_prune:
description: Enable store pruning after installation. Set to false to disable.
required: false
default: 'true'
package_json_file:
description: File path to the package.json to read "packageManager" configuration
required: false
default: 'package.json'
standalone:
description: When set to true, @pnpm/exe, which is a Node.js bundled package, will be installed, enabling using pnpm without Node.js.
required: false
default: 'false'
outputs:
dest:
description: Expanded path of inputs#dest
bin_dest: bin_dest:
description: Where to store executables (pnpm and pnpx commands) description: Location of `pnpm` and `pnpx` command
required: false
default: ~/setup-pnpm/.bin
registry:
description: Registry to download PNPM from
required: false
default: https://registry.npmjs.com
runs: runs:
using: node12 using: node20
main: dist/index.js main: dist/index.js

9
dist/index.js vendored

File diff suppressed because one or more lines are too long

220780
dist/pnpm.cjs vendored Normal file

File diff suppressed because one or more lines are too long

16625
dist/worker.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,18 +3,20 @@
"scripts": { "scripts": {
"build:ncc": "ncc build --minify --no-source-map-register --no-cache dist/tsc/index.js --out dist/", "build:ncc": "ncc build --minify --no-source-map-register --no-cache dist/tsc/index.js --out dist/",
"build": "tsc && pnpm run build:ncc", "build": "tsc && pnpm run build:ncc",
"start": "pnpm run build && sh ./run.sh" "start": "pnpm run build && sh ./run.sh",
"update-pnpm-dist": "pnpm install && cp ./node_modules/pnpm/dist/pnpm.cjs ./dist/pnpm.cjs && cp ./node_modules/pnpm/dist/worker.js ./dist/worker.js"
}, },
"dependencies": { "dependencies": {
"download": "^8.0.0", "@actions/core": "^1.10.1",
"@types/expand-tilde": "^2.0.2",
"@types/node": "^20.11.5",
"expand-tilde": "^2.0.2", "expand-tilde": "^2.0.2",
"@actions/core": "^1.2.4", "yaml": "^2.3.4",
"@types/download": "^6.2.4", "zod": "^3.22.4"
"@types/expand-tilde": "^2.0.0",
"@types/node": "^13.13.5"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^3.8.3", "@vercel/ncc": "^0.38.1",
"@zeit/ncc": "^0.22.1" "pnpm": "^8.14.3",
"typescript": "^5.3.3"
} }
} }

952
pnpm-lock.yaml generated
View File

@@ -1,826 +1,146 @@
dependencies: lockfileVersion: '9.0'
'@actions/core': 1.2.4
'@types/download': 6.2.4 settings:
'@types/expand-tilde': 2.0.0 autoInstallPeers: true
'@types/node': 13.13.5 excludeLinksFromLockfile: false
download: 8.0.0
expand-tilde: 2.0.2 importers:
devDependencies:
'@zeit/ncc': 0.22.1 .:
typescript: 3.8.3 dependencies:
lockfileVersion: 5.1 '@actions/core':
specifier: ^1.10.1
version: 1.11.1
'@types/expand-tilde':
specifier: ^2.0.2
version: 2.0.2
'@types/node':
specifier: ^20.11.5
version: 20.17.17
expand-tilde:
specifier: ^2.0.2
version: 2.0.2
yaml:
specifier: ^2.3.4
version: 2.7.0
zod:
specifier: ^3.22.4
version: 3.24.1
devDependencies:
'@vercel/ncc':
specifier: ^0.38.1
version: 0.38.3
pnpm:
specifier: ^8.14.3
version: 8.15.9
typescript:
specifier: ^5.3.3
version: 5.7.3
packages: packages:
/@actions/core/1.2.4:
dev: false '@actions/core@1.11.1':
resolution: resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==}
integrity: sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==
/@sindresorhus/is/0.7.0: '@actions/exec@1.1.1':
dev: false resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==}
engines:
node: '>=4' '@actions/http-client@2.1.0':
resolution: resolution: {integrity: sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==}
integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==
/@types/decompress/4.2.3: '@actions/io@1.1.3':
dependencies: resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
'@types/node': 13.13.5
dev: false '@types/expand-tilde@2.0.2':
resolution: resolution: {integrity: sha512-wlsMYiapmIR4Eq/Z0qysN8xaDMjSkO6AIDNFx9oxgWGeKVA1jU+NzwPRZErBNP5z6/dx6QNkNpKglBGPO9OkTA==}
integrity: sha512-W24e3Ycz1UZPgr1ZEDHlK4XnvOr+CpJH3qNsFeqXwwlW/9END9gxn3oJSsp7gYdiQxrXUHwUUd3xuzVz37MrZQ==
/@types/download/6.2.4: '@types/node@20.17.17':
dependencies: resolution: {integrity: sha512-/WndGO4kIfMicEQLTi/mDANUu/iVUhT7KboZPdEqqHQ4aTS+3qT3U5gIqWDFV+XouorjfgGqvKILJeHhuQgFYg==}
'@types/decompress': 4.2.3
'@types/got': 8.3.5 '@vercel/ncc@0.38.3':
'@types/node': 13.13.5 resolution: {integrity: sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==}
dev: false
resolution:
integrity: sha512-Lo5dy3ai6LNnbL663sgdzqL1eib11u1yKH6w3v3IXEOO4kRfQpMn1qWUTaumcHLACjFp1RcBx9tUXEvJoR3vcA==
/@types/expand-tilde/2.0.0:
dev: false
resolution:
integrity: sha512-17h/6MRHoetV2QVUVnUfrmaFCXNIFJ3uDJmXlklX2xDtlEb1W0OXLgP+qwND2Ibg/PtQfQi0vx19KGuPayjLiw==
/@types/got/8.3.5:
dependencies:
'@types/node': 13.13.5
dev: false
resolution:
integrity: sha512-AaXSrIF99SjjtPVNmCmYb388HML+PKEJb/xmj4SbL2ZO0hHuETZZzyDIKfOqaEoAHZEuX4sC+FRFrHYJoIby6A==
/@types/node/13.13.5:
dev: false
resolution:
integrity: sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==
/@zeit/ncc/0.22.1:
dev: true
hasBin: true hasBin: true
resolution:
integrity: sha512-Qq3bMuonkcnV/96jhy9SQYdh39NXHxNMJ1O31ZFzWG9n52fR2DLtgrNzhj/ahlEjnBziMLGVWDbaS9sf03/fEw== expand-tilde@2.0.2:
/archive-type/4.0.0: resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==}
engines: {node: '>=0.10.0'}
homedir-polyfill@1.0.3:
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
engines: {node: '>=0.10.0'}
parse-passwd@1.0.0:
resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==}
engines: {node: '>=0.10.0'}
pnpm@8.15.9:
resolution: {integrity: sha512-SZQ0ydj90aJ5Tr9FUrOyXApjOrzuW7Fee13pDzL0e1E6ypjNXP0AHDHw20VLw4BO3M1XhQHkyik6aBYWa72fgQ==}
engines: {node: '>=16.14'}
hasBin: true
tunnel@0.0.6:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
typescript@5.7.3:
resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}
engines: {node: '>=14.17'}
hasBin: true
undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
yaml@2.7.0:
resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==}
engines: {node: '>= 14'}
hasBin: true
zod@3.24.1:
resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
snapshots:
'@actions/core@1.11.1':
dependencies: dependencies:
file-type: 4.4.0 '@actions/exec': 1.1.1
dev: false '@actions/http-client': 2.1.0
engines:
node: '>=4' '@actions/exec@1.1.1':
resolution:
integrity: sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=
/base64-js/0.0.8:
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=
/bl/1.2.2:
dependencies: dependencies:
readable-stream: 2.3.7 '@actions/io': 1.1.3
safe-buffer: 5.2.0
dev: false '@actions/http-client@2.1.0':
resolution:
integrity: sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
/buffer-alloc-unsafe/1.1.0:
dev: false
resolution:
integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
/buffer-alloc/1.2.0:
dependencies: dependencies:
buffer-alloc-unsafe: 1.1.0 tunnel: 0.0.6
buffer-fill: 1.0.0
dev: false '@actions/io@1.1.3': {}
resolution:
integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== '@types/expand-tilde@2.0.2': {}
/buffer-crc32/0.2.13:
dev: false '@types/node@20.17.17':
resolution:
integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
/buffer-fill/1.0.0:
dev: false
resolution:
integrity: sha1-+PeLdniYiO858gXNY39o5wISKyw=
/buffer/3.6.2:
dependencies: dependencies:
base64-js: 0.0.8 undici-types: 6.19.8
ieee754: 1.1.13
isarray: 1.0.0 '@vercel/ncc@0.38.3': {}
dev: false
resolution: expand-tilde@2.0.2:
integrity: sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==
/cacheable-request/2.1.4:
dependencies:
clone-response: 1.0.2
get-stream: 3.0.0
http-cache-semantics: 3.8.1
keyv: 3.0.0
lowercase-keys: 1.0.0
normalize-url: 2.0.1
responselike: 1.0.2
dev: false
resolution:
integrity: sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=
/clone-response/1.0.2:
dependencies:
mimic-response: 1.0.1
dev: false
resolution:
integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
/commander/2.8.1:
dependencies:
graceful-readlink: 1.0.1
dev: false
engines:
node: '>= 0.6.x'
resolution:
integrity: sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=
/content-disposition/0.5.3:
dependencies:
safe-buffer: 5.1.2
dev: false
engines:
node: '>= 0.6'
resolution:
integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
/core-util-is/1.0.2:
dev: false
resolution:
integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
/decode-uri-component/0.2.0:
dev: false
engines:
node: '>=0.10'
resolution:
integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
/decompress-response/3.3.0:
dependencies:
mimic-response: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
/decompress-tar/4.1.1:
dependencies:
file-type: 5.2.0
is-stream: 1.1.0
tar-stream: 1.6.2
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==
/decompress-tarbz2/4.1.1:
dependencies:
decompress-tar: 4.1.1
file-type: 6.2.0
is-stream: 1.1.0
seek-bzip: 1.0.5
unbzip2-stream: 1.3.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==
/decompress-targz/4.1.1:
dependencies:
decompress-tar: 4.1.1
file-type: 5.2.0
is-stream: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==
/decompress-unzip/4.0.1:
dependencies:
file-type: 3.9.0
get-stream: 2.3.1
pify: 2.3.0
yauzl: 2.10.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-3qrM39FK6vhVePczroIQ+bSEj2k=
/decompress/4.2.1:
dependencies:
decompress-tar: 4.1.1
decompress-tarbz2: 4.1.1
decompress-targz: 4.1.1
decompress-unzip: 4.0.1
graceful-fs: 4.2.3
make-dir: 1.3.0
pify: 2.3.0
strip-dirs: 2.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==
/download/8.0.0:
dependencies:
archive-type: 4.0.0
content-disposition: 0.5.3
decompress: 4.2.1
ext-name: 5.0.0
file-type: 11.1.0
filenamify: 3.0.0
get-stream: 4.1.0
got: 8.3.2
make-dir: 2.1.0
p-event: 2.3.1
pify: 4.0.1
dev: false
engines:
node: '>=10'
resolution:
integrity: sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA==
/duplexer3/0.1.4:
dev: false
resolution:
integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
/end-of-stream/1.4.4:
dependencies:
once: 1.4.0
dev: false
resolution:
integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
/escape-string-regexp/1.0.5:
dev: false
engines:
node: '>=0.8.0'
resolution:
integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
/expand-tilde/2.0.2:
dependencies: dependencies:
homedir-polyfill: 1.0.3 homedir-polyfill: 1.0.3
dev: false
engines: homedir-polyfill@1.0.3:
node: '>=0.10.0'
resolution:
integrity: sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=
/ext-list/2.2.2:
dependencies:
mime-db: 1.43.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==
/ext-name/5.0.0:
dependencies:
ext-list: 2.2.2
sort-keys-length: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==
/fd-slicer/1.1.0:
dependencies:
pend: 1.2.0
dev: false
resolution:
integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
/file-type/11.1.0:
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==
/file-type/3.9.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-JXoHg4TR24CHvESdEH1SpSZyuek=
/file-type/4.4.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-G2AOX8ofvcboDApwxxyNul95BsU=
/file-type/5.2.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-LdvqfHP/42No365J3DOMBYwritY=
/file-type/6.2.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==
/filename-reserved-regex/2.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-q/c9+rc10EVECr/qLZHzieu/oik=
/filenamify/3.0.0:
dependencies:
filename-reserved-regex: 2.0.0
strip-outer: 1.0.1
trim-repeated: 1.0.0
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==
/from2/2.3.0:
dependencies:
inherits: 2.0.4
readable-stream: 2.3.7
dev: false
resolution:
integrity: sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
/fs-constants/1.0.0:
dev: false
resolution:
integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
/get-stream/2.3.1:
dependencies:
object-assign: 4.1.1
pinkie-promise: 2.0.1
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=
/get-stream/3.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
/get-stream/4.1.0:
dependencies:
pump: 3.0.0
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
/got/8.3.2:
dependencies:
'@sindresorhus/is': 0.7.0
cacheable-request: 2.1.4
decompress-response: 3.3.0
duplexer3: 0.1.4
get-stream: 3.0.0
into-stream: 3.1.0
is-retry-allowed: 1.2.0
isurl: 1.0.0
lowercase-keys: 1.0.1
mimic-response: 1.0.1
p-cancelable: 0.4.1
p-timeout: 2.0.1
pify: 3.0.0
safe-buffer: 5.2.0
timed-out: 4.0.1
url-parse-lax: 3.0.0
url-to-options: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==
/graceful-fs/4.2.3:
dev: false
resolution:
integrity: sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
/graceful-readlink/1.0.1:
dev: false
resolution:
integrity: sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
/has-symbol-support-x/1.4.2:
dev: false
resolution:
integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==
/has-to-string-tag-x/1.4.1:
dependencies:
has-symbol-support-x: 1.4.2
dev: false
resolution:
integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==
/homedir-polyfill/1.0.3:
dependencies: dependencies:
parse-passwd: 1.0.0 parse-passwd: 1.0.0
dev: false
engines: parse-passwd@1.0.0: {}
node: '>=0.10.0'
resolution: pnpm@8.15.9: {}
integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==
/http-cache-semantics/3.8.1: tunnel@0.0.6: {}
dev: false
resolution: typescript@5.7.3: {}
integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
/ieee754/1.1.13: undici-types@6.19.8: {}
dev: false
resolution: yaml@2.7.0: {}
integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
/inherits/2.0.4: zod@3.24.1: {}
dev: false
resolution:
integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
/into-stream/3.1.0:
dependencies:
from2: 2.3.0
p-is-promise: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=
/is-natural-number/4.0.1:
dev: false
resolution:
integrity: sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
/is-object/1.0.1:
dev: false
resolution:
integrity: sha1-iVJojF7C/9awPsyF52ngKQMINHA=
/is-plain-obj/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
/is-retry-allowed/1.2.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==
/is-stream/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
/isarray/1.0.0:
dev: false
resolution:
integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
/isurl/1.0.0:
dependencies:
has-to-string-tag-x: 1.4.1
is-object: 1.0.1
dev: false
engines:
node: '>= 4'
resolution:
integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==
/json-buffer/3.0.0:
dev: false
resolution:
integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
/keyv/3.0.0:
dependencies:
json-buffer: 3.0.0
dev: false
resolution:
integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==
/lowercase-keys/1.0.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=
/lowercase-keys/1.0.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
/make-dir/1.3.0:
dependencies:
pify: 3.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
/make-dir/2.1.0:
dependencies:
pify: 4.0.1
semver: 5.7.1
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
/mime-db/1.43.0:
dev: false
engines:
node: '>= 0.6'
resolution:
integrity: sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==
/mimic-response/1.0.1:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
/normalize-url/2.0.1:
dependencies:
prepend-http: 2.0.0
query-string: 5.1.1
sort-keys: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==
/object-assign/4.1.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
/once/1.4.0:
dependencies:
wrappy: 1.0.2
dev: false
resolution:
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
/p-cancelable/0.4.1:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==
/p-event/2.3.1:
dependencies:
p-timeout: 2.0.1
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==
/p-finally/1.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
/p-is-promise/1.1.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=
/p-timeout/2.0.1:
dependencies:
p-finally: 1.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==
/parse-passwd/1.0.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=
/pend/1.2.0:
dev: false
resolution:
integrity: sha1-elfrVQpng/kRUzH89GY9XI4AelA=
/pify/2.3.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
/pify/3.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
/pify/4.0.1:
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
/pinkie-promise/2.0.1:
dependencies:
pinkie: 2.0.4
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-ITXW36ejWMBprJsXh3YogihFD/o=
/pinkie/2.0.4:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
/prepend-http/2.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
/process-nextick-args/2.0.1:
dev: false
resolution:
integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
/pump/3.0.0:
dependencies:
end-of-stream: 1.4.4
once: 1.4.0
dev: false
resolution:
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
/query-string/5.1.1:
dependencies:
decode-uri-component: 0.2.0
object-assign: 4.1.1
strict-uri-encode: 1.1.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
/readable-stream/2.3.7:
dependencies:
core-util-is: 1.0.2
inherits: 2.0.4
isarray: 1.0.0
process-nextick-args: 2.0.1
safe-buffer: 5.1.2
string_decoder: 1.1.1
util-deprecate: 1.0.2
dev: false
resolution:
integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
/responselike/1.0.2:
dependencies:
lowercase-keys: 1.0.0
dev: false
resolution:
integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
/safe-buffer/5.1.2:
dev: false
resolution:
integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
/safe-buffer/5.2.0:
dev: false
resolution:
integrity: sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
/seek-bzip/1.0.5:
dependencies:
commander: 2.8.1
dev: false
hasBin: true
resolution:
integrity: sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=
/semver/5.7.1:
dev: false
hasBin: true
resolution:
integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
/sort-keys-length/1.0.1:
dependencies:
sort-keys: 1.1.2
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=
/sort-keys/1.1.2:
dependencies:
is-plain-obj: 1.1.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
/sort-keys/2.0.0:
dependencies:
is-plain-obj: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
/strict-uri-encode/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
/string_decoder/1.1.1:
dependencies:
safe-buffer: 5.1.2
dev: false
resolution:
integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
/strip-dirs/2.1.0:
dependencies:
is-natural-number: 4.0.1
dev: false
resolution:
integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==
/strip-outer/1.0.1:
dependencies:
escape-string-regexp: 1.0.5
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
/tar-stream/1.6.2:
dependencies:
bl: 1.2.2
buffer-alloc: 1.2.0
end-of-stream: 1.4.4
fs-constants: 1.0.0
readable-stream: 2.3.7
to-buffer: 1.1.1
xtend: 4.0.2
dev: false
engines:
node: '>= 0.8.0'
resolution:
integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==
/through/2.3.8:
dev: false
resolution:
integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
/timed-out/4.0.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
/to-buffer/1.1.1:
dev: false
resolution:
integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
/trim-repeated/1.0.0:
dependencies:
escape-string-regexp: 1.0.5
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-42RqLqTokTEr9+rObPsFOAvAHCE=
/typescript/3.8.3:
dev: true
engines:
node: '>=4.2.0'
hasBin: true
resolution:
integrity: sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
/unbzip2-stream/1.3.0:
dependencies:
buffer: 3.6.2
through: 2.3.8
dev: false
resolution:
integrity: sha512-kE2WkurNnPUMcryNioS68DDbhoPB8Qxsd8btHSj+sd5Pjh2GsjmeHLzMSqV9HHziAo8FzVxVCJl9ZYhk7yY1pA==
/url-parse-lax/3.0.0:
dependencies:
prepend-http: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
/url-to-options/1.0.1:
dev: false
engines:
node: '>= 4'
resolution:
integrity: sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=
/util-deprecate/1.0.2:
dev: false
resolution:
integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
/wrappy/1.0.2:
dev: false
resolution:
integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
/xtend/4.0.2:
dev: false
engines:
node: '>=0.4'
resolution:
integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
/yauzl/2.10.0:
dependencies:
buffer-crc32: 0.2.13
fd-slicer: 1.1.0
dev: false
resolution:
integrity: sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
specifiers:
'@actions/core': ^1.2.4
'@types/download': ^6.2.4
'@types/expand-tilde': ^2.0.0
'@types/node': ^13.13.5
'@zeit/ncc': ^0.22.1
download: ^8.0.0
expand-tilde: ^2.0.2
typescript: ^3.8.3

View File

@@ -1,6 +1,10 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"pinVersions": false, "pinVersions": false,
"extends": [ "extends": [
"config:base" "config:base"
],
"ignoreDeps": [
"ajv"
] ]
} }

4
run.sh
View File

@@ -3,6 +3,6 @@
export HOME="$(pwd)" export HOME="$(pwd)"
export INPUT_VERSION=4.11.1 export INPUT_VERSION=4.11.1
export INPUT_DEST='~/pnpm.temp' export INPUT_DEST='~/pnpm.temp'
export INPUT_BIN_DEST='~/pnpm.temp/.bin' export INPUT_RUN_INSTALL=null
export INPUT_REGISTRY=https://registry.npmjs.com export INPUT_standalone=false
exec node dist/index.js exec node dist/index.js

View File

@@ -1,14 +1,17 @@
import { setFailed } from '@actions/core' import { setFailed } from '@actions/core'
import getInputs from './inputs' import getInputs from './inputs'
import installPnpm from './install-pnpm'
import setOutputs from './outputs' import setOutputs from './outputs'
import install from './install' import pnpmInstall from './pnpm-install'
import pruneStore from './pnpm-store-prune'
async function main() { async function main() {
const inputs = getInputs() const inputs = getInputs()
await install(inputs).then(() => { await installPnpm(inputs)
console.log('Installation Completed!') console.log('Installation Completed!')
setOutputs(inputs) setOutputs(inputs)
}) pnpmInstall(inputs)
pruneStore(inputs)
} }
main().catch(error => { main().catch(error => {

View File

@@ -1,11 +1,14 @@
import { getInput, InputOptions } from '@actions/core' import { getBooleanInput, getInput, InputOptions } from '@actions/core'
import expandTilde from 'expand-tilde' import expandTilde from 'expand-tilde'
import { RunInstall, parseRunInstall } from './run-install'
export interface Inputs { export interface Inputs {
readonly version: string readonly version?: string
readonly dest: string readonly dest: string
readonly binDest: string readonly runInstall: RunInstall[]
readonly registry: string readonly storePrune: boolean
readonly packageJsonFile: string
readonly standalone: boolean
} }
const options: InputOptions = { const options: InputOptions = {
@@ -15,10 +18,12 @@ const options: InputOptions = {
const parseInputPath = (name: string) => expandTilde(getInput(name, options)) const parseInputPath = (name: string) => expandTilde(getInput(name, options))
export const getInputs = (): Inputs => ({ export const getInputs = (): Inputs => ({
version: getInput('version', options), version: getInput('version'),
dest: parseInputPath('dest'), dest: parseInputPath('dest'),
binDest: parseInputPath('bin_dest'), runInstall: parseRunInstall('run_install'),
registry: getInput('registry', options), storePrune: getBooleanInput('store_prune'),
packageJsonFile: parseInputPath('package_json_file'),
standalone: getBooleanInput('standalone'),
}) })
export default getInputs export default getInputs

41
src/inputs/run-install.ts Normal file
View File

@@ -0,0 +1,41 @@
import { getInput, error } from '@actions/core'
import * as yaml from 'yaml'
import { z, ZodError } from 'zod'
const RunInstallSchema = z.object({
recursive: z.boolean().optional(),
cwd: z.string().optional(),
args: z.array(z.string()).optional(),
})
const RunInstallInputSchema = z.union([
z.null(),
z.boolean(),
RunInstallSchema,
z.array(RunInstallSchema),
])
export type RunInstallInput = z.infer<typeof RunInstallInputSchema>
export type RunInstall = z.infer<typeof RunInstallSchema>
export function parseRunInstall(inputName: string): RunInstall[] {
const input = getInput(inputName, { required: true })
const parsedInput: unknown = yaml.parse(input)
try {
const result: RunInstallInput = RunInstallInputSchema.parse(parsedInput)
if (!result) return []
if (result === true) return [{ recursive: true }]
if (Array.isArray(result)) return result
return [result]
} catch (exception: unknown) {
error(`Error for input "${inputName}" = ${input}`)
if (exception instanceof ZodError) {
error(`Errors: ${exception.errors}`)
} else {
error(`Exception: ${exception}`)
}
process.exit(1)
}
}

View File

@@ -1,13 +1,15 @@
import { setFailed } from '@actions/core' import { setFailed, startGroup, endGroup } from '@actions/core'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import runSelfInstaller from './run' import runSelfInstaller from './run'
export { runSelfInstaller } export { runSelfInstaller }
export async function install(inputs: Inputs) { export async function install(inputs: Inputs) {
startGroup('Running self-installer...')
const status = await runSelfInstaller(inputs) const status = await runSelfInstaller(inputs)
endGroup()
if (status) { if (status) {
return setFailed(`Something does wrong, self-installer exits with code ${status}`) return setFailed(`Something went wrong, self-installer exits with code ${status}`)
} }
} }

115
src/install-pnpm/run.ts Normal file
View File

@@ -0,0 +1,115 @@
import { addPath, exportVariable } from '@actions/core'
import { spawn } from 'child_process'
import { rm, writeFile, mkdir, copyFile } from 'fs/promises'
import { readFileSync } from 'fs'
import path from 'path'
import { execPath } from 'process'
import util from 'util'
import { Inputs } from '../inputs'
import YAML from 'yaml'
export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const { version, dest, packageJsonFile, standalone } = inputs
const { GITHUB_WORKSPACE } = process.env
// prepare self install
await rm(dest, { recursive: true, force: true })
// create dest directory after removal
await mkdir(dest, { recursive: true })
const pkgJson = path.join(dest, 'package.json')
// we have ensured the dest directory exists, we can write the file directly
await writeFile(pkgJson, JSON.stringify({ private: true }))
// copy .npmrc if it exists to install from custom registry
if (GITHUB_WORKSPACE) {
try {
await copyFile(path.join(GITHUB_WORKSPACE, '.npmrc'), path.join(dest, '.npmrc'))
} catch (error) {
// Swallow error if .npmrc doesn't exist
if (!util.types.isNativeError(error) || !('code' in error) || error.code !== 'ENOENT') throw error
}
}
// prepare target pnpm
const target = await readTarget({ version, packageJsonFile, standalone })
const cp = spawn(execPath, [path.join(__dirname, 'pnpm.cjs'), 'install', target, '--no-lockfile'], {
cwd: dest,
stdio: ['pipe', 'inherit', 'inherit'],
})
const exitCode = await new Promise<number>((resolve, reject) => {
cp.on('error', reject)
cp.on('close', resolve)
})
if (exitCode === 0) {
const pnpmHome = path.join(dest, 'node_modules/.bin')
addPath(pnpmHome)
exportVariable('PNPM_HOME', pnpmHome)
}
return exitCode
}
async function readTarget(opts: {
readonly version?: string | undefined
readonly packageJsonFile: string
readonly standalone: boolean
}) {
const { version, packageJsonFile, standalone } = opts
const { GITHUB_WORKSPACE } = process.env
let packageManager
if (GITHUB_WORKSPACE) {
try {
const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8');
({ packageManager } = packageJsonFile.endsWith(".yaml")
? YAML.parse(content, { merge: true })
: JSON.parse(content)
)
} catch (error: unknown) {
// Swallow error if package.json doesn't exist in root
if (!util.types.isNativeError(error) || !('code' in error) || error.code !== 'ENOENT') throw error
}
}
if (version) {
if (
typeof packageManager === 'string' &&
packageManager.startsWith('pnpm@') &&
packageManager.replace('pnpm@', '') !== version
) {
throw new Error(`Multiple versions of pnpm specified:
- version ${version} in the GitHub Action config with the key "version"
- version ${packageManager} in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)
}
return `${ standalone ? '@pnpm/exe' : 'pnpm' }@${version}`
}
if (!GITHUB_WORKSPACE) {
throw new Error(`No workspace is found.
If you've intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
please run the actions/checkout before pnpm/action-setup.
Otherwise, please specify the pnpm version in the action configuration.`)
}
if (typeof packageManager !== 'string') {
throw new Error(`No pnpm version is specified.
Please specify it by one of the following ways:
- in the GitHub Action config with the key "version"
- in the package.json with the key "packageManager"`)
}
if (!packageManager.startsWith('pnpm@')) {
throw new Error('Invalid packageManager field in package.json')
}
if (standalone) {
return packageManager.replace('pnpm@', '@pnpm/exe@')
}
return packageManager
}
export default runSelfInstaller

View File

@@ -1,25 +0,0 @@
import { spawn } from 'child_process'
import { execPath } from 'process'
import { downloadSelfInstaller } from '../self-installer'
import { Inputs } from '../inputs'
export function runSelfInstaller(inputs: Inputs): Promise<number> {
const cp = spawn(execPath, {
env: {
PNPM_VERSION: inputs.version,
PNPM_DEST: inputs.dest,
PNPM_BIN_DEST: inputs.binDest,
PNPM_REGISTRY: inputs.registry,
},
stdio: ['pipe', 'inherit', 'inherit'],
})
downloadSelfInstaller().pipe(cp.stdin)
return new Promise((resolve, reject) => {
cp.on('error', reject)
cp.on('close', resolve)
})
}
export default runSelfInstaller

View File

@@ -1,10 +1,12 @@
import { setOutput, addPath } from '@actions/core' import { setOutput, addPath } from '@actions/core'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
import { getBinDest } from '../utils'
export function setOutputs(inputs: Inputs) { export function setOutputs(inputs: Inputs) {
addPath(inputs.binDest) const binDest = getBinDest(inputs)
addPath(binDest)
setOutput('dest', inputs.dest) setOutput('dest', inputs.dest)
setOutput('bin_dest', inputs.binDest) setOutput('bin_dest', binDest)
} }
export default setOutputs export default setOutputs

38
src/pnpm-install/index.ts Normal file
View File

@@ -0,0 +1,38 @@
import { setFailed, startGroup, endGroup } from '@actions/core'
import { spawnSync } from 'child_process'
import { Inputs } from '../inputs'
import { patchPnpmEnv } from '../utils'
export function runPnpmInstall(inputs: Inputs) {
const env = patchPnpmEnv(inputs)
for (const options of inputs.runInstall) {
const args = ['install']
if (options.recursive) args.unshift('recursive')
if (options.args) args.push(...options.args)
const cmdStr = ['pnpm', ...args].join(' ')
startGroup(`Running ${cmdStr}...`)
const { error, status } = spawnSync('pnpm', args, {
stdio: 'inherit',
cwd: options.cwd,
shell: true,
env,
})
endGroup()
if (error) {
setFailed(error)
continue
}
if (status) {
setFailed(`Command ${cmdStr} (cwd: ${options.cwd}) exits with status ${status}`)
continue
}
}
}
export default runPnpmInstall

View File

@@ -0,0 +1,36 @@
import { warning, startGroup, endGroup } from '@actions/core'
import { spawnSync } from 'child_process'
import { Inputs } from '../inputs'
import { patchPnpmEnv } from '../utils'
export function pruneStore(inputs: Inputs) {
if (inputs.runInstall.length === 0) {
console.log('No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.')
return
}
if (!inputs.storePrune) {
console.log('Store pruning is disabled, skipping pnpm store prune.')
return
}
startGroup('Running pnpm store prune...')
const { error, status } = spawnSync('pnpm', ['store', 'prune'], {
stdio: 'inherit',
shell: true,
env: patchPnpmEnv(inputs),
})
endGroup()
if (error) {
warning(error)
return
}
if (status) {
warning(`command pnpm store prune exits with code ${status}`)
return
}
}
export default pruneStore

View File

@@ -1,4 +0,0 @@
import download from 'download'
import url from './url'
export const downloadSelfInstaller = () => download(url)
export default downloadSelfInstaller

View File

@@ -1,2 +0,0 @@
export * from './url'
export * from './download'

View File

@@ -1,3 +0,0 @@
export const ref = '301414cec74a2b6b63c95b42f2ad1790ccb980ed'
export const url = `https://raw.githubusercontent.com/pnpm/self-installer/${ref}/install.js`
export default url

10
src/utils/index.ts Normal file
View File

@@ -0,0 +1,10 @@
import path from 'path'
import process from 'process'
import { Inputs } from '../inputs'
export const getBinDest = (inputs: Inputs): string => path.join(inputs.dest, 'node_modules', '.bin')
export const patchPnpmEnv = (inputs: Inputs): NodeJS.ProcessEnv => ({
...process.env,
PATH: getBinDest(inputs) + path.delimiter + process.env.PATH,
})

View File

@@ -1,15 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2018", "target": "ES2022",
"module": "CommonJS", "module": "Node16",
"moduleResolution": "Node",
"resolveJsonModule": true, "resolveJsonModule": true,
"lib": [ "lib": [
"ES2018", "ES2023"
"ES2019",
"ES2020",
"ESNext"
], ],
"outDir": "./dist/tsc", "outDir": "./dist/tsc",
"preserveConstEnums": true, "preserveConstEnums": true,