Skip to content

Commit 3f28efc

Browse files
committed
test
1 parent f19461b commit 3f28efc

27 files changed

Lines changed: 228 additions & 184 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Format Benchmark
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
benchmark:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Install Pnpm
20+
run: |
21+
npm install -g corepack@latest --force
22+
corepack enable
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
26+
with:
27+
node-version: 24
28+
package-manager-cache: false
29+
30+
- name: Install Dependencies
31+
run: pnpm install
32+
33+
- name: Install hyperfine
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y hyperfine
37+
38+
- name: Run benchmark
39+
run: hyperfine --warmup 2 --runs 5 'node --run prettier' 'node --run oxfmt'

.oxfmtrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"singleQuote": true,
5+
"ignorePatterns": []
6+
}

e2e/cases/browserslist/extends-browserslist/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "1.0.0",
44
"private": true,
55
"type": "module",
6-
"browserslist": [
7-
"extends @e2e/browserslist-config-mock"
8-
],
96
"dependencies": {
107
"@e2e/browserslist-config-mock": "workspace:*"
11-
}
8+
},
9+
"browserslist": [
10+
"extends @e2e/browserslist-config-mock"
11+
]
1212
}

e2e/cases/output/charset/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const expectedObject = {
1010
ð: 'd',
1111
þ: 'o',
1212
Д: 'A',
13-
'𝒩': 'a',
13+
𝒩: 'a',
1414
};
1515

1616
test('should set output.charset to ascii', async ({ page, runBothServe }) => {

e2e/cases/syntax-es/using-declaration/src/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,3 @@ const getResource = () => {
3030
for (await using x of [getResource()]) {
3131
x.test();
3232
}
33-
34-
for await (await using x of [getResource()]) {
35-
x.test();
36-
}

e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"private": true,
32
"name": "@rsbuild/e2e",
4-
"type": "module",
53
"version": "1.0.0",
4+
"private": true,
5+
"type": "module",
66
"scripts": {
77
"setup": "pnpm exec playwright install chromium --with-deps",
88
"e2e": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --no-warnings\" playwright test",

package.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"name": "rsbuild-monorepo",
33
"private": true,
4-
"type": "module",
54
"workspaces": [
65
"packages/*",
76
"scripts/*"
87
],
8+
"type": "module",
99
"scripts": {
1010
"build": "pnpm --workspace-concurrency=10 --filter \"./packages/*\" --filter \"./scripts/*\" run build",
1111
"check-dependency-version": "pnpx check-dependency-version-consistency . --ignore-dep loader-utils",
1212
"check-spell": "pnpx cspell && heading-case",
1313
"doc": "cd website && node --run dev",
1414
"e2e": "cd ./e2e && pnpm e2e",
15+
"prettier": "prettier --experimental-cli --write .",
16+
"oxfmt": "oxfmt",
1517
"format": "prettier --experimental-cli --write . && heading-case --write",
1618
"lint": "biome check && node --run lint:type",
1719
"lint:type": "rslint",
@@ -21,16 +23,6 @@
2123
"test": "rstest",
2224
"test:watch": "rstest watch"
2325
},
24-
"simple-git-hooks": {
25-
"pre-commit": "pnpm exec nano-staged"
26-
},
27-
"nano-staged": {
28-
"*.{md,mdx,json,css,less,scss}": "prettier --experimental-cli --write",
29-
"*.{js,jsx,ts,tsx,mjs,cjs}": [
30-
"biome check --write --no-errors-on-unmatched",
31-
"prettier --experimental-cli --write"
32-
]
33-
},
3426
"devDependencies": {
3527
"@biomejs/biome": "^2.4.4",
3628
"@rsbuild/config": "workspace:*",
@@ -43,13 +35,24 @@
4335
"cspell-ban-words": "^0.0.4",
4436
"heading-case": "^1.0.7",
4537
"nano-staged": "^0.9.0",
38+
"oxfmt": "^0.35.0",
4639
"prettier": "^3.8.1",
4740
"simple-git-hooks": "^2.13.1",
4841
"typescript": "^5.9.3"
4942
},
50-
"packageManager": "pnpm@10.30.0",
43+
"simple-git-hooks": {
44+
"pre-commit": "pnpm exec nano-staged"
45+
},
46+
"nano-staged": {
47+
"*.{md,mdx,json,css,less,scss}": "prettier --experimental-cli --write",
48+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
49+
"biome check --write --no-errors-on-unmatched",
50+
"prettier --experimental-cli --write"
51+
]
52+
},
5153
"engines": {
5254
"node": ">=22.18.0",
5355
"pnpm": ">=10.30.0"
54-
}
56+
},
57+
"packageManager": "pnpm@10.30.0"
5558
}

packages/core/package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,25 @@
66
"bugs": {
77
"url": "https://github.com/web-infra-dev/rsbuild/issues"
88
},
9+
"license": "MIT",
910
"repository": {
1011
"type": "git",
1112
"url": "https://github.com/web-infra-dev/rsbuild",
1213
"directory": "packages/core"
1314
},
14-
"license": "MIT",
15+
"bin": {
16+
"rsbuild": "./bin/rsbuild.js"
17+
},
18+
"files": [
19+
"bin",
20+
"dist",
21+
"dist-types",
22+
"static",
23+
"compiled",
24+
"types.d.ts"
25+
],
1526
"type": "module",
27+
"types": "./dist-types/index.d.ts",
1628
"exports": {
1729
".": {
1830
"types": "./dist-types/index.d.ts",
@@ -23,18 +35,10 @@
2335
},
2436
"./package.json": "./package.json"
2537
},
26-
"types": "./dist-types/index.d.ts",
27-
"bin": {
28-
"rsbuild": "./bin/rsbuild.js"
38+
"publishConfig": {
39+
"access": "public",
40+
"registry": "https://registry.npmjs.org/"
2941
},
30-
"files": [
31-
"bin",
32-
"dist",
33-
"dist-types",
34-
"static",
35-
"compiled",
36-
"types.d.ts"
37-
],
3842
"scripts": {
3943
"build": "rslib build",
4044
"dev": "rslib build -w",
@@ -45,14 +49,6 @@
4549
"@rspack/core": "2.0.0-beta.4",
4650
"@swc/helpers": "^0.5.19"
4751
},
48-
"peerDependencies": {
49-
"core-js": ">= 3.0.0"
50-
},
51-
"peerDependenciesMeta": {
52-
"core-js": {
53-
"optional": true
54-
}
55-
},
5652
"devDependencies": {
5753
"@jridgewell/remapping": "^2.3.5",
5854
"@jridgewell/trace-mapping": "^0.3.31",
@@ -97,11 +93,15 @@
9793
"webpack-merge": "6.0.1",
9894
"ws": "^8.19.0"
9995
},
96+
"peerDependencies": {
97+
"core-js": ">= 3.0.0"
98+
},
99+
"peerDependenciesMeta": {
100+
"core-js": {
101+
"optional": true
102+
}
103+
},
100104
"engines": {
101105
"node": "^20.19.0 || >=22.12.0"
102-
},
103-
"publishConfig": {
104-
"access": "public",
105-
"registry": "https://registry.npmjs.org/"
106106
}
107107
}

packages/create-rsbuild/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
"version": "2.0.0-beta.6",
44
"description": "Create a new Rsbuild project",
55
"homepage": "https://rsbuild.rs",
6+
"license": "MIT",
67
"repository": {
78
"type": "git",
89
"url": "https://github.com/web-infra-dev/rsbuild",
910
"directory": "packages/create-rsbuild"
1011
},
11-
"license": "MIT",
12-
"type": "module",
13-
"exports": {
14-
".": "./dist/index.js"
15-
},
16-
"main": "./dist/index.js",
1712
"bin": {
1813
"create-rsbuild": "./bin.js"
1914
},
@@ -22,6 +17,15 @@
2217
"dist",
2318
"bin.js"
2419
],
20+
"type": "module",
21+
"main": "./dist/index.js",
22+
"exports": {
23+
".": "./dist/index.js"
24+
},
25+
"publishConfig": {
26+
"access": "public",
27+
"registry": "https://registry.npmjs.org/"
28+
},
2529
"scripts": {
2630
"build": "rslib build",
2731
"dev": "rslib build -w",
@@ -45,9 +49,5 @@
4549
},
4650
"engines": {
4751
"node": "^20.19.0 || >=22.12.0"
48-
},
49-
"publishConfig": {
50-
"access": "public",
51-
"registry": "https://registry.npmjs.org/"
5252
}
5353
}

packages/create-rsbuild/template-rstest/react-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"test:watch": "rstest --watch"
55
},
66
"devDependencies": {
7+
"@rstest/adapter-rsbuild": "^0.2.1",
8+
"@rstest/core": "^0.8.5",
79
"@testing-library/dom": "^10.4.1",
810
"@testing-library/jest-dom": "^6.9.1",
911
"@testing-library/react": "^16.3.2",
10-
"@rstest/core": "^0.8.5",
11-
"@rstest/adapter-rsbuild": "^0.2.1",
1212
"happy-dom": "^20.7.0"
1313
}
1414
}

0 commit comments

Comments
 (0)