Skip to content

Commit 475c6dd

Browse files
LinnJSts-webEynoreydreykssilverwind
authored
chore: sync with upstream pnpm/action-setup v4.2.0 (#5)
* Fix multiline run_install example in README.md (pnpm#167) * Remove --frozen-lockfile from examples (pnpm#171) * feat: support installation from custom NPM registry (pnpm#179) copy .npmrc from GitHub workspace if it exists so that PNPM respects custom registry configurations when self-installing * Update README.md (pnpm#175) fix the string run_install example * Remove unused `@types/node-fetch` dependency (pnpm#186) * Clarify that package_json_file is relative to GITHUB_WORKSPACE (pnpm#184) * Clarify that package_json_file is relative to GITHUB_WORKSPACE Clarify the description for package_json_file parameter to specify that the path must be relative to the repository root. * Apply suggestion from @zkochan --------- Co-authored-by: Zoltan Kochan <z@kochan.io> * feat: store caching (pnpm#188) * add pnpm store caching * style: format * no semicolons * no star imports * import order * style: no star imports --------- Co-authored-by: khai96_ <hvksmr1996@gmail.com> * refactor: remove star imports (pnpm#196) * fix(ci): exclude macos (pnpm#197) * ci: pin github actions (pnpm#199) * fix: regenerate lockfile to match package.json overrides * fix(security): override fast-xml-parser to >=5.3.4 Resolves GHSA-37qj-frw5-hhjh (RangeError DoS via numeric entities) in transitive dependency @actions/cache > @azure/storage-blob > @azure/core-xml > fast-xml-parser. * fix: resolve lint, build, and security audit failures - Fix prefer-const lint error in cache-restore/run.ts - Override undici to >=6.23.0 (GHSA-g9mf-h72j-4rw9) - Rebuild dist to match source changes * fix(ci): exclude dist from CodeQL analysis dist/index.js is generated by ncc bundling — CodeQL flags dependency code as security issues. Ignore the dist directory since it's not source code. --------- Co-authored-by: Matthias <matthias.dailey@gmail.com> Co-authored-by: Adrian Riedel <Eynorey@users.noreply.github.com> Co-authored-by: Roman Usherenko <roman.usherenko@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Chris Martin <ch.martin@gmail.com> Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Jeremiasz Major <jrh.mjr@gmail.com> Co-authored-by: khai96_ <hvksmr1996@gmail.com> Co-authored-by: Boosted-Bonobo <boostedbonobo1@outlook.com>
1 parent 71944f4 commit 475c6dd

File tree

16 files changed

+105832
-119
lines changed

16 files changed

+105832
-119
lines changed

.github/workflows/security.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
uses: github/codeql-action/init@v3
3838
with:
3939
languages: javascript
40+
config: |
41+
paths-ignore:
42+
- dist
4043
4144
- name: Perform CodeQL Analysis
4245
uses: github/codeql-action/analyze@v3

.github/workflows/test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- windows-latest
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2626

2727
- name: Run the action
2828
uses: ./
@@ -51,7 +51,7 @@ jobs:
5151
- windows-latest
5252

5353
steps:
54-
- uses: actions/checkout@v4
54+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5555

5656
- name: Run the action
5757
uses: ./
@@ -74,16 +74,16 @@ jobs:
7474
fail-fast: false
7575
matrix:
7676
os:
77+
# macos is excluded from this test because node 12 is no longer available on this platform
7778
- ubuntu-latest
78-
- macos-latest
7979
- windows-latest
8080

8181
standalone:
8282
- true
8383
- false
8484

8585
steps:
86-
- uses: actions/checkout@v4
86+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
8787

8888
- name: Run the action
8989
uses: ./
@@ -92,7 +92,7 @@ jobs:
9292
standalone: ${{ matrix.standalone }}
9393

9494
- name: install Node.js
95-
uses: actions/setup-node@v4
95+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9696
with:
9797
# Use Node.js 16 - has ARM64 support and works with pnpm standalone tests
9898
node-version: 16
@@ -160,7 +160,7 @@ jobs:
160160
- yarn
161161
162162
steps:
163-
- uses: actions/checkout@v4
163+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
164164

165165
- name: Run the action
166166
uses: ./

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Claude Code Project Configuration
2+
3+
## Git Conventions
4+
5+
- Do NOT add `Co-Authored-By` lines to commit messages
6+
- Do NOT add "Generated with Claude Code" to PR descriptions
7+
- Keep commit messages concise and conventional-commit style

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ If `run_install` is a YAML string representation of either an object or an array
4040

4141
#### `run_install.args`
4242

43-
**Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--frozen-lockfile, --strict-peer-dependencies]`.
43+
**Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--ignore-scripts, --strict-peer-dependencies]`.
44+
45+
### `cache`
46+
47+
**Optional** (_type:_ `boolean`, _default:_ `false`) Whether to cache the pnpm store directory.
48+
49+
### `cache_dependency_path`
50+
51+
**Optional** (_type:_ `string|string[]`, _default:_ `pnpm-lock.yaml`) File path to the pnpm lockfile, which contents hash will be used as a cache key.
4452

4553
### `package_json_file`
4654

@@ -119,7 +127,7 @@ jobs:
119127
version: 10
120128
run_install: |
121129
- recursive: true
122-
args: [--frozen-lockfile, --strict-peer-dependencies]
130+
args: [--strict-peer-dependencies]
123131
- args: [--global, gulp, prettier, typescript]
124132
```
125133

@@ -142,13 +150,7 @@ jobs:
142150
name: Install pnpm
143151
with:
144152
version: 10
145-
run_install: false
146-
147-
- name: Install Node.js
148-
uses: actions/setup-node@v4
149-
with:
150-
node-version: 20
151-
cache: 'pnpm'
153+
cache: true
152154
153155
- name: Install dependencies
154156
run: pnpm install

action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,16 @@ inputs:
1515
description: If specified, run `pnpm install`
1616
required: false
1717
default: 'null'
18+
cache:
19+
description: Whether to cache the pnpm store directory
20+
required: false
21+
default: 'false'
22+
cache_dependency_path:
23+
description: File path to the pnpm lockfile, which contents hash will be used as a cache key
24+
required: false
25+
default: 'pnpm-lock.yaml'
1826
package_json_file:
19-
description: File path to the package.json to read "packageManager" configuration
27+
description: File path to the package.json to read "packageManager" configuration. This path must be relative to the repository root (GITHUB_WORKSPACE).
2028
required: false
2129
default: 'package.json'
2230
standalone:

dist/index.js

Lines changed: 105184 additions & 4 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
},
66
"pnpm": {
77
"overrides": {
8-
"form-data": ">=4.0.4"
8+
"form-data": ">=4.0.4",
9+
"fast-xml-parser": ">=5.3.4",
10+
"undici": ">=6.23.0"
911
}
1012
},
1113
"scripts": {
@@ -18,10 +20,12 @@
1820
"check": "pnpm lint && pnpm typecheck"
1921
},
2022
"dependencies": {
23+
"@actions/cache": "^4.1.0",
2124
"@actions/core": "^1.10.1",
25+
"@actions/exec": "^1.1.1",
26+
"@actions/glob": "^0.5.0",
2227
"@types/expand-tilde": "^2.0.2",
2328
"@types/node": "^20.11.5",
24-
"@types/node-fetch": "^2.6.11",
2529
"expand-tilde": "^2.0.2",
2630
"yaml": "^2.3.4",
2731
"zod": "^3.22.4"

0 commit comments

Comments
 (0)