Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Fixes microsoft/monaco-editor#1937: Remove debugger statement
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Sep 18, 2020
1 parent e31737a commit 8381cb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/importTypescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
/^( +)var result = ts\.sys\.require\(.*$/m,
'$1// MONACOCHANGE\n$1var result = undefined;\n$1// END MONACOCHANGE'
);

tsServices = tsServices.replace(
/^( +)fs = require\("fs"\);$/m,
'$1// MONACOCHANGE\n$1fs = undefined;\n$1// END MONACOCHANGE'
);
tsServices = tsServices.replace(
/^( +)debugger;$/m,
'$1// MONACOCHANGE\n$1// debugger;\n$1// 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
Expand Down
4 changes: 3 additions & 1 deletion src/lib/typescriptServices-amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,9 @@ var ts;
return true;
}
function fail(message, stackCrawlMark) {
debugger;
// MONACOCHANGE
// debugger;
// END MONACOCHANGE
var e = new Error(message ? "Debug Failure. " + message : "Debug Failure.");
if (Error.captureStackTrace) {
Error.captureStackTrace(e, stackCrawlMark || fail);
Expand Down
4 changes: 3 additions & 1 deletion src/lib/typescriptServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,9 @@ var ts;
return true;
}
function fail(message, stackCrawlMark) {
debugger;
// MONACOCHANGE
// debugger;
// END MONACOCHANGE
var e = new Error(message ? "Debug Failure. " + message : "Debug Failure.");
if (Error.captureStackTrace) {
Error.captureStackTrace(e, stackCrawlMark || fail);
Expand Down

0 comments on commit 8381cb3

Please sign in to comment.