Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 611bf69cdb | |||
| 0ebf47130e | |||
| 0e279bb959 | |||
| 3e835812ef | |||
| 551b42e879 |
@@ -194,6 +194,54 @@ jobs:
|
||||
pnpm add is-odd
|
||||
shell: bash
|
||||
|
||||
standalone_windows_self_update:
|
||||
# Regression guard for the patchPnpmEnv PATH-shadow bug. When
|
||||
# standalone: true on Windows AND the requested pnpm differs from the
|
||||
# bootstrap, the previous patchPnpmEnv prepended node_modules/.bin to
|
||||
# PATH; that directory contains an npm-created pnpm.cmd shim pointing
|
||||
# at the BOOTSTRAP pnpm, which shadowed the self-updated pnpm at
|
||||
# $PNPM_HOME/bin and caused `pnpm install` inside the action to run
|
||||
# under the bootstrap version. Exercising a newer-pnpm-only flag
|
||||
# (`--no-runtime`, added in 11.1.0) makes the regression assertable:
|
||||
# if the bootstrap (11.0.4) handles the install, it errors with
|
||||
# "Unknown option: 'runtime'".
|
||||
name: 'Standalone Windows self-update (PATH regression)'
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
|
||||
- name: Set up package.json with a minimal manifest
|
||||
# run_install needs a manifest to install against. Removing the
|
||||
# repo's existing pnpm-lock.yaml avoids frozen-lockfile mismatch.
|
||||
run: |
|
||||
rm -f pnpm-lock.yaml
|
||||
echo '{"name":"sw","private":true,"packageManager":"pnpm@11.1.0"}' > package.json
|
||||
shell: bash
|
||||
|
||||
- name: Run the action
|
||||
uses: ./
|
||||
with:
|
||||
version: 11.1.0
|
||||
standalone: true
|
||||
run_install: |
|
||||
args: ['--no-runtime']
|
||||
|
||||
- name: 'Test: pnpm install completed under the self-updated pnpm'
|
||||
# If the bug recurs, the previous step's run_install will have failed
|
||||
# the job with "Unknown option: 'runtime'", so reaching this step
|
||||
# implies success. Still verify the version on PATH matches request.
|
||||
env:
|
||||
REQUIRED: '11.1.0'
|
||||
run: |
|
||||
set -e
|
||||
actual="$(pnpm --version)"
|
||||
echo "pnpm --version: ${actual}"
|
||||
if [ "${actual}" != "${REQUIRED}" ]; then
|
||||
echo "Expected pnpm ${REQUIRED}, got ${actual}"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
cache_store_path:
|
||||
# Regression guard for #233. When package.json pins a pnpm major that
|
||||
# differs from the bootstrap pnpm's major, the bootstrap reports its
|
||||
|
||||
@@ -48,7 +48,7 @@ If `run_install` is a YAML string representation of either an object or an array
|
||||
|
||||
### `cache_dependency_path`
|
||||
|
||||
**Optional** (_type:_ `string|string[]`, _default:_ `pnpm-lock.yaml`) File path to the pnpm lockfile, which contents hash will be used as a cache key.
|
||||
**Optional** (_type:_ `string`, _default:_ `pnpm-lock.yaml`) File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
|
||||
|
||||
### `package_json_file`
|
||||
|
||||
@@ -158,6 +158,33 @@ jobs:
|
||||
|
||||
**Note:** You don't need to run `pnpm store prune` at the end; post-action has already taken care of that.
|
||||
|
||||
### Cache dependencies from multiple lockfiles
|
||||
|
||||
```yaml
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
cache-and-install-multiple:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- uses: pnpm/action-setup@v6
|
||||
with:
|
||||
version: 10
|
||||
cache: true
|
||||
cache_dependency_path: |
|
||||
one/pnpm-lock.yaml
|
||||
two/pnpm-lock.yaml
|
||||
run_install: |
|
||||
- cwd: one
|
||||
- cwd: two
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
This action does not setup Node.js for you, use [actions/setup-node](https://github.com/actions/setup-node) yourself.
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ inputs:
|
||||
required: false
|
||||
default: 'false'
|
||||
cache_dependency_path:
|
||||
description: File path to the pnpm lockfile, which contents hash will be used as a cache key
|
||||
description: File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
|
||||
required: false
|
||||
default: 'pnpm-lock.yaml'
|
||||
package_json_file:
|
||||
|
||||
Vendored
+134
-134
File diff suppressed because one or more lines are too long
+1
-1
@@ -19,6 +19,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.27.4",
|
||||
"typescript": "^5.3.3"
|
||||
"typescript": "^7.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+209
-6
@@ -40,8 +40,8 @@ importers:
|
||||
specifier: ^0.27.4
|
||||
version: 0.27.4
|
||||
typescript:
|
||||
specifier: ^5.3.3
|
||||
version: 5.7.3
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.2
|
||||
|
||||
packages:
|
||||
|
||||
@@ -116,6 +116,7 @@ packages:
|
||||
|
||||
'@azure/ms-rest-js@2.7.0':
|
||||
resolution: {integrity: sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==}
|
||||
deprecated: This package has been deprecated in favor of the new Azure SDK packages from [Azure SDK for JavaScript](https://github.com/azure/azure-sdk-for-js).
|
||||
|
||||
'@azure/storage-blob@12.27.0':
|
||||
resolution: {integrity: sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==}
|
||||
@@ -293,6 +294,126 @@ packages:
|
||||
'@types/node@22.19.11':
|
||||
resolution: {integrity: sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w==}
|
||||
|
||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
||||
resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
|
||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@typescript/typescript-darwin-x64@7.0.2':
|
||||
resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@typescript/typescript-linux-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-arm@7.0.2':
|
||||
resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-loong64@7.0.2':
|
||||
resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
||||
resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
||||
resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
||||
resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-s390x@7.0.2':
|
||||
resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-linux-x64@7.0.2':
|
||||
resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [netbsd]
|
||||
|
||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
|
||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
||||
resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
'@typescript/typescript-sunos-x64@7.0.2':
|
||||
resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
'@typescript/typescript-win32-arm64@7.0.2':
|
||||
resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@typescript/typescript-win32-x64@7.0.2':
|
||||
resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@typespec/ts-http-runtime@0.3.0':
|
||||
resolution: {integrity: sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==}
|
||||
engines: {node: '>=20.0.0'}
|
||||
@@ -479,9 +600,9 @@ packages:
|
||||
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'}
|
||||
typescript@7.0.2:
|
||||
resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
|
||||
engines: {node: '>=16.20.0'}
|
||||
hasBin: true
|
||||
|
||||
undici-types@6.21.0:
|
||||
@@ -493,6 +614,7 @@ packages:
|
||||
|
||||
uuid@8.3.2:
|
||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
|
||||
hasBin: true
|
||||
|
||||
webidl-conversions@3.0.1:
|
||||
@@ -770,6 +892,66 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
|
||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-darwin-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-arm@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-loong64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-s390x@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-linux-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-sunos-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-win32-arm64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typescript/typescript-win32-x64@7.0.2':
|
||||
optional: true
|
||||
|
||||
'@typespec/ts-http-runtime@0.3.0':
|
||||
dependencies:
|
||||
http-proxy-agent: 7.0.2
|
||||
@@ -967,7 +1149,28 @@ snapshots:
|
||||
|
||||
tunnel@0.0.6: {}
|
||||
|
||||
typescript@5.7.3: {}
|
||||
typescript@7.0.2:
|
||||
optionalDependencies:
|
||||
'@typescript/typescript-aix-ppc64': 7.0.2
|
||||
'@typescript/typescript-darwin-arm64': 7.0.2
|
||||
'@typescript/typescript-darwin-x64': 7.0.2
|
||||
'@typescript/typescript-freebsd-arm64': 7.0.2
|
||||
'@typescript/typescript-freebsd-x64': 7.0.2
|
||||
'@typescript/typescript-linux-arm': 7.0.2
|
||||
'@typescript/typescript-linux-arm64': 7.0.2
|
||||
'@typescript/typescript-linux-loong64': 7.0.2
|
||||
'@typescript/typescript-linux-mips64el': 7.0.2
|
||||
'@typescript/typescript-linux-ppc64': 7.0.2
|
||||
'@typescript/typescript-linux-riscv64': 7.0.2
|
||||
'@typescript/typescript-linux-s390x': 7.0.2
|
||||
'@typescript/typescript-linux-x64': 7.0.2
|
||||
'@typescript/typescript-netbsd-arm64': 7.0.2
|
||||
'@typescript/typescript-netbsd-x64': 7.0.2
|
||||
'@typescript/typescript-openbsd-arm64': 7.0.2
|
||||
'@typescript/typescript-openbsd-x64': 7.0.2
|
||||
'@typescript/typescript-sunos-x64': 7.0.2
|
||||
'@typescript/typescript-win32-arm64': 7.0.2
|
||||
'@typescript/typescript-win32-x64': 7.0.2
|
||||
|
||||
undici-types@6.21.0: {}
|
||||
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@pnpm/exe": "11.0.4"
|
||||
"@pnpm/exe": "11.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/exe": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-11.0.4.tgz",
|
||||
"integrity": "sha512-3OwYqbbj1KtuUqoMo5OEkY8nU/WutZ7L5ADFl0bbW9oyqU55U37aDqA3NJNSk28CyszNARfrjerAF2DW2TsV7w==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-11.7.0.tgz",
|
||||
"integrity": "sha512-3CujpSSp2PIDE0pwu7mWSdjhdDqaZa7OppVooECWWaNEoA/z66s9FZts1MhDO+2yq1XER4gBHh84DVbFN/r1rA==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@reflink/reflink": "0.1.19",
|
||||
"detect-libc": "^2.0.3"
|
||||
"detect-libc": "^2.1.2"
|
||||
},
|
||||
"bin": {
|
||||
"pn": "pn",
|
||||
@@ -28,20 +28,19 @@
|
||||
"url": "https://opencollective.com/pnpm"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@pnpm/linux-arm64": "11.0.4",
|
||||
"@pnpm/linux-x64": "11.0.4",
|
||||
"@pnpm/linuxstatic-arm64": "11.0.4",
|
||||
"@pnpm/linuxstatic-x64": "11.0.4",
|
||||
"@pnpm/macos-arm64": "11.0.4",
|
||||
"@pnpm/macos-x64": "11.0.4",
|
||||
"@pnpm/win-arm64": "11.0.4",
|
||||
"@pnpm/win-x64": "11.0.4"
|
||||
"@pnpm/linux-arm64": "11.7.0",
|
||||
"@pnpm/linux-x64": "11.7.0",
|
||||
"@pnpm/linuxstatic-arm64": "11.7.0",
|
||||
"@pnpm/linuxstatic-x64": "11.7.0",
|
||||
"@pnpm/macos-arm64": "11.7.0",
|
||||
"@pnpm/win-arm64": "11.7.0",
|
||||
"@pnpm/win-x64": "11.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/linux-arm64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-11.0.4.tgz",
|
||||
"integrity": "sha512-Bz7V2sFypoGHX/t5w/w7jnCw5DCK3C8s5q8whHJJ3iS5kRznX3Q1F4LwSjjy+lsi777fHyNIvD7qtNmdt9IKoA==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-11.7.0.tgz",
|
||||
"integrity": "sha512-ANTX2SlMO+d2y/4bYQhHCwHPX7gSSADJ5+pMUIiDFzIsybnFFaJdZboaFfq9NOxCbETcnDxqZ95Rz3+NHx1JIw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -55,9 +54,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/linux-x64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-11.0.4.tgz",
|
||||
"integrity": "sha512-u0Yn1gytR1vKdPk6fYF500H8ZWQlj0cTuIQPp+5GYVPkMmA5bSw41RNIDPBfjDlE8ERmQWaQcrgmTcmTZ+n22A==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-11.7.0.tgz",
|
||||
"integrity": "sha512-fr75tqixXoS8cnA81HQIomjOGEPnsOsd3xCDL5pMNY5raOXbKurtgRV+RjATvjxlJxSLIVFKegABlxAiB7q72A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -71,9 +70,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/linuxstatic-arm64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-arm64/-/linuxstatic-arm64-11.0.4.tgz",
|
||||
"integrity": "sha512-0aitEcfhWNXNZhfJGt/kJaRvfcdtJzXZpV+toJN94kfawSJnhuawfnUSXMi/3m0G97HkJc7BH8rOz3sojUKt0g==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-arm64/-/linuxstatic-arm64-11.7.0.tgz",
|
||||
"integrity": "sha512-Q++pgzvXkGeqnVRl26/uqmpMGdttQus0rGyL3XIfYGLCi8ZfajYUaCKdZID2MH7+CNOuugWDdFDup3r7BR7Rfg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -90,9 +89,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/linuxstatic-x64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-x64/-/linuxstatic-x64-11.0.4.tgz",
|
||||
"integrity": "sha512-xDJdeJ7D2YvDBy2/IH9lEqMKiSuZiV8190XKWOgQgxUGGeuW4z3j6Ewpl0S5bXsWuNjAgC+uCKp7Qp3P7cXAvw==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-x64/-/linuxstatic-x64-11.7.0.tgz",
|
||||
"integrity": "sha512-z1+exW6ocU/rmOvJnmU3FUBJYaryCUqFoaXN6KZW5BqTj7BPJb7HJcAyXRlirNZMJlEiUY5rXbfStGPQJhGsVA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -109,9 +108,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/macos-arm64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-11.0.4.tgz",
|
||||
"integrity": "sha512-dNR69jUARtGFuyyLE9VuyxhRUKC8MO/7/xIyAdeIMZAD5ej0Y/Ct0DYCa/FLbgFL1nXaXmp4+gRMfJBkkrKfQQ==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-11.7.0.tgz",
|
||||
"integrity": "sha512-gD34/k3JT5oab4BYaqrUor3e4VdwXvkfLNlEI+lvDtX1MHT+2Nauc9p9NsQnpn1zE8blQEflzbF8wAUQ6Dmvkw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -124,26 +123,10 @@
|
||||
"url": "https://opencollective.com/pnpm"
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/macos-x64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/macos-x64/-/macos-x64-11.0.4.tgz",
|
||||
"integrity": "sha512-RfyrxSBajeEU16dZsgFjbdagDV9F4HNCJfbBgm8IbGjL0+J95naM/VmCDLd6S3+1tISeI2MxtcyCxqjKJsD/BA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/pnpm"
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/win-arm64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-11.0.4.tgz",
|
||||
"integrity": "sha512-fOQEv8b9KxZlUAxPPXSQQUUIrt2nY24Qwd4RzCPpatacBnsE4JIadlr/B4V5z2zFxmV7FdHr7nYUhv2RqTlY/w==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-11.7.0.tgz",
|
||||
"integrity": "sha512-hRTcDmm2j7KoRwbqNo0rUAu9A1kVJN98Eob7H09U0uPJbEMax85JGOmERkT3Lf6HjVJuFNBvfaJ3OTI3HmlVGg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -157,9 +140,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pnpm/win-x64": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-11.0.4.tgz",
|
||||
"integrity": "sha512-pErHAV8m3NZuPSeCmH3senTSHX0nwkH5lLzQSpiFuyt08hq8sqL3jDymT4ri9N7ixPN9RFZghZIiT3h+Croaew==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-11.7.0.tgz",
|
||||
"integrity": "sha512-r/1NuKY7Z+6ZXVIzVrUEMj6TTEBdR63geV4Rlm8HKEhgQTdxyIsJoqV3FJGqoyzbRaScObqAwRfMaK9dskPddQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"pnpm": "11.0.4"
|
||||
"pnpm": "11.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pnpm": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-11.0.4.tgz",
|
||||
"integrity": "sha512-CjlxZQB6AU7VKRmmHl9GxIubyohATDA+yuzGP2Le9WOJjTxril1epYEes5jP4DqwXaGlzpY/Em1erUwC+TuDww==",
|
||||
"version": "11.7.0",
|
||||
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-11.7.0.tgz",
|
||||
"integrity": "sha512-GcyFLBIMcSV2DyRD7mvgyltA+fUFmN4aCaHxd1A+AQ5Xwjx3ZG4B52HeWb+HT7IqM5jDOrlpH8E+uUa28PTWIA==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"pn": "bin/pnpm.mjs",
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
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')
|
||||
@@ -14,11 +11,16 @@ export function runPnpmInstall(inputs: Inputs) {
|
||||
const cmdStr = ['pnpm', ...args].join(' ')
|
||||
startGroup(`Running ${cmdStr}...`)
|
||||
|
||||
// spawnSync inherits process.env, which already has $PNPM_HOME/bin and
|
||||
// $PNPM_HOME prepended via addPath() in install-pnpm. Do NOT pass a
|
||||
// hand-patched env that adds node_modules/.bin to the front — on
|
||||
// Windows standalone, .bin/pnpm.cmd is an npm shim pointing at the
|
||||
// BOOTSTRAP pnpm, which would shadow the self-updated one and break
|
||||
// newer-pnpm-only behavior.
|
||||
const { error, status } = spawnSync('pnpm', args, {
|
||||
stdio: 'inherit',
|
||||
cwd: options.cwd,
|
||||
shell: true,
|
||||
env,
|
||||
})
|
||||
|
||||
endGroup()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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) {
|
||||
@@ -10,10 +9,11 @@ export function pruneStore(inputs: Inputs) {
|
||||
}
|
||||
|
||||
startGroup('Running pnpm store prune...')
|
||||
// spawnSync inherits process.env (which has the right PATH from addPath
|
||||
// in install-pnpm). See pnpm-install/index.ts for the rationale.
|
||||
const { error, status } = spawnSync('pnpm', ['store', 'prune'], {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
env: patchPnpmEnv(inputs),
|
||||
})
|
||||
endGroup()
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
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: path.join(getBinDest(inputs), 'bin') + path.delimiter + getBinDest(inputs) + path.delimiter + process.env.PATH,
|
||||
})
|
||||
Reference in New Issue
Block a user