mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Fixes #2815: Remove require reference in typescriptServices
This commit is contained in:
parent
10251b81a0
commit
ad4a942460
3 changed files with 6 additions and 2 deletions
|
|
@ -69,6 +69,10 @@ export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
|
|||
/= require\("perf_hooks"\)/m,
|
||||
'/* MONACOCHANGE */= {}/* END MONACOCHANGE */'
|
||||
);
|
||||
tsServices = tsServices.replace(
|
||||
/typeof require === "function"/m,
|
||||
'/* MONACOCHANGE */false/* 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
|
||||
|
|
|
|||
|
|
@ -3495,7 +3495,7 @@ var ts;
|
|||
}
|
||||
}
|
||||
function tryGetNodePerformanceHooks() {
|
||||
if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof module === "object" && typeof require === "function") {
|
||||
if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof module === "object" && /* MONACOCHANGE */false/* END MONACOCHANGE */) {
|
||||
try {
|
||||
var performance_1;
|
||||
var _a /* MONACOCHANGE */= {}/* END MONACOCHANGE */, nodePerformance_1 = _a.performance, PerformanceObserver_1 = _a.PerformanceObserver;
|
||||
|
|
|
|||
|
|
@ -3495,7 +3495,7 @@ var ts;
|
|||
}
|
||||
}
|
||||
function tryGetNodePerformanceHooks() {
|
||||
if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof module === "object" && typeof require === "function") {
|
||||
if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof module === "object" && /* MONACOCHANGE */false/* END MONACOCHANGE */) {
|
||||
try {
|
||||
var performance_1;
|
||||
var _a /* MONACOCHANGE */= {}/* END MONACOCHANGE */, nodePerformance_1 = _a.performance, PerformanceObserver_1 = _a.PerformanceObserver;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue