Skip to content

Commit 7ecafb4

Browse files
committed
chore(3.0): replace yarn by pnpm
1 parent 434899d commit 7ecafb4

File tree

10 files changed

+2559
-4273
lines changed

10 files changed

+2559
-4273
lines changed

.githooks/pre-commit

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/usr/bin/env sh
2-
yarn check
2+
pnpm run check
3+

.github/workflows/ci.yml

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Continuous integration
1+
name: CI
22

33
on: [push, pull_request]
44

55
jobs:
66
tests:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88

99
strategy:
1010
matrix:
@@ -14,28 +14,35 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
1616

17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
version: 10
21+
run_install: false
22+
1723
- name: Set up Node.js ${{ matrix.node-version }}
1824
uses: actions/setup-node@v4
1925
with:
2026
node-version: ${{ matrix.node-version }}
21-
cache: 'yarn'
27+
cache: 'pnpm'
2228

2329
- name: Install dependencies
24-
run: yarn install --immutable
30+
run: pnpm install --frozen-lockfile
2531

2632
- name: Check linter
27-
run: yarn check
33+
run: pnpm run check
2834

2935
- name: Check typing
30-
run: yarn tsc -p tsconfig.lib.json --noEmit
36+
run: pnpm tsc -p tsconfig.lib.json --noEmit
3137

3238
- name: Run tests with coverage
33-
run: yarn coverage
39+
run: pnpm coverage
3440
env:
3541
CI: true
3642

3743
- name: Upload coverage to Coveralls
3844
uses: coverallsapp/github-action@v2
3945
with:
4046
github-token: ${{ secrets.GITHUB_TOKEN }}
41-
flag-name: node-${{ matrix.node-version }}
47+
flag-name: node-${{ matrix.node-version }}
48+

.github/workflows/release.yml

+15-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on:
44
workflow_dispatch:
55
inputs:
66
strategy:
7-
description: "Valid semver (x.x.x) or strategy (patch, minor, major)"
8-
default: "patch"
7+
description: 'Valid semver (x.x.x) or strategy (patch, minor, major)'
8+
default: 'patch'
99
required: false
1010

1111
permissions:
1212
contents: write
1313

1414
jobs:
1515
release:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
if: ${{ github.actor == 'pebie' || github.actor == 'leguellec' }}
1818

1919
steps:
@@ -22,23 +22,29 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25+
- uses: pnpm/action-setup@v4
26+
name: Install pnpm
27+
with:
28+
version: 10
29+
run_install: false
30+
2531
- name: Setup Node.js 22.x
2632
uses: actions/setup-node@v4
2733
with:
2834
node-version: '22.x'
29-
cache: 'yarn'
35+
cache: 'pnpm'
3036
registry-url: 'https://registry.npmjs.org'
3137

3238
- name: Install dependencies
33-
run: yarn install --immutable
39+
run: pnpm install --frozen-lockfile
3440

3541
- name: Build the project
36-
run: yarn build
42+
run: pnpm run build
3743

3844
- name: Bump version
3945
id: versioning
4046
run: |
41-
yarn version ${{ github.event.inputs.strategy }}
47+
pnpm version ${{ github.event.inputs.strategy }}
4248
VERSION=$(node -p "require('./package.json').version")
4349
echo "current-version=$VERSION" >> $GITHUB_OUTPUT
4450
@@ -83,4 +89,5 @@ jobs:
8389
- name: Publish to NPM
8490
run: npm publish --access public
8591
env:
86-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
93+

.yarn/releases/yarn-4.5.1.cjs

-934
This file was deleted.

.yarnrc.yml

-4
This file was deleted.

biome.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"lib",
5353
"node_modules",
5454
"out",
55-
"package.json"
55+
"package.json",
56+
"pnpm-store"
5657
]
5758
}
5859
}

package.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
"exports": {
3030
".": {
3131
"import": {
32-
"default": "./lib/esm/index.js",
33-
"types": "./lib/esm/index.d.ts"
32+
"types": "./lib/esm/index.d.ts",
33+
"default": "./lib/esm/index.js"
3434
},
3535
"require": {
36-
"default": "./lib/cjs/index.js",
37-
"types": "./lib/cjs/index.d.ts"
36+
"types": "./lib/cjs/index.d.ts",
37+
"default": "./lib/cjs/index.js"
3838
}
3939
}
4040
},
@@ -64,15 +64,14 @@
6464
"lint": "biome check --write",
6565
"check": "biome check",
6666
"build": "node scripts/build.js",
67-
"prepublishOnly": "yarn build",
68-
"test": "vitest --run test/**/*.ts",
67+
"prepublishOnly": "pnpm run build",
68+
"test": "vitest --run test/*.test.ts",
6969
"coverage": "vitest run --coverage",
7070
"version": "echo ${npm_package_version}",
7171
"examples": "./examples/exec.sh",
7272
"examples-esm": "./examples/esm/exec.sh",
7373
"examples-cjs": "./examples/cjs/exec.sh",
7474
"benchmark": "node ./benchmarks/basic.js",
7575
"postinstall": "git config core.hooksPath ./.githooks || true"
76-
},
77-
"packageManager": "yarn@4.5.1"
76+
}
7877
}

0 commit comments

Comments
 (0)