Merge pull request #72 from microsoft/41_perf_require

Adds a regex fix for the perf_hooks import in TS 4.1
pull/2748/head
Alexandru Dima 4 years ago committed by GitHub
commit 5413083ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,6 +62,10 @@ export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
/^( +)debugger;$/m, /^( +)debugger;$/m,
'$1// MONACOCHANGE\n$1// debugger;\n$1// END MONACOCHANGE' '$1// MONACOCHANGE\n$1// debugger;\n$1// END MONACOCHANGE'
); );
tsServices = tsServices.replace(
/= require\("perf_hooks"\)/m,
'/* MONACOCHANGE */= {}/* END MONACOCHANGE */'
);
// Flag any new require calls (outside comments) so they can be corrected preemptively. // 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 // To avoid missing cases (or using an even more complex regex), temporarily remove comments

Loading…
Cancel
Save