Skip to content

Commit 44ed928

Browse files
committed
chore: swtich package manager
1 parent 68c271d commit 44ed928

File tree

9 files changed

+4391
-92
lines changed

9 files changed

+4391
-92
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
33
{
4-
"name": "Debian",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
7-
"features": {
8-
"ghcr.io/devcontainers/features/node:1": {
9-
"nodeGypDependencies": true,
10-
"version": "lts",
11-
"nvmVersion": "latest"
12-
},
13-
"ghcr.io/shyim/devcontainers-features/bun:0": {},
14-
"ghcr.io/devcontainers-community/features/deno:1": {
15-
"version": "latest"
16-
}
17-
}
4+
"name": "Debian",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
7+
"features": {
8+
"ghcr.io/devcontainers/features/node:1": {
9+
"nodeGypDependencies": true,
10+
"version": "lts",
11+
"nvmVersion": "latest"
12+
},
13+
"ghcr.io/shyim/devcontainers-features/bun:0": {},
14+
"ghcr.io/devcontainers-community/features/deno:1": {
15+
"version": "latest"
16+
}
17+
}
18+
// Features to add to the dev container. More info: https://containers.dev/features.
19+
// "features": {},
1820

19-
// Features to add to the dev container. More info: https://containers.dev/features.
20-
// "features": {},
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
2123

22-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23-
// "forwardPorts": [],
24+
// Configure tool-specific properties.
25+
// "customizations": {},
2426

25-
// Configure tool-specific properties.
26-
// "customizations": {},
27-
28-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
29-
// "remoteUser": "root"
27+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
28+
// "remoteUser": "root"
3029
}

.github/reproduire/needs-reproduction.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ Thank you for your feadback! Would you be able to provide a reproduction 🙏
55

66
### Why do I need to provide a reproduction?
77

8-
Reproductions make it possible for us to triage and fix issues quickly with a
9-
relatively small team. It helps us discover the source of the problem, and also
10-
can reveal assumptions you or we might be making.
8+
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team.
9+
It helps us discover the source of the problem, and also can reveal assumptions you or we might be
10+
making.
1111

1212
### What will happen?
1313

14-
If you've provided a reproduction, we'll remove the label and try to reproduce
15-
the issue. If we can, we'll mark it as a bug and prioritise it based on its
16-
severity and how many people we think it might affect.
14+
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can,
15+
we'll mark it as a bug and prioritise it based on its severity and how many people we think it might
16+
affect.
1717

18-
If `status: need more repro codes or info` labeled issues don't receive any
19-
substantial activity (e.g., new comments featuring a reproduction link), we'll
20-
close them. That's not because we don't care! At any point, feel free to comment
21-
with a reproduction and we'll reopen it.
18+
If `status: need more repro codes or info` labeled issues don't receive any substantial activity
19+
(e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't
20+
care! At any point, feel free to comment with a reproduction and we'll reopen it.
2221

2322
### How can I create a reproduction?
2423

.github/workflows/ci.yml

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,25 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17+
node: [20]
1718

1819
runs-on: ${{ matrix.os }}
1920

2021
steps:
2122
- name: Checkout codes
2223
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23-
with:
24-
fetch-depth: 0
2524

26-
- name: Setup deno
27-
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
27+
28+
- name: Setup node
29+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2830
with:
29-
deno-version: v2.5
31+
node-version: ${{ matrix.node }}
32+
cache: pnpm
3033

3134
- name: Lint codes
32-
run: deno lint
35+
run: pnpm lint
3336

3437
build:
3538
name: Build
@@ -44,29 +47,25 @@ jobs:
4447
- name: Checkout codes
4548
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4649

47-
- name: Setup deno
48-
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
49-
with:
50-
deno-version: v2.5
51-
5250
- name: Setup bun
5351
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
5452
with:
5553
bun-version: v1.3
5654

57-
- name: Enable corepack
58-
run: corepack enable
55+
- name: Install pnpm
56+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5957

6058
- name: Setup node
6159
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6260
with:
6361
node-version: ${{ matrix.node }}
62+
cache: pnpm
6463

6564
- name: Install dependencies
66-
run: bun install --frozen-lockfile
65+
run: pnpm install --frozen-lockfile
6766

6867
- name: Build codes
69-
run: npm run build
68+
run: pnpm build
7069

7170
test:
7271
name: Test
@@ -81,29 +80,25 @@ jobs:
8180
- name: Checkout codes
8281
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8382

84-
- name: Setup deno
85-
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
86-
with:
87-
deno-version: v2.5
88-
8983
- name: Setup bun
9084
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
9185
with:
9286
bun-version: v1.3
9387

88+
- name: Install pnpm
89+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
90+
9491
- name: Setup node
9592
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
9693
with:
9794
node-version: ${{ matrix.node }}
98-
99-
- name: Enable corepack
100-
run: corepack enable
95+
cache: pnpm
10196

10297
- name: Install dependencies
103-
run: bun install --frozen-lockfile
98+
run: pnpm install --frozen-lockfile
10499

105100
- name: Test
106-
run: npm run test
101+
run: pnpm test
107102

108103
edge-release:
109104
name: Edge Release
@@ -120,26 +115,22 @@ jobs:
120115
- name: Checkout codes
121116
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
122117

123-
- name: Setup deno
124-
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
125-
with:
126-
deno-version: v2.5
127-
128118
- name: Setup bun
129119
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
130120
with:
131121
bun-version: v1.3
132122

123+
- name: Install pnpm
124+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
125+
133126
- name: Setup node
134127
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
135128
with:
136129
node-version: ${{ matrix.node }}
137-
138-
- name: Enable corepack
139-
run: corepack enable
130+
cache: pnpm
140131

141132
- name: Install dependencies
142-
run: bun install --frozen-lockfile
133+
run: pnpm install --frozen-lockfile
143134

144135
- name: Release Edge
145136
if: |

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@ jobs:
1717
with:
1818
ref: ${{ github.head_ref }}
1919

20-
- name: Setup deno
21-
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
22-
with:
23-
deno-version: v2.5
24-
2520
- name: Setup bun
2621
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
2722
with:
2823
bun-version: v1.3
2924

30-
- name: Setup Node
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
27+
28+
- name: Setup node.js
3129
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3230
with:
3331
node-version: 20
32+
cache: pnpm
3433

35-
- name: Enable corepack
36-
run: corepack enable
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
3736

3837
- name: Extract version tag
3938
if: startsWith( github.ref, 'refs/tags/v' )
@@ -51,9 +50,8 @@ jobs:
5150
- name: Generate changelog
5251
run: |
5352
git restore --source=HEAD --staged --worktree -- package.json bun.lockb
54-
bun install --frozen-lockfile
55-
npm run build
56-
npm run changelog -- --tag=${{ steps.split.outputs._2 }}
53+
pnpm run build
54+
pnpm run changelog -- --tag=${{ steps.split.outputs._2 }}
5755
env:
5856
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5957

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ You will need to install the below JavaScript runtime:
7070

7171
After cloning the repo, run:
7272

73-
```bash
74-
$ bun install # install the dependencies of the project
73+
```sh
74+
$ pnpm install # install the dependencies of the project
7575
```
7676

7777
A high level overview of tools used:
@@ -81,14 +81,16 @@ A high level overview of tools used:
8181

8282
### Commonly used NPM scripts
8383

84-
# lint source codes
85-
$ npm run lint
84+
```sh
85+
# lint source codes
86+
pnpm lint
8687

87-
# format source codes
88-
$ npm run format
88+
# format source codes
89+
pnpm format
8990

90-
# run the full test suite
91-
$ npm run test
91+
# run the full test suite
92+
pnpm test
93+
```
9294

9395
There are some other scripts available in the `scripts` section of the
9496
`package.json` file.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
"lint": "deno lint",
5555
"format": "deno fmt",
5656
"build": "unbuild",
57-
"play:basic": "bun run ./playground/basic/index.ts",
58-
"test": "npm run test:type && npm run test:unit",
57+
"play:basic": "pnpx tsx ./playground/basic/index.ts",
58+
"test": "pnpm run test:type && pnpm run test:unit",
5959
"test:type": "vitest run --typecheck",
6060
"test:unit": "vitest run",
61-
"test:coverage": "npm test -- --reporter verbose --coverage"
61+
"test:coverage": "pnpm test --reporter verbose --coverage"
6262
},
6363
"lint-staged": {
6464
"*.{js,ts,jsx,tsx,json,jsonc}": [
@@ -79,11 +79,12 @@
7979
"supertest": "^7.0.0",
8080
"typescript": "^5.3.0",
8181
"unbuild": "^3.0.0",
82+
"deno": "^2.5.4",
8283
"vitest": "^3.0.0"
8384
},
8485
"dependencies": {
8586
"@intlify/core": "^11.0.0",
8687
"@intlify/utils": "^0.13.0"
8788
},
88-
"packageManager": "[email protected]"
89+
"packageManager": "[email protected]"
8990
}

0 commit comments

Comments
 (0)