Skip to content

Commit a2a3938

Browse files
committed
tidy #84 [CI] Replace Corepack with pnpm/setup (Kocal)
This PR was merged into the main branch. Discussion ---------- [CI] Replace Corepack with pnpm/setup | Q | A | -------------- | --- | Bug fix? | no | New feature? | no <!-- please update CHANGELOG.md file --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and CHANGELOG.md files --> | Documentation? | no <!-- required for new features, or documentation updates --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Same than symfony/ux#3774, but for Reprise :) Commits ------- 091a0d7 [CI] Replace Corepack with pnpm/setup
2 parents e82f79c + 091a0d7 commit a2a3938

4 files changed

Lines changed: 21 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,9 @@ jobs:
2525
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2626
with:
2727
persist-credentials: false
28-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
29-
- name: Set node
30-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
28+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
3129
with:
32-
node-version-file: .nvmrc
33-
cache: pnpm
34-
cache-dependency-path: pnpm-lock.yaml
35-
- name: Install
36-
run: pnpm install --frozen-lockfile
30+
cache: true
3731
- name: Lint
3832
run: pnpm run lint
3933
- name: Format check
@@ -55,15 +49,10 @@ jobs:
5549
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5650
with:
5751
persist-credentials: false
58-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
59-
- name: Set node
60-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
52+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
6153
with:
62-
node-version: ${{ matrix.node-version }}
63-
cache: pnpm
64-
cache-dependency-path: pnpm-lock.yaml
65-
- name: Install
66-
run: pnpm install --frozen-lockfile
54+
runtime: node@${{ matrix.node-version }}
55+
cache: true
6756
- name: Build
6857
run: pnpm build
6958
- name: Test
@@ -93,15 +82,9 @@ jobs:
9382
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9483
with:
9584
persist-credentials: false
96-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
97-
- name: Set node
98-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
85+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
9986
with:
100-
node-version-file: .nvmrc
101-
cache: pnpm
102-
cache-dependency-path: pnpm-lock.yaml
103-
- name: Install
104-
run: pnpm install --frozen-lockfile
87+
cache: true
10588
- name: Pin ${{ matrix.name }}
10689
run: pnpm --filter @symfony/reprise add -D ${{ matrix.add }}
10790
- name: Build
@@ -218,15 +201,9 @@ jobs:
218201
dependency-versions: highest
219202
composer-options: --prefer-dist
220203
custom-cache-suffix: ${{ matrix.symfony-version }}
221-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
222-
- name: Set node
223-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
204+
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
224205
with:
225-
node-version-file: .nvmrc
226-
cache: pnpm
227-
cache-dependency-path: pnpm-lock.yaml
228-
- name: Install JS dependencies
229-
run: pnpm install --frozen-lockfile
206+
cache: true
230207
- name: Pin ${{ matrix.name }}
231208
if: matrix.add
232209
run: pnpm -C playground add -D ${{ matrix.add }}

.github/workflows/release-on-npm.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ jobs:
3333
fi
3434
echo "Tag ${GITHUB_REF_NAME} verified as ancestor of main."
3535
36-
# Pinned explicitly to avoid pulling a compromised "latest" at release time; bump via dedicated PR.
37-
- run: npm i -g corepack@0.35.0 && corepack enable
36+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
37+
# setup-node is kept here (instead of pnpm/setup) because its `registry-url` input is
38+
# what wires npm OIDC trusted publishing.
3839
# setup-node does not enable any package-manager cache here (no `cache:` input),
3940
# so cache poisoning is not a concern on this release workflow.
4041
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # zizmor: ignore[cache-poisoning] v7.0.0

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ $ git remote add upstream git@github.com:symfony/reprise.git
3434
- **PHP 8.4 or higher**
3535
- **Composer**
3636
- **Node.js 22 or higher**
37-
- **Corepack**
38-
- **pnpm 11.10 or higher**
37+
- **[pnpm](https://pnpm.io/installation) 11.10 or higher**
3938

4039
```shell
4140
$ composer install
42-
$ corepack enable && pnpm install
41+
$ pnpm install
4342
```
4443

4544
> [!IMPORTANT]

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"engines": {
77
"node": "^22.18.0 || ^24.11.0 || >=26.0"
88
},
9+
"devEngines": {
10+
"runtime": {
11+
"name": "node",
12+
"version": "^22.18.0",
13+
"onFail": "warn"
14+
}
15+
},
916
"scripts": {
1017
"build": "pnpm -C assets run build",
1118
"dev": "pnpm -C assets run dev",

0 commit comments

Comments
 (0)