Skip to content

Commit 3819faa

Browse files
committed
build: convert repo from npm to pnpm
- import package-lock.json to pnpm-lock.yaml (resolved versions preserved) and remove package-lock.json - add packageManager: pnpm@11.15.1 and pnpm-workspace.yaml (allowBuilds: esbuild for its postinstall) - convert npm-isms in package.json scripts to pnpm equivalents - CI: add pnpm/action-setup@v6, cache pnpm, pnpm install --frozen-lockfile, pnpm run; bump codecov-action to v7 - husky pre-commit: npx lint-staged -> pnpm exec lint-staged - ignore files: prettierignore pnpm-lock.yaml; gitignore package-lock.json and yarn.lock
1 parent 93850d2 commit 3819faa

8 files changed

Lines changed: 2260 additions & 3715 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v6
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v6
1921
- name: Use node
2022
uses: actions/setup-node@v6
2123
with:
2224
node-version: 24
23-
cache: npm
25+
cache: pnpm
2426
- name: Install dependencies
25-
run: npm ci
27+
run: pnpm install --frozen-lockfile
2628
- name: Build
27-
run: npm run build
29+
run: pnpm run build
2830
- name: Lint Code
29-
run: npm run lint
31+
run: pnpm run lint
3032
test:
3133
runs-on: ${{ matrix.os }}
3234
name: "test: node@${{ matrix.node }} (${{ matrix.os }})"
@@ -38,17 +40,19 @@ jobs:
3840
steps:
3941
- name: Checkout code
4042
uses: actions/checkout@v6
43+
- name: Setup pnpm
44+
uses: pnpm/action-setup@v6
4145
- name: Use node@${{ matrix.node }}
4246
uses: actions/setup-node@v6
4347
with:
4448
node-version: ${{ matrix.node }}
45-
cache: npm
49+
cache: pnpm
4650
- name: Install dependencies
47-
run: npm ci
51+
run: pnpm install --frozen-lockfile
4852
- name: Run tests
49-
run: npm run ci:test
53+
run: pnpm run ci:test
5054
- name: Report code coverage
51-
uses: codecov/codecov-action@v5
55+
uses: codecov/codecov-action@v7
5256
with:
5357
token: ${{ secrets.CODECOV_TOKEN }}
5458
release:
@@ -62,19 +66,21 @@ jobs:
6266
steps:
6367
- name: Checkout code
6468
uses: actions/checkout@v6
69+
- name: Setup pnpm
70+
uses: pnpm/action-setup@v6
6571
- name: Setup node
6672
uses: actions/setup-node@v6
6773
with:
6874
node-version: 24
69-
cache: npm
75+
cache: pnpm
7076
- name: Install dependencies
71-
run: npm ci
77+
run: pnpm install --frozen-lockfile
7278
- name: Release
7379
id: changesets
7480
uses: changesets/action@v1
7581
with:
76-
version: npm run version
77-
publish: npm run release
82+
version: pnpm run version
83+
publish: pnpm run release
7884
commit: "[ci] release"
7985
title: "[ci] release"
8086
env:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ dist
1717
# Coverage
1818
coverage
1919
lcov.info
20+
21+
# Other lockfiles
22+
package-lock.json
23+
yarn.lock

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no-install lint-staged
1+
pnpm exec lint-staged

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.vscode
2-
package-lock.json
2+
pnpm-lock.yaml
33
CHANGELOG.md
44
node_modules
55
coverage

0 commit comments

Comments
 (0)