Skip to content

Commit 2023cc5

Browse files
azuclaude
andcommitted
chore: migrate from yarn v1 to pnpm
- Update packageManager field in package.json - Convert yarn.lock to pnpm-lock.yaml using pnpm import - Update GitHub Actions workflows to use pnpm - Update test script to use pnpm in example directory - Add persist-credentials: false to checkout actions for security - Add explicit permissions to workflow jobs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ab4aebd commit 2023cc5

File tree

5 files changed

+3828
-3355
lines changed

5 files changed

+3828
-3355
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,24 @@ jobs:
44
test:
55
name: "Test on Node.js ${{ matrix.node-version }}"
66
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
79
strategy:
810
matrix:
911
node-version: [ 18, 20, 22 ]
1012
steps:
1113
- name: checkout
12-
uses: actions/checkout@v4
14+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
15+
with:
16+
persist-credentials: false
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1320
- name: setup Node.js ${{ matrix.node-version }}
14-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
1522
with:
1623
node-version: ${{ matrix.node-version }}
1724
- name: Install
18-
run: yarn install
25+
run: pnpm install
1926
- name: Test
20-
run: yarn test
27+
run: pnpm test

.github/workflows/website.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,33 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
steps:
12-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
15+
with:
16+
persist-credentials: false
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
1320
- name: Setup Node.js
14-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
1522
with:
1623
node-version: 20
1724
- name: Set Env
1825
run: |
1926
echo "CURRENT_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV
2027
- name: Install
21-
run: yarn install
28+
run: pnpm install
2229
- name: Build
2330
run: |
24-
yarn install
25-
npm run website -- --metadataVersion="${CURRENT_VERSION}"
31+
pnpm install
32+
pnpm run website -- --metadataVersion="${CURRENT_VERSION}"
2633
env:
2734
CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
2835
working-directory: example/
2936
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v4
37+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3138
with:
3239
github_token: ${{ secrets.GITHUB_TOKEN }}
3340
publish_dir: ./example/dist

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"prepublish": "npm run --if-present build",
3030
"pretest": "node tool/create-fixtures.js",
3131
"test": "textlint-scripts test && npm run test:textlint",
32-
"test:textlint": "(cd example && yarn install && npm test)",
32+
"test:textlint": "(cd example && pnpm install && npm test)",
3333
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
3434
"prepare": "git config --local core.hooksPath .githooks"
3535
},
@@ -68,5 +68,5 @@
6868
"prettier --write"
6969
]
7070
},
71-
"packageManager": "[email protected]+sha256.c17d3797fb9a9115bf375e31bfd30058cac6bc9c3b8807a3d8cb2094794b51ca"
71+
"packageManager": "[email protected]+sha512.9fb969fa749b3ade6035e0f109f0b8a60b5d08a1a87fdf72e337da90dcc93336e2280ca4e44f2358a649b83c17959e9993e777c2080879f3801e6f0d999ad3dd"
7272
}

0 commit comments

Comments
 (0)