Compare commits

..

5 Commits

Author SHA1 Message Date
Ben McCann
6cbc239050
Merge d5bd7e8c9a into 5d79380f29 2024-06-12 15:37:27 +00:00
Ben McCann
d5bd7e8c9a
Update src/install-pnpm/run.ts 2024-06-12 08:37:26 -07: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
3 changed files with 11 additions and 5 deletions

View File

@ -119,6 +119,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- uses: pnpm/action-setup@v4
name: Install pnpm

View File

@ -23,6 +23,11 @@ inputs:
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:
description: Location of `pnpm` and `pnpx` command
runs:
using: node20
main: dist/index.js

View File

@ -73,7 +73,7 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
if (!GITHUB_WORKSPACE) {
throw new Error(`No workspace is found.
If you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
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.`)
}
@ -109,13 +109,13 @@ function getPnpmVersionFromLockfile(
): string | undefined {
switch (true) {
case lockfileVersion === '5.3':
return '6';
return 'latest-6';
case lockfileVersion === '5.4':
return '7';
return 'latest-7';
case lockfileVersion === '6.0' || lockfileVersion === '6.1':
return '8';
return 'latest-8';
case lockfileVersion === '7.0' || lockfileVersion === '9.0':
return '9';
return 'latest-9';
default:
return undefined;
}