Skip to content

Commit

Permalink
Merge pull request #30 from codeforjapan/chore/use-pnpm
Browse files Browse the repository at this point in the history
migrate into pnpm
  • Loading branch information
sushichan044 authored Mar 4, 2025
2 parents 4da1abf + 7278d35 commit 7a9cd28
Show file tree
Hide file tree
Showing 8 changed files with 11,255 additions and 9,180 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js and yarn
- name: Setup Node.js and pnpm
uses: ./.github/workflows/composite/setup

- name: Build
run: yarn run build
run: pnpm run build

- name: Run ESLint
run: yarn run lint
run: pnpm run lint

- name: Run Prettier
run: yarn run format:ci
run: pnpm run format:ci

- name: Run typecheck
run: yarn run typecheck
run: pnpm run typecheck

- name: Run Vitest
run: yarn run test
run: pnpm run test
31 changes: 16 additions & 15 deletions .github/workflows/composite/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
name: Setup Node.js
description: Setup Node.js and yarn
description: Setup Node.js and pnpm

runs:
using: composite
steps:
- name: Setup yarn
shell: bash
run: corepack enable yarn
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false

- name: Get yarn cache directory path
id: yarn-store
- name: Get pnpm store path
id: pnpm-store
shell: bash
run: echo "store_path=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
run: echo "store_path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"

- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: package.json

- name: Restore yarn cache
- name: Restore pnpm cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ steps.yarn-store.outputs.store_path }}
key: ${{ runner.os }}-yarn-store-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.store_path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-store-
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
shell: bash
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Save pnpm cache if main branch
if: github.ref_name == 'main'
id: save-yarn-cache
id: save-pnpm-cache
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ steps.yarn-store.outputs.store_path }}
key: ${{ runner.os }}-yarn-store-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.store_path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix=''
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mantine/charts": "7.15.2",
"@mantine/core": "7.15.2",
"@mantine/dates": "7.15.2",
"@mantine/form": "^7.15.2",
"@mantine/form": "7.15.2",
"@mantine/hooks": "7.15.2",
"@mantine/modals": "7.15.2",
"@remix-run/node": "2.16.0",
Expand Down Expand Up @@ -52,7 +52,6 @@
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
"@types/eslint-plugin-jsx-a11y": "6.10.0",
"@types/eslint__eslintrc": "3.3.0",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@vitejs/plugin-react": "4.3.4",
Expand All @@ -70,6 +69,7 @@
"jsdom": "26.0.0",
"msw": "2.7.0",
"orval": "7.3.0",
"pnpm": "10.5.2",
"postcss": "8.4.49",
"postcss-preset-mantine": "1.17.0",
"postcss-simple-vars": "7.0.1",
Expand All @@ -86,5 +86,11 @@
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@1.22.22"
"packageManager": "pnpm@10.5.2",
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"msw"
]
}
}
Loading

0 comments on commit 7a9cd28

Please sign in to comment.