Skip to content

Commit 90ec13c

Browse files
Migrate to pnpm (#2276)
* migrate to pnpm * Update pnpm-lock.yaml * Added scripts to run the test server and playground servers * formatting * simplify * approve esbuild postinstall * formatting * remove useless script * Add test server log message * Renamed `server:run` to `build` for consistency * Remove Pail from composer dev script and use pnpx * Renamed `watch` commands to `dev` * Update pnpm-lock.yaml * Restrict Playwright version (see #2382) * Update pnpm-lock.yaml * WIP * WIP * Update CONTRIBUTING.md * Update url.test.ts * Update build.yml * Update CONTRIBUTING.md * Adapter check * WIP * WIP * Update tsconfig.json * Server status * Update url.test.ts * WIP --------- Co-authored-by: Pascal Baljet <[email protected]>
1 parent 015316a commit 90ec13c

34 files changed

+6473
-9443
lines changed

.github/CONTRIBUTING.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,23 @@ jobs:
66
timeout-minutes: 15
77
runs-on: ubuntu-24.04
88

9-
strategy:
10-
matrix:
11-
adapter: ['react', 'vue3', 'svelte']
12-
139
steps:
1410
- name: Checkout
1511
uses: actions/checkout@v4
1612

13+
- name: Install pnpm
14+
uses: pnpm/action-setup@v3
15+
with:
16+
version: 10
17+
1718
- name: Setup Node.js
1819
uses: actions/setup-node@v4
1920
with:
2021
node-version: 22.14
22+
cache: pnpm
2123

22-
- name: Cache node modules
23-
uses: actions/cache@v4
24-
with:
25-
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
26-
path: |
27-
~/.cache
28-
node_modules
29-
packages/${{ matrix.adapter }}/tests/node_modules
24+
- name: Install dependencies
25+
run: pnpm install
3026

3127
- name: Build Inertia
32-
run: |
33-
npm install
34-
cd packages/core && npm run build
35-
cd ../${{ matrix.adapter }} && npm run build
28+
run: pnpm build:all

.github/workflows/playwright.yml

Lines changed: 33 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,37 @@ jobs:
77
runs-on: ubuntu-24.04
88
strategy:
99
matrix:
10-
adapter: ['vue3', 'react', 'svelte']
11-
env:
12-
PACKAGE: ${{ matrix.adapter }}
10+
adapter: ["vue", "react", "svelte"]
1311
steps:
14-
- uses: actions/checkout@v4
15-
16-
- uses: actions/setup-node@v4
17-
with:
18-
node-version: 22.14
19-
20-
- name: Build Inertia
21-
run: |
22-
npm install
23-
cd packages/core
24-
npm run build
25-
26-
- name: Build Adapter
27-
run: |
28-
cd packages/${{ matrix.adapter }}
29-
npm run build
30-
31-
- name: Install Test Dependencies
32-
run: |
33-
cd packages/${{ matrix.adapter }}/test-app
34-
npm install
35-
36-
- name: Local-link @inertiajs/core
37-
run: cd packages/core && npm link
38-
39-
- name: Local-link @inertiajs/${{ matrix.adapter }}
40-
run: cd packages/${{ matrix.adapter }} && npm link
41-
42-
- name: Install Playwright Browsers
43-
run: cd packages/${{ matrix.adapter }} && npx playwright install --with-deps
44-
45-
- name: Install Playwright Test Dependencies
46-
run: cd tests/app && npm install
47-
48-
- name: Run Playwright Tests
49-
run: cd tests && npx playwright test
50-
51-
- name: Upload failure screenshots
52-
if: failure()
53-
uses: actions/upload-artifact@v4
54-
with:
55-
name: playwright-failure-screenshots-${{ matrix.adapter }}
56-
path: test-results
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v3
17+
with:
18+
version: 10
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.14
24+
cache: pnpm
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Build Inertia
30+
run: pnpm -r --filter ./packages/core --filter ./packages/${{ matrix.adapter }}* build
31+
32+
- name: Install Playwright Browsers
33+
run: pnpm playwright install chromium
34+
35+
- name: Run Playwright Tests
36+
run: pnpm test:${{ matrix.adapter }}
37+
38+
- name: Upload failure screenshots
39+
if: failure()
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: playwright-failure-screenshots-${{ matrix.adapter }}
43+
path: test-results

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.github/
2+
pnpm-lock.yaml
23
**/.svelte-kit
34
**/bootstrap/ssr
45
**/composer.json

0 commit comments

Comments
 (0)