Skip to content

Commit 7c2e87c

Browse files
authored
chore: bump Rslib and enable tsgo in local (#1210)
1 parent 5e30ec2 commit 7c2e87c

File tree

11 files changed

+62
-20
lines changed

11 files changed

+62
-20
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,26 @@ jobs:
5959
node-version: ${{ matrix.node-version }}
6060
cache: 'pnpm'
6161

62+
# Special handling for Node.js 18: use Node.js 20 for tsgo dependency installation
63+
- name: Setup Node.js 20 for dependency installation (Node 18 only)
64+
if: steps.changes.outputs.changed == 'true' && matrix.node-version == 18
65+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
66+
with:
67+
node-version: 20
68+
cache: 'pnpm'
69+
6270
- name: Install Dependencies
6371
if: steps.changes.outputs.changed == 'true'
6472
run: pnpm install
6573

74+
# Switch back to Node.js 18 after dependency installation
75+
- name: Switch back to Node.js ${{ matrix.node-version }} (Node 18 only)
76+
if: steps.changes.outputs.changed == 'true' && matrix.node-version == 18
77+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
78+
with:
79+
node-version: ${{ matrix.node-version }}
80+
cache: 'pnpm'
81+
6682
- name: Type Check
6783
if: steps.changes.outputs.changed == 'true'
6884
run: pnpm run type-check
@@ -117,10 +133,26 @@ jobs:
117133
node-version: ${{ matrix.node-version }}
118134
cache: 'pnpm'
119135

136+
# Special handling for Node.js 18: use Node.js 20 for tsgo dependency installation
137+
- name: Setup Node.js 20 for dependency installation (Node 18 only)
138+
if: steps.changes.outputs.changed == 'true' && matrix.node-version == 18
139+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
140+
with:
141+
node-version: 20
142+
cache: 'pnpm'
143+
120144
- name: Install Dependencies
121145
if: steps.changes.outputs.changed == 'true'
122146
run: pnpm install && cd ./tests && pnpm playwright install chromium
123147

148+
# Switch back to Node.js 18 after dependency installation
149+
- name: Switch back to Node.js ${{ matrix.node-version }} (Node 18 only)
150+
if: steps.changes.outputs.changed == 'true' && matrix.node-version == 18
151+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
152+
with:
153+
node-version: ${{ matrix.node-version }}
154+
cache: 'pnpm'
155+
124156
- name: Integration Test (Rstest)
125157
if: steps.changes.outputs.changed == 'true'
126158
run: pnpm run test:integration

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"biomejs.biome",
44
"esbenp.prettier-vscode",
55
"streetsidesoftware.code-spell-checker",
6-
"unifiedjs.vscode-mdx"
6+
"unifiedjs.vscode-mdx",
7+
"TypeScriptTeam.native-preview"
78
]
89
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@
6363
"fileMatch": ["**/_nav.json"],
6464
"url": "./website/node_modules/rspress/nav-json-schema.json"
6565
}
66-
]
66+
],
67+
"typescript.experimental.useTsgo": true
6768
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"picocolors": "1.1.1",
6060
"prebundle": "1.4.2",
6161
"rsbuild-plugin-publint": "^0.3.3",
62-
"rslib": "npm:@rslib/core@0.12.4",
62+
"rslib": "npm:@rslib/core@0.13.0",
6363
"rslog": "^1.2.11",
6464
"tsconfck": "3.1.6",
6565
"typescript": "^5.9.2"

packages/core/rslib.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default defineConfig({
3131
syntax: ['node 18.12.0'],
3232
dts: {
3333
bundle: false,
34+
// Only use tsgo in local dev for faster build, disable it in CI until it's more stable
35+
tsgo: !process.env.CI,
3436
distPath: './dist-types',
3537
},
3638
},

packages/core/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "@rslib/tsconfig/base",
33
"compilerOptions": {
44
"outDir": "./dist",
5-
"baseUrl": "./",
65
"rootDir": "src",
76
"declaration": true,
87
"declarationDir": "./dist-types",

packages/create-rslib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@types/node": "^22.18.1",
3838
"fs-extra": "^11.3.1",
3939
"rsbuild-plugin-publint": "^0.3.3",
40-
"rslib": "npm:@rslib/core@0.12.4",
40+
"rslib": "npm:@rslib/core@0.13.0",
4141
"tsx": "^4.20.5",
4242
"typescript": "^5.9.2"
4343
},

packages/plugin-dts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@rslib/tsconfig": "workspace:*",
4343
"@typescript/native-preview": "7.0.0-dev.20250907.1",
4444
"rsbuild-plugin-publint": "^0.3.3",
45-
"rslib": "npm:@rslib/core@0.12.4",
45+
"rslib": "npm:@rslib/core@0.13.0",
4646
"typescript": "^5.9.2"
4747
},
4848
"peerDependencies": {

packages/plugin-dts/rslib.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export default defineConfig({
99
syntax: ['node 18.12.0'],
1010
dts: {
1111
bundle: false,
12+
// Only use tsgo in local dev for faster build, disable it in CI until it's more stable
13+
tsgo: !process.env.CI,
1214
},
1315
},
1416
],

packages/plugin-dts/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "@rslib/tsconfig/base",
33
"compilerOptions": {
44
"outDir": "./dist",
5-
"baseUrl": "./",
65
"rootDir": "src",
76
"declaration": true,
87
"isolatedDeclarations": true,

0 commit comments

Comments
 (0)