From 75d6648f89c3dbc8ec0b600bab51ba458c7ca696 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 14 Jul 2020 14:17:23 -0400 Subject: [PATCH 1/3] Cherry-pick PR #39573 into release-3.9 (#39602) Component commits: d1f8d0a153 fix(types/mocha): change deprecated Mocha types Co-authored-by: Alexander T --- src/testRunner/externalCompileRunner.ts | 6 +++--- src/testRunner/rwcRunner.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index b720ba61f2c0f..4f2cd9e477070 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -30,7 +30,7 @@ namespace Harness { // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; - describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) { + describe(`${this.kind()} code samples`, function (this: Mocha.Suite) { this.timeout(600_000); // 10 minutes for (const test of testList) { cls.runTest(typeof test === "string" ? test : test.file); @@ -41,7 +41,7 @@ namespace Harness { // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; const timeout = 600_000; // 10 minutes - describe(directoryName, function (this: Mocha.ISuiteCallbackContext) { + describe(directoryName, function (this: Mocha.Suite) { this.timeout(timeout); const cp: typeof import("child_process") = require("child_process"); @@ -127,7 +127,7 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`; // eslint-disable-next-line @typescript-eslint/no-this-alias const cls = this; - describe(`${this.kind()} code samples`, function (this: Mocha.ISuiteCallbackContext) { + describe(`${this.kind()} code samples`, function (this: Mocha.Suite) { this.timeout(cls.timeout); // 20 minutes before(() => { cls.exec("docker", ["build", ".", "-t", "typescript/typescript"], { cwd: IO.getWorkspaceRoot() }); // cached because workspace is hashed to determine cacheability diff --git a/src/testRunner/rwcRunner.ts b/src/testRunner/rwcRunner.ts index a50447b2d0065..69ca31bf4744f 100644 --- a/src/testRunner/rwcRunner.ts +++ b/src/testRunner/rwcRunner.ts @@ -47,7 +47,7 @@ namespace RWC { caseSensitive = false; }); - it("can compile", function (this: Mocha.ITestCallbackContext) { + it("can compile", function (this: Mocha.Context) { this.timeout(800_000); // Allow long timeouts for RWC compilations let opts!: ts.ParsedCommandLine; @@ -145,7 +145,7 @@ namespace RWC { }); - it("has the expected emitted code", function (this: Mocha.ITestCallbackContext) { + it("has the expected emitted code", function (this: Mocha.Context) { this.timeout(100_000); // Allow longer timeouts for RWC js verification Harness.Baseline.runMultifileBaseline(baseName, "", () => { return Harness.Compiler.iterateOutputs(compilerResult.js.values()); From 761a9ed6dba3a010a5c6385d04afcd3e170bd63e Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 14 Jul 2020 14:44:53 -0400 Subject: [PATCH 2/3] Cherry-pick PR #39599 into release-3.9 (#39601) Component commits: c8d5b9891d Load ETW module from a specified path Co-authored-by: Michael Crane --- src/compiler/perfLogger.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/perfLogger.ts b/src/compiler/perfLogger.ts index 8ed8feac90c4c..f05e8a3bd1053 100644 --- a/src/compiler/perfLogger.ts +++ b/src/compiler/perfLogger.ts @@ -28,9 +28,11 @@ namespace ts { // See https://github.com/microsoft/typescript-etw for more information let etwModule; try { - // require() will throw an exception if the module is not installed + const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw"; + + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; From a7d801176ca6cdfe45162c7d7cc80b2fdd144240 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 15 Jul 2020 17:56:28 +0000 Subject: [PATCH 3/3] Bump version to 3.9.7 and LKG --- lib/tsc.js | 6 ++++-- lib/tsserver.js | 8 +++++--- lib/tsserverlibrary.js | 8 +++++--- lib/typescript.js | 8 +++++--- lib/typescriptServices.js | 8 +++++--- lib/typingsInstaller.js | 8 +++++--- package.json | 2 +- src/compiler/corePublic.ts | 2 +- 8 files changed, 31 insertions(+), 19 deletions(-) diff --git a/lib/tsc.js b/lib/tsc.js index 66502640f5af6..8d2baac826d44 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -67,7 +67,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook var ts; (function (ts) { ts.versionMajorMinor = "3.9"; - ts.version = "3.9.6"; + ts.version = "3.9.7"; function tryGetNativeMap() { return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined; } @@ -2114,6 +2114,7 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2138,7 +2139,8 @@ var ts; }; var etwModule; try { - etwModule = require("@microsoft/typescript-etw"); + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/lib/tsserver.js b/lib/tsserver.js index cd4eb39839aa4..bd22d0ab93db6 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -94,7 +94,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.6"; + ts.version = "3.9.7"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -2527,6 +2527,7 @@ var ts; /* @internal */ var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2553,9 +2554,10 @@ var ts; // See https://github.com/microsoft/typescript-etw for more information var etwModule; try { - // require() will throw an exception if the module is not installed + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 312f8411ab406..90c9263257e8d 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -244,7 +244,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.6"; + ts.version = "3.9.7"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -2677,6 +2677,7 @@ var ts; /* @internal */ var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2703,9 +2704,10 @@ var ts; // See https://github.com/microsoft/typescript-etw for more information var etwModule; try { - // require() will throw an exception if the module is not installed + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/lib/typescript.js b/lib/typescript.js index 73d31bcd7bac0..cb5199f3bce2c 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -244,7 +244,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.6"; + ts.version = "3.9.7"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -2677,6 +2677,7 @@ var ts; /* @internal */ var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2703,9 +2704,10 @@ var ts; // See https://github.com/microsoft/typescript-etw for more information var etwModule; try { - // require() will throw an exception if the module is not installed + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 43b423be4da43..d096b99a29744 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -244,7 +244,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.6"; + ts.version = "3.9.7"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -2677,6 +2677,7 @@ var ts; /* @internal */ var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2703,9 +2704,10 @@ var ts; // See https://github.com/microsoft/typescript-etw for more information var etwModule; try { - // require() will throw an exception if the module is not installed + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index f218cc0e979db..a0d425c6a8c0b 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -83,7 +83,7 @@ var ts; // If changing the text in this section, be sure to test `configurePrerelease` too. ts.versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - ts.version = "3.9.6"; + ts.version = "3.9.7"; /** * Returns the native Map implementation if it is available and compatible (i.e. supports iteration). */ @@ -2516,6 +2516,7 @@ var ts; /* @internal */ var ts; (function (ts) { + var _a; var nullLogger = { logEvent: ts.noop, logErrEvent: ts.noop, @@ -2542,9 +2543,10 @@ var ts; // See https://github.com/microsoft/typescript-etw for more information var etwModule; try { - // require() will throw an exception if the module is not installed + var etwModulePath = (_a = process.env.TS_ETW_MODULE_PATH) !== null && _a !== void 0 ? _a : "./node_modules/@microsoft/typescript-etw"; + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/package.json b/package.json index 44fd1198506d5..6b167147e096e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "3.9.6", + "version": "3.9.7", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index 758a7db93b48a..1965ba047f308 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -3,7 +3,7 @@ namespace ts { // If changing the text in this section, be sure to test `configurePrerelease` too. export const versionMajorMinor = "3.9"; /** The version of the TypeScript compiler release */ - export const version = "3.9.6" as string; + export const version = "3.9.7" as string; /** * Type of objects whose values are all of the same type.