Skip to content

Commit c554295

Browse files
authored
[inertiajs#1875] Merge pull request #7 from jamesst20/pnpm_setup_main
[inertiajs#1875] Migrate from npm to pnpm
2 parents 8738c29 + 53e1595 commit c554295

18 files changed

+9400
-6664
lines changed

.github/workflows/build.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,29 @@ 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'
3028

3129
- name: Build Inertia
3230
run: |
33-
npm install
34-
cd packages/core && npm run build
35-
cd ../${{ matrix.adapter }} && npm run build
31+
pnpm install
32+
cd packages/core && pnpm run build
33+
cd ../${{ matrix.adapter }} && pnpm run build
3634
3735
- name: Build Playground
3836
run: |
39-
cd playgrounds/${{ matrix.adapter }} && npm run build
37+
cd playgrounds/${{ matrix.adapter }} && pnpm run build

.github/workflows/tests.yml

+14-22
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,36 @@ 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'
3129

3230
- name: Build Inertia
3331
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
32+
pnpm install
33+
cd packages/core && pnpm run build
34+
cd ../vue3 && pnpm run build
4335
4436
- name: Install Cypress Dependencies
4537
run: |
4638
cd packages/${{ matrix.adapter }}/tests
47-
npm install
48-
npm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
39+
pnpm install
40+
pnpm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
4941
5042
- name: Run Cypress (${{ matrix.browser }} / ${{ matrix.adapter }})
5143
run: |
5244
cd packages/${{ matrix.adapter }}/tests
53-
npm run ci
45+
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)