Skip to content

Commit 80cbfda

Browse files
chore: setup pnpm (#3999)
1 parent 34aa43e commit 80cbfda

File tree

23 files changed

+9434
-16209
lines changed

23 files changed

+9434
-16209
lines changed

.github/renovate.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"timezone": "Europe/Amsterdam",
55
"schedule": ["every weekend"],
66
"configMigration": true,
7+
"minimumReleaseAge": "2 days",
8+
"prCreation": "not-pending",
79
"lockFileMaintenance": {
810
"enabled": true
911
},

.github/setup/action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Setup CI'
2-
description: 'Set up npm, Java, and cache for CI'
2+
description: 'Set up Node, Java, and cache for CI'
33

44
inputs:
55
node-version:
@@ -20,11 +20,12 @@ runs:
2020
- uses: nrwl/nx-set-shas@v4
2121
with:
2222
main-branch-name: master
23+
- uses: pnpm/action-setup@v4
2324
- name: Use Node.js ${{ inputs.node-version }}
2425
uses: actions/setup-node@v6
2526
with:
2627
node-version: ${{ inputs.node-version }}
27-
cache: 'npm'
28+
cache: 'pnpm'
2829
registry-url: 'https://registry.npmjs.org'
2930
- uses: actions/setup-java@v5
3031
if: ${{ inputs.setup-java == 'true' }}
@@ -33,17 +34,18 @@ runs:
3334
java-version: 21
3435
cache: 'sbt'
3536
- uses: sbt/setup-sbt@v1
37+
if: ${{ inputs.setup-java == 'true' }}
3638
- uses: actions/cache@v4
3739
if: ${{ github.actor == 'stryker-mutator' }}
3840
with:
3941
path: .nx/cache
40-
key: ${{ runner.os }}-nx-${{ inputs.node-version }}-${{ hashFiles('**/package-lock.json') }}
42+
key: ${{ runner.os }}-nx-${{ inputs.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
4143
restore-keys: |
4244
${{ runner.os }}-nx-${{ inputs.node-version }}-
4345
${{ runner.os }}-nx-
44-
- run: npm ci
46+
- run: pnpm install --prefer-offline --frozen-lockfile
4547
shell: bash
4648
- name: Install Playwright Browsers
4749
if: ${{ inputs.setup-playwright == 'true' }}
4850
shell: bash
49-
run: npm run install-browsers
51+
run: pnpm install-browsers

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
- name: affected
2828
id: affected
2929
shell: bash
30-
run: echo "affected=$(npx nx show projects --affected --json)" >> "$GITHUB_OUTPUT"
30+
run: echo "affected=$(pnpm nx show projects --affected --json)" >> "$GITHUB_OUTPUT"
3131
- name: Install Playwright Browsers
3232
if: ${{ contains(fromJson(steps.affected.outputs.affected), 'elements') }}
33-
run: npm run install-browsers
33+
run: pnpm install-browsers
3434
- name: Lint & Build & Test
35-
run: npm run all
35+
run: pnpm run all
3636
- name: Bundlemon
3737
if: ${{ contains(fromJson(steps.affected.outputs.affected), 'elements') && matrix.os == 'ubuntu-latest' && matrix.node-version == '24.x' }}
3838
uses: lironer/bundlemon-action@v1
@@ -50,9 +50,9 @@ jobs:
5050
- uses: ./.github/setup
5151
with:
5252
setup-playwright: true
53-
- run: npm run download-incremental-reports
53+
- run: pnpm run download-incremental-reports
5454
- name: Run Stryker incrementally
5555
run: |
56-
npx nx run-many --target=stryker --projects=metrics,elements,real-time -- --incremental
56+
pnpm nx run-many --target=stryker --projects=metrics,elements,real-time -- --incremental
5757
env:
5858
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/mutation-testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v6
1414
- uses: ./.github/setup
15-
- run: npx nx run metrics:stryker
15+
- run: pnpm nx run metrics:stryker
1616
env:
1717
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
18-
- run: npx nx run real-time:stryker
18+
- run: pnpm nx run real-time:stryker
1919
env:
2020
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2121
elements:
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
setup-playwright: true
2828
- name: Run Stryker
29-
run: npx nx run elements:stryker
29+
run: pnpm nx run elements:stryker
3030
env:
3131
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
3232

@@ -38,6 +38,6 @@ jobs:
3838
with:
3939
setup-java: true
4040
- name: Run Stryker
41-
run: npx nx run metrics-scala:stryker
41+
run: pnpm nx run metrics-scala:stryker
4242
env:
4343
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: Set Release Env
2121
run: |
2222
echo ${{ secrets.PGP_SECRET }} | base64 --decode | gpg --batch --import
23-
- run: npx nx run-many --target=build
23+
- run: pnpm nx run-many --target=build
2424
- name: Release
25-
run: npm run lerna:publish
25+
run: pnpm run lerna:publish
2626
env:
2727
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
2828
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/update-screenshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- uses: ./.github/setup
2020
with:
2121
setup-playwright: true
22-
- run: npx nx run-many -t generate,build:tsc
23-
- run: npx nx run elements:test:integration:update
22+
- run: pnpm nx run-many -t generate,build:tsc
23+
- run: pnpm nx run elements:test:integration:update
2424
- name: Get GitHub App User ID
2525
id: get-user-id
2626
shell: bash

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Handled via npm
2-
package-lock.json
2+
pnpm-lock.yaml
33
# Handled by lerna
44
CHANGELOG.md
55

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/nx-schema.json",
33
"extends": "nx/presets/npm.json",
4+
"defaultBase": "master",
45
"namedInputs": {
56
"default": [
67
"{projectRoot}/**/*",
7-
"{workspaceRoot}/package-lock.json",
8+
"{workspaceRoot}/pnpm-lock.yaml",
89
{
910
"runtime": "node -v"
1011
}

0 commit comments

Comments
 (0)