Skip to content

Commit e3e5cb0

Browse files
authored
chore: upgrade TypeScript to ^6.0.2 (#59)
* fix: avoid test port collisions * chore: format config files
1 parent d42037a commit e3e5cb0

File tree

5 files changed

+31
-21
lines changed

5 files changed

+31
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"react-dom": "^19.2.4",
4646
"serialize-javascript": "^6.0.2",
4747
"simple-git-hooks": "^2.13.1",
48-
"typescript": "^5.9.3"
48+
"typescript": "6.0.2"
4949
},
5050
"peerDependencies": {
5151
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/basic/dataAttribute.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { createRsbuild } from '@rsbuild/core';
33
import { ASSETS_RETRY_DATA_ATTRIBUTE, pluginAssetsRetry } from '../../dist';
4+
import { getRandomPort } from './helper';
45

56
test('should add data attribute to inline retry script', async ({ page }) => {
67
const rsbuild = await createRsbuild({
@@ -11,6 +12,9 @@ test('should add data attribute to inline retry script', async ({ page }) => {
1112
inlineScript: true,
1213
}),
1314
],
15+
server: {
16+
port: getRandomPort(),
17+
},
1418
},
1519
});
1620

@@ -40,6 +44,9 @@ test('should add data attribute to external retry script', async ({ page }) => {
4044
inlineScript: false,
4145
}),
4246
],
47+
server: {
48+
port: getRandomPort(),
49+
},
4350
},
4451
});
4552

@@ -71,6 +78,9 @@ test('should be able to filter retry script in HTML template', async ({
7178
inlineScript: true,
7279
}),
7380
],
81+
server: {
82+
port: getRandomPort(),
83+
},
7484
},
7585
});
7686

test/empty-src/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, test } from '@playwright/test';
22
import { createRsbuild } from '@rsbuild/core';
33
import { pluginAssetsRetry } from '../../dist';
4+
import { getRandomPort } from '../basic/helper';
45

56
const createDevServer = async () => {
67
const rsbuild = await createRsbuild({
@@ -10,6 +11,9 @@ const createDevServer = async () => {
1011
html: {
1112
template: './index.html',
1213
},
14+
server: {
15+
port: getRandomPort(),
16+
},
1317
},
1418
});
1519
return rsbuild.startDevServer();

tsconfig.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
22
"compilerOptions": {
3+
"rootDir": "./src",
34
"outDir": "./dist",
4-
"baseUrl": "./",
5-
"target": "ES2020",
5+
"target": "ES2023",
6+
"types": ["node"],
67
"lib": ["DOM", "ESNext"],
7-
"module": "Node16",
8-
"strict": true,
9-
"noUnusedLocals": true,
10-
"noUnusedParameters": true,
118
"declaration": true,
129
"isolatedModules": true,
13-
"esModuleInterop": true,
1410
"skipLibCheck": true,
15-
"resolveJsonModule": true,
16-
"moduleResolution": "Node16"
11+
"module": "nodenext",
12+
"moduleResolution": "nodenext"
1713
},
1814
"include": ["src"]
1915
}

0 commit comments

Comments
 (0)