Skip to content

Commit 7724ae2

Browse files
committed
build(package-manager): migrate from yarn 1.22.22 to pnpm 10.11.0
1 parent d09886d commit 7724ae2

File tree

8 files changed

+5417
-4202
lines changed

8 files changed

+5417
-4202
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,30 @@ jobs:
88
ci:
99
name: Continuous integration
1010
runs-on: ubuntu-latest
11+
1112
steps:
1213
- name: Checkout
1314
uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
1421
- name: Setup Node
1522
uses: actions/setup-node@v4
1623
with:
17-
node-version: 'current'
24+
node-version: 22
25+
cache: "pnpm"
26+
1827
- name: Install dependencies
19-
run: yarn install
20-
- name: Check build
21-
run: yarn build
22-
- name: Check coding standards
23-
run: yarn lint
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Build
31+
run: pnpm build
32+
33+
- name: Lint
34+
run: pnpm lint
35+
2436
- name: Run tests
25-
run: yarn test
37+
run: pnpm test

.github/workflows/release.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch: ~
55
push:
66
tags:
7-
- 'v*'
7+
- "v*"
88

99
jobs:
1010
release:
@@ -13,20 +13,31 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
with:
20+
run_install: false
21+
1622
- name: Setup Node
1723
uses: actions/setup-node@v4
1824
with:
19-
node-version: 'current'
20-
registry-url: https://registry.npmjs.org
25+
node-version: 22
26+
cache: "pnpm"
27+
2128
- name: Install dependencies
22-
run: yarn install
23-
- name: Check build
24-
run: yarn build
25-
- name: Check coding standards
26-
run: yarn lint
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build
32+
run: pnpm build
33+
34+
- name: Lint
35+
run: pnpm lint
36+
2737
- name: Run tests
28-
run: yarn test
38+
run: pnpm test
39+
2940
- name: Publish to npm
30-
run: npm publish
41+
run: pnpm publish
3142
env:
3243
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/lib/
22
/node_modules/
3-
/yarn-error.log

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Using [NPM](https://www.npmjs.com/):
2020

2121
npm install @api-platform/api-doc-parser
2222

23+
Using [Pnpm](https://pnpm.js.org/):
24+
25+
pnpm add @api-platform/api-doc-parser
26+
2327
If you plan to use the library with Node, you also need a polyfill for the `fetch` function:
2428

2529
yarn add isomorphic-fetch
@@ -81,8 +85,8 @@ to include it in the library.
8185

8286
## Run tests
8387

84-
yarn test
85-
yarn lint
88+
pnpm test
89+
pnpm lint
8690

8791
## Credits
8892

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"scripts": {
5252
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
5353
"lint": "eslint src",
54-
"fix": "yarn lint --fix",
54+
"fix": "pnpm lint --fix",
5555
"eslint-check": "eslint-config-prettier src/index.ts",
5656
"build": "rm -rf lib/* && tsc",
5757
"watch": "tsc --watch"
@@ -60,5 +60,5 @@
6060
"publishConfig": {
6161
"access": "public"
6262
},
63-
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
63+
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
6464
}

0 commit comments

Comments
 (0)