Skip to content

Commit 84d7268

Browse files
committed
test: ensure we set the bundler type for ts 3.8
1 parent 4267742 commit 84d7268

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

dev-packages/node-core-integration-tests/scripts/use-ts-3_8.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ const tsConfig = require(baseTscConfigPath);
3636
// TS 3.8 fails build when it encounters a config option it does not understand, so we remove it :(
3737
delete tsConfig.compilerOptions.noUncheckedIndexedAccess;
3838

39+
// TS 3.8 doesn't support "bundler" moduleResolution (introduced in TS 5.0)
40+
if (tsConfig.compilerOptions.moduleResolution === 'bundler') {
41+
tsConfig.compilerOptions.moduleResolution = 'node';
42+
}
43+
3944
writeFileSync(baseTscConfigPath, JSON.stringify(tsConfig, null, 2));

dev-packages/node-integration-tests/scripts/use-ts-3_8.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ const tsConfig = require(baseTscConfigPath);
3636
// TS 3.8 fails build when it encounters a config option it does not understand, so we remove it :(
3737
delete tsConfig.compilerOptions.noUncheckedIndexedAccess;
3838

39+
// TS 3.8 doesn't support "bundler" moduleResolution (introduced in TS 5.0)
40+
if (tsConfig.compilerOptions.moduleResolution === 'bundler') {
41+
tsConfig.compilerOptions.moduleResolution = 'node';
42+
}
43+
3944
writeFileSync(baseTscConfigPath, JSON.stringify(tsConfig, null, 2));

0 commit comments

Comments
 (0)