mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
Change build system to hereby
This eliminates a significant number of dependencies, eliminating all npm audit issues, speeding up `npm ci` by 20%, and overall making the build faster (faster startup, direct code is faster than streams, etc) and clearer to understand. I'm finding it much easier to make build changes for the module transform with this; I can more clearly indicate task dependencies and prevent running tasks that don't need to be run. Given we're changing our build process entirely (new deps, new steps), it seems like this is a good time to change things up.
This commit is contained in:
@@ -1567,10 +1567,7 @@ export let sys: System = (() => {
|
||||
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv as string[], arg => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
|
||||
tryEnableSourceMapsForHost() {
|
||||
try {
|
||||
// Trick esbuild into not eagerly resolving a path to a JS file.
|
||||
// See: https://github.com/evanw/esbuild/issues/1958
|
||||
const moduleName = "source-map-support" as const;
|
||||
(require(moduleName) as typeof import("source-map-support")).install();
|
||||
(require("source-map-support") as typeof import("source-map-support")).install();
|
||||
}
|
||||
catch {
|
||||
// Could not enable source maps.
|
||||
|
||||
@@ -16,4 +16,4 @@ export function findUpFile(name: string): string {
|
||||
}
|
||||
|
||||
export const findUpRoot: { (): string; cached?: string; } = () =>
|
||||
findUpRoot.cached ||= dirname(findUpFile("Gulpfile.mjs"));
|
||||
findUpRoot.cached ||= dirname(findUpFile("Herebyfile.mjs"));
|
||||
|
||||
@@ -1406,7 +1406,7 @@ export namespace Baseline {
|
||||
}
|
||||
|
||||
function getBaselineFileChangedErrorMessage(relativeFileName: string): string {
|
||||
return `The baseline file ${relativeFileName} has changed. (Run "gulp baseline-accept" if the new baseline is correct.)`;
|
||||
return `The baseline file ${relativeFileName} has changed. (Run "hereby baseline-accept" if the new baseline is correct.)`;
|
||||
}
|
||||
|
||||
export function runBaseline(relativeFileName: string, actual: string | null, opts?: BaselineOptions): void {
|
||||
|
||||
@@ -125,12 +125,15 @@ export class MainProcessLogger extends BaseLogger {
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
// eslint-disable-next-line prefer-const
|
||||
export let dynamicImport = async (_id: string): Promise<any> => {
|
||||
let dynamicImport = async (_id: string): Promise<any> => {
|
||||
throw new Error("Dynamic import not implemented");
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export function setDynamicImport(fn: (id: string) => Promise<any>) {
|
||||
dynamicImport = fn;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createWebSystem(host: WebHost, args: string[], getExecutingFilePath: () => string): ServerHost {
|
||||
const returnEmptyString = () => "";
|
||||
|
||||
Reference in New Issue
Block a user