Skip to content

Commit f0002de

Browse files
authored
build: swap package manager for pnpm (#235)
1 parent 0b36106 commit f0002de

File tree

9 files changed

+4269
-10980
lines changed

9 files changed

+4269
-10980
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@ jobs:
3333
- name: Checkout source
3434
uses: actions/checkout@v5
3535

36+
- name: Install pnpm
37+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
38+
3639
- name: Install Node.js ${{ matrix.node-version }}
3740
uses: actions/setup-node@v5
3841
with:
3942
node-version: ${{ matrix.node-version }}
40-
cache: npm
43+
cache: pnpm
4144

4245
- name: Install dependencies
43-
run: npm ci
46+
run: pnpm install
4447

4548
- name: Run tests
46-
run: npm run coverage
49+
run: pnpm coverage
4750

4851
- name: Send code coverage results to Coveralls
49-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
52+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
5053
with:
5154
parallel: true
5255
flag-name: Node.js ${{ matrix.node-version }} / ${{ matrix.os }}
@@ -58,7 +61,7 @@ jobs:
5861
needs: test
5962
steps:
6063
- name: Let Coveralls know that all tests have finished
61-
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
64+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
6265
with:
6366
parallel-finished: true
6467

@@ -71,25 +74,28 @@ jobs:
7174
- name: Checkout source
7275
uses: actions/checkout@v5
7376

77+
- name: Install pnpm
78+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
79+
7480
- name: Install Node.js
7581
uses: actions/setup-node@v5
7682
with:
7783
node-version: "24"
78-
cache: npm
84+
cache: pnpm
7985

8086
- name: Install development dependencies
81-
run: npm ci
87+
run: pnpm install
8288

8389
- name: Build
84-
run: npm run build
90+
run: pnpm build
8591

8692
- name: Verify no un-staged changes
8793
run: |
8894
git status --porcelain
8995
git diff-files --quiet
9096
9197
- name: Run lints
92-
run: npm run lint
98+
run: pnpm lint
9399

94100
- name: Upload publish artifact
95101
uses: actions/upload-artifact@v4
@@ -121,13 +127,17 @@ jobs:
121127
- name: Checkout source
122128
uses: actions/checkout@v5
123129

124-
- name: Install Node.js ${{ matrix.node-version }}
130+
- name: Install pnpm
131+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
132+
133+
- name: Install Node.js
125134
uses: actions/setup-node@v5
126135
with:
127-
node-version: ${{ matrix.node-version }}
136+
node-version: "24"
137+
cache: pnpm
128138

129139
- name: Install production dependencies
130-
run: npm install --production
140+
run: pnpm install --production
131141

132142
- name: Download publish artifact
133143
uses: actions/download-artifact@v5

.prettierignore

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

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ You should be using Node.js v24 or later to build this project locally
1010
# Clone this repository
1111
git clone https://github.com/JS-DevTools/npm-publish.git
1212

13-
# Install dependencies*
14-
npm install
13+
# Install dependencies
14+
pnpm install
1515

1616
# Run all checks, builds, and unit tests
17-
npm run all
17+
pnpm all
1818
```
1919

2020
There are also various code quality checks and tests you can run:
2121

2222
```shell
2323
# Run builds and typechecking
24-
npm run build
24+
pnpm build
2525

2626
# Run the unit tests in watch mode
27-
npm run test
27+
pnpm test
2828

2929
# Autoformat the code
30-
npm run format
30+
pnpm format
3131

3232
# Lint the code
33-
npm run lint
33+
pnpm lint
3434
```

0 commit comments

Comments
 (0)