Skip to content

Commit ce33921

Browse files
committed
build: convert repo from npm to pnpm
- replace package-lock.json with pnpm-lock.yaml (via pnpm import) - add packageManager field (pnpm@11.15.1) - convert npm-isms in package.json scripts and husky pre-commit hook - CI: add pnpm/action-setup@v6, cache pnpm, pnpm install --frozen-lockfile, bump codecov-action to v7 - ignore yarn.lock; skip formatting pnpm-lock.yaml
1 parent 8c13deb commit ce33921

7 files changed

Lines changed: 4276 additions & 6892 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v6
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v6
21+
with:
22+
standalone: true
1923
- name: Install node
2024
id: node
2125
uses: actions/setup-node@v6
2226
with:
2327
node-version: lts/*
24-
cache: npm
28+
cache: pnpm
2529
- name: Install packages (node@${{ steps.node.outputs.node-version }})
26-
run: npm ci
30+
run: pnpm install --frozen-lockfile
2731
- name: Run build
28-
run: npm run @ci:build
32+
run: pnpm run @ci:build
2933
- name: Run lint
30-
run: npm run @ci:lint
34+
run: pnpm run @ci:lint
3135
test:
3236
runs-on: ${{ matrix.os }}
3337
name: "test: node ${{ matrix.node }} on ${{ matrix.os }}"
@@ -39,18 +43,22 @@ jobs:
3943
steps:
4044
- name: Checkout code
4145
uses: actions/checkout@v6
46+
- name: Install pnpm
47+
uses: pnpm/action-setup@v6
48+
with:
49+
standalone: true
4250
- name: Install node
4351
id: node
4452
uses: actions/setup-node@v6
4553
with:
4654
node-version: ${{ matrix.node }}
47-
cache: npm
55+
cache: pnpm
4856
- name: Install packages (node@${{ steps.node.outputs.node-version }})
49-
run: npm ci
57+
run: pnpm install --frozen-lockfile
5058
- name: Run tests
51-
run: npm run @ci:test
59+
run: pnpm run @ci:test
5260
- name: Report coverage
53-
uses: codecov/codecov-action@v6
61+
uses: codecov/codecov-action@v7
5462
with:
5563
token: ${{ secrets.CODECOV_TOKEN }}
5664
slug: marko-js/testing-library
@@ -65,19 +73,23 @@ jobs:
6573
steps:
6674
- name: Checkout code
6775
uses: actions/checkout@v6
76+
- name: Install pnpm
77+
uses: pnpm/action-setup@v6
78+
with:
79+
standalone: true
6880
- name: Install node
6981
id: node
7082
uses: actions/setup-node@v6
7183
with:
7284
node-version: lts/*
73-
cache: npm
85+
cache: pnpm
7486
- name: Install packages (node@${{ steps.node.outputs.node-version }})
75-
run: npm ci
87+
run: pnpm install --frozen-lockfile
7688
- name: Run release
7789
uses: changesets/action@v1
7890
with:
79-
version: npm run @ci:version
80-
publish: npm run @ci:release
91+
version: pnpm run @ci:version
92+
publish: pnpm run @ci:release
8193
commit: "[ci] release"
8294
title: "[ci] release"
8395
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ coverage
66
dist
77
node_modules
88
npm-debug.log
9+
yarn.lock

.husky/pre-commit

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

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ package-lock.json
22
coverage
33
dist
44
__snapshots__
5+
pnpm-lock.yaml

0 commit comments

Comments
 (0)