Use typescript.js as source for typescriptServices

This commit is contained in:
Jake Bailey 2022-09-29 15:08:53 -07:00
parent 22698f2c1b
commit d63c89d832
4 changed files with 6 additions and 14 deletions

View file

@ -35,9 +35,7 @@ const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'src/language/typescript
export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
);
let tsServices = fs
.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescriptServices.js'))
.toString();
let tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescript.js')).toString();
// Ensure we never run into the node system...
// (this also removes require calls that trick webpack into shimming those modules...)
@ -149,14 +147,8 @@ export var typescript = ts;
stripSourceMaps(tsServices_esm)
);
let dtsServices = fs
.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescriptServices.d.ts'))
.toString();
dtsServices += `
// MONACOCHANGE
export = ts;
// END MONACOCHANGE
`;
let dtsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescript.d.ts')).toString();
fs.writeFileSync(
path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices.d.ts'),
generatedNote + dtsServices