From 5507c1385581011355c0cac743af9fa6755c1d68 Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Wed, 27 Apr 2022 19:33:06 -0700 Subject: [PATCH 1/2] switch tsconfig `target` to es6 --- packages/typescript/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript/tsconfig.json b/packages/typescript/tsconfig.json index 49c2339c7f21..217159d3b73c 100644 --- a/packages/typescript/tsconfig.json +++ b/packages/typescript/tsconfig.json @@ -23,6 +23,6 @@ "sourceMap": true, "strict": true, "strictBindCallApply": false, - "target": "es5" + "target": "es6" } } From 604483c2567907fe51e49cf1ae5b684dc74e702e Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Wed, 27 Apr 2022 20:12:39 -0700 Subject: [PATCH 2/2] fix node 8 tests --- scripts/test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/test.ts b/scripts/test.ts index 02f440af1af9..ca33e54ee3d0 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -1,4 +1,5 @@ import { spawnSync } from 'child_process'; +import * as fs from 'fs'; import { join } from 'path'; function run(cmd: string, cwd: string = '') { @@ -37,6 +38,7 @@ if (nodeMajorVersion <= 10) { '@sentry/gatsby', '@sentry/serverless', '@sentry/nextjs', + '@sentry/angular', ]; // This is a hack, to deal the fact that the browser-based tests fail under Node 8, because of a conflict buried @@ -46,6 +48,12 @@ if (nodeMajorVersion <= 10) { // against a single version of node, but in the short run, this at least allows us to not be blocked by the // failures.) run('rm -rf packages/tracing/test/browser'); + + // TODO Pull this out once we switch to sucrase builds + // Recompile as es5, so as not to have to fix a compatibility problem that will soon be moot + const baseTSConfig = 'packages/typescript/tsconfig.json'; + fs.writeFileSync(baseTSConfig, String(fs.readFileSync(baseTSConfig)).replace('"target": "es6"', '"target": "es5"')); + run(`yarn build:dev ${ignorePackages.map(dep => `--ignore="${dep}"`).join(' ')}`); } // Node 10 else {