Skip to content

Commit

Permalink
Migrate from npm to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesst20 committed May 12, 2024
1 parent 8738c29 commit 2246970
Show file tree
Hide file tree
Showing 17 changed files with 9,410 additions and 6,662 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,29 @@ jobs:
strategy:
matrix:
adapter: ['react', 'vue2', 'vue3']
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
node-version: 20
version: 9

- name: Cache node modules
uses: actions/cache@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
path: |
~/.cache
node_modules
packages/${{ matrix.adapter }}/tests/node_modules
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../${{ matrix.adapter }} && npm run build
pnpm install
cd packages/core && pnpm run build
cd ../${{ matrix.adapter }} && pnpm run build
- name: Build Playground
run: |
cd playgrounds/${{ matrix.adapter }} && npm run build
cd playgrounds/${{ matrix.adapter }} && pnpm run build
36 changes: 14 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,36 @@ jobs:
matrix:
adapter: ['vue3']
browser: ['chrome']
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
node-version: 20
version: 9

- name: Cache node modules
uses: actions/cache@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('package-lock.json') }}
path: |
~/.cache
node_modules
packages/vue3/tests/node_modules
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../vue3 && npm run build
- name: Local-link @inertiajs/core
run: cd packages/core && npm link

- name: Local-link @inertiajs/${{ matrix.adapter }}
run: cd packages/${{ matrix.adapter }} && npm link
pnpm install
cd packages/core && pnpm run build
cd ../vue3 && pnpm run build
- name: Install Cypress Dependencies
run: |
cd packages/${{ matrix.adapter }}/tests
npm install
npm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
pnpm install
pnpm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
- name: Run Cypress (${{ matrix.browser }} / ${{ matrix.adapter }})
run: |
cd packages/${{ matrix.adapter }}/tests
npm run ci
pnpm run ci
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=@vue*
Loading

0 comments on commit 2246970

Please sign in to comment.