Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from npm to pnpm #1875

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ jobs:
strategy:
matrix:
adapter: ['react', 'vue2', 'vue3', 'svelte']
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: 16.15
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: Install packages
run: pnpm install

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../${{ matrix.adapter }} && npm run build
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
39 changes: 16 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,37 @@ jobs:
matrix:
adapter: ['vue2']
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: 16.15
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/vue2/tests/node_modules
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install packages
run: pnpm install

- name: Build Inertia
run: |
npm install
cd packages/core && npm run build
cd ../vue2 && 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
cd packages/core && pnpm run build
cd ../${{ matrix.adapter }} && pnpm run build

- name: Install Cypress Dependencies
- name: Install Cypress
run: |
cd packages/${{ matrix.adapter }}/tests
npm install
npm link "@inertiajs/core" "@inertiajs/${{ matrix.adapter }}"
./node_modules/cypress/bin/cypress install

- 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 .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
node_modules
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