Skip to content

Commit 06050dc

Browse files
committed
fix node 8 tests
1 parent b14afd9 commit 06050dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { spawnSync } from 'child_process';
2+
import * as fs from 'fs';
23
import { join } from 'path';
34

45
function run(cmd: string, cwd: string = '') {
@@ -46,6 +47,11 @@ if (nodeMajorVersion <= 10) {
4647
// against a single version of node, but in the short run, this at least allows us to not be blocked by the
4748
// failures.)
4849
run('rm -rf packages/tracing/test/browser');
50+
51+
// TODO Pull this out once we switch to sucrase builds
52+
// change the tsconfig `target` back to es5, so as not to have to fix a compatibility problem that will soon be moot
53+
const baseTSConfig = 'packages/typescript/tsconfig.json';
54+
fs.writeFileSync(baseTSConfig, String(fs.readFileSync(baseTSConfig)).replace('"target": "es6"', '"target": "es5"'));
4955
}
5056
// Node 10
5157
else {

0 commit comments

Comments
 (0)