Refactor plugin related code (#53942)

This commit is contained in:
Sheetal Nandi
2023-04-20 16:49:47 -07:00
committed by GitHub
parent 58a5f4e228
commit 30fb9fa57e
8 changed files with 118 additions and 137 deletions

View File

@@ -20,7 +20,6 @@ import {
normalizePath,
normalizeSlashes,
perfLogger,
resolveJSModule,
SortedReadonlyArray,
startTracing,
stripQuotes,
@@ -57,7 +56,6 @@ import {
ITypingsInstaller,
Logger,
LogLevel,
ModuleImportResult,
Msg,
nowString,
nullCancellationToken,
@@ -381,15 +379,6 @@ export function initializeNodeSystem(): StartInput {
sys.gc = () => global.gc?.();
}
sys.require = (initialDir: string, moduleName: string): ModuleImportResult => {
try {
return { module: require(resolveJSModule(moduleName, initialDir, sys)), error: undefined };
}
catch (error) {
return { module: undefined, error };
}
};
let cancellationToken: ServerCancellationToken;
try {
const factory = require("./cancellationToken");