Skip to content

Commit f59c769

Browse files
committed
build: switch to pnpm
1 parent 039f1cd commit f59c769

File tree

6 files changed

+7004
-13923
lines changed

6 files changed

+7004
-13923
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ jobs:
1818
node-version: [20, 22, 24, 25]
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
21+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2222
with:
2323
fetch-depth: 0
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2426
- name: Setup Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
27+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2628
with:
2729
node-version: ${{ matrix.node-version }}
28-
cache: npm
29-
- name: Prepare
30-
run: npm ci
30+
cache: pnpm
31+
- name: Install Dependencies
32+
run: pnpm install --frozen-lockfile
3133
- name: Lint
32-
run: npm run lint
34+
run: pnpm lint
3335
- name: Unit Tests
34-
run: npm run unittest
36+
run: pnpm unittest
3537

3638
compatibility:
3739
name: markdown-it Backwards Compatibility
@@ -46,27 +48,25 @@ jobs:
4648
- 13.0.2
4749
steps:
4850
- name: Checkout
49-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
51+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5052
with:
5153
fetch-depth: 0
54+
- name: Setup pnpm
55+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5256
- name: Setup Node.js
53-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
57+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
5458
with:
5559
node-version-file: .nvmrc
5660
package-manager-cache: false
57-
- name: Cache Node Modules
58-
uses: actions/cache@v4
61+
- name: Apply markdown-it v${{ matrix.mi-version }}
62+
run: pnpm install --lockfile-only markdown-it@${{ matrix.mi-version }}
63+
- name: Cache pnpm Store
64+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
5965
with:
60-
path: node_modules
61-
key: node-markdown-it-compat-cache-${{ runner.os }}-${{ matrix.mi-version }}-${{ hashFiles('package-lock.json') }}
62-
restore-keys: |
63-
node-markdown-it-compat-cache-${{ runner.os }}-${{ matrix.mi-version }}-
64-
node-markdown-it-compat-cache-${{ runner.os }}-
65-
node-markdown-it-compat-cache-
66-
- name: Prepare
67-
run: |
68-
npm ci
69-
npm install --no-save --package-lock=false "markdown-it@${{ matrix.mi-version }}"
66+
node-version-file: .nvmrc
67+
cache: pnpm
68+
- name: Install Dependencies
69+
run: pnpm install --frozen-lockfile
7070
- name: Unit Tests
7171
run: npm run unittest
7272

@@ -84,15 +84,17 @@ jobs:
8484
pull-requests: write # to be able to comment on released pull requests
8585
steps:
8686
- name: Checkout
87-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
87+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
88+
- name: Setup pnpm
89+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
8890
- name: Setup Node.js
89-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
91+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
9092
with:
9193
node-version-file: .nvmrc
92-
cache: npm
93-
- name: Prepare
94-
run: npm ci
94+
cache: pnpm
95+
- name: Install Dependencies
96+
run: pnpm install --frozen-lockfile
9597
- name: Release Check
96-
run: npx semantic-release
98+
run: pnpm release
9799
env:
98100
GITHUB_TOKEN: ${{ github.token }}

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default defineConfig(
1818
ignores: [
1919
'build/**',
2020
'node_modules/**',
21-
'package-lock.json',
21+
'pnpm-lock.yaml',
2222
],
2323
},
2424
{

0 commit comments

Comments
 (0)