Skip to content

Commit 3dd8814

Browse files
committed
[inertiajs#1875] Merge pull request #7 from jamesst20/pnpm_setup_main
[inertiajs#1875] Migrate from npm to pnpm
1 parent c5d8935 commit 3dd8814

18 files changed

+9405
-6665
lines changed

.github/workflows/build.yml

+16-15
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,32 @@ jobs:
99
strategy:
1010
matrix:
1111
adapter: ['react', 'vue2', 'vue3']
12+
node-version: [20]
1213

1314
steps:
1415
- name: Checkout
15-
uses: actions/checkout@v1
16+
uses: actions/checkout@v4
1617

17-
- name: Setup Node.js
18-
uses: actions/setup-node@v2
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v3
1920
with:
20-
node-version: 20
21+
version: 9
2122

22-
- name: Cache node modules
23-
uses: actions/cache@v2
23+
- name: Setup Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
2425
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
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'pnpm'
28+
29+
- name: Install packages
30+
run: pnpm install
3031

3132
- name: Build Inertia
3233
run: |
33-
npm install
34-
cd packages/core && npm run build
35-
cd ../${{ matrix.adapter }} && npm run build
34+
cd packages/core && pnpm run build
35+
cd ../${{ matrix.adapter }} && pnpm run build
3636
3737
- name: Build Playground
3838
run: |
39-
cd playgrounds/${{ matrix.adapter }} && npm run build
39+
cd playgrounds/${{ matrix.adapter }}
40+
pnpm run build

.github/workflows/tests.yml

+16-23
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,37 @@ jobs:
1010
matrix:
1111
adapter: ['vue3']
1212
browser: ['chrome']
13+
node-version: [20]
1314

1415
steps:
1516
- name: Checkout
1617
uses: actions/checkout@v1
1718

18-
- name: Setup Node.js
19-
uses: actions/setup-node@v2
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v3
2021
with:
21-
node-version: 20
22+
version: 9
2223

23-
- name: Cache node modules
24-
uses: actions/cache@v2
24+
- name: Setup Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
2526
with:
26-
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
27-
path: |
28-
~/.cache
29-
node_modules
30-
packages/vue3/tests/node_modules
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
30+
- name: Install packages
31+
run: pnpm install
3132

3233
- name: Build Inertia
3334
run: |
34-
npm install
35-
cd packages/core && npm run build
36-
cd ../vue3 && npm run build
37-
38-
- name: Local-link @inertiajs/core
39-
run: cd packages/core && npm link
40-
41-
- name: Local-link @inertiajs/${{ matrix.adapter }}
42-
run: cd packages/${{ matrix.adapter }} && npm link
35+
cd packages/core && pnpm run build
36+
cd ../${{ matrix.adapter }} && pnpm run build
4337
44-
- name: Install Cypress Dependencies
38+
- name: Install Cypress
4539
run: |
4640
cd packages/${{ matrix.adapter }}/tests
47-
npm install
48-
npm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
41+
./node_modules/cypress/bin/cypress install
4942
5043
- name: Run Cypress (${{ matrix.browser }} / ${{ matrix.adapter }})
5144
run: |
5245
cd packages/${{ matrix.adapter }}/tests
53-
npm run ci
46+
pnpm run ci

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public-hoist-pattern[]=@vue*

0 commit comments

Comments
 (0)