From c0b99e4785e0f09e18f4c5bbdc54c749b80ed77d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 5 Feb 2022 00:48:01 +0100 Subject: [PATCH] Remove CommonJS export pattern --- build/importTypescript.ts | 5 +++++ src/language/typescript/lib/typescriptServices-amd.js | 2 +- src/language/typescript/lib/typescriptServices.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/importTypescript.ts b/build/importTypescript.ts index a9a0cc69..930469cc 100644 --- a/build/importTypescript.ts +++ b/build/importTypescript.ts @@ -72,6 +72,11 @@ export const typescriptVersion = "${typeScriptDependencyVersion}";\n` '/* MONACOCHANGE */false/* END MONACOCHANGE */' ); + tsServices = tsServices.replace( + /module.exports = ts;/m, + '/* MONACOCHANGE */ /*module.exports = ts;*/ /* END MONACOCHANGE */' + ); + // Flag any new require calls (outside comments) so they can be corrected preemptively. // To avoid missing cases (or using an even more complex regex), temporarily remove comments // about require() and then check for lines actually calling require(). diff --git a/src/language/typescript/lib/typescriptServices-amd.js b/src/language/typescript/lib/typescriptServices-amd.js index d7b5922a..1a6f3511 100644 --- a/src/language/typescript/lib/typescriptServices-amd.js +++ b/src/language/typescript/lib/typescriptServices-amd.js @@ -162604,7 +162604,7 @@ if (typeof process === "undefined" || process.browser) { globalThis.toolsVersion = ts.versionMajorMinor; } if (typeof module !== "undefined" && module.exports) { - module.exports = ts; + /* MONACOCHANGE */ /*module.exports = ts;*/ /* END MONACOCHANGE */ } var ts; (function (ts) { diff --git a/src/language/typescript/lib/typescriptServices.js b/src/language/typescript/lib/typescriptServices.js index 56f3d9e7..49b7ebb8 100644 --- a/src/language/typescript/lib/typescriptServices.js +++ b/src/language/typescript/lib/typescriptServices.js @@ -162604,7 +162604,7 @@ if (typeof process === "undefined" || process.browser) { globalThis.toolsVersion = ts.versionMajorMinor; } if (typeof module !== "undefined" && module.exports) { - module.exports = ts; + /* MONACOCHANGE */ /*module.exports = ts;*/ /* END MONACOCHANGE */ } var ts; (function (ts) {