[engineering] remove dead references to Swc transpile (#252375)

This commit is contained in:
Aman Karmani 2025-06-25 01:40:10 -07:00 committed by GitHub
parent 94956d0b0b
commit e539ff9ae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -111,7 +111,7 @@ const tasks = compilations.map(function (tsconfigFile) {
overrideOptions.inlineSources = Boolean(build); overrideOptions.inlineSources = Boolean(build);
overrideOptions.base = path.dirname(absolutePath); overrideOptions.base = path.dirname(absolutePath);
const compilation = tsb.create(absolutePath, overrideOptions, { verbose: false, transpileOnly, transpileOnlyIncludesDts: transpileOnly, transpileWithSwc: true }, err => reporter(err.toString())); const compilation = tsb.create(absolutePath, overrideOptions, { verbose: false, transpileOnly, transpileOnlyIncludesDts: transpileOnly, transpileWithEsbuild: true }, err => reporter(err.toString()));
const pipeline = function () { const pipeline = function () {
const input = es.through(); const input = es.through();

View File

@ -88,7 +88,7 @@ function createCompile(src, { build, emitError, transpileOnly, preserveEnglish }
const compilation = tsb.create(projectPath, overrideOptions, { const compilation = tsb.create(projectPath, overrideOptions, {
verbose: false, verbose: false,
transpileOnly: Boolean(transpileOnly), transpileOnly: Boolean(transpileOnly),
transpileWithSwc: typeof transpileOnly !== 'boolean' && transpileOnly.esbuild transpileWithEsbuild: typeof transpileOnly !== 'boolean' && transpileOnly.esbuild
}, err => reporter(err)); }, err => reporter(err));
function pipeline(token) { function pipeline(token) {
const bom = require('gulp-bom'); const bom = require('gulp-bom');

View File

@ -62,7 +62,7 @@ export function createCompile(src: string, { build, emitError, transpileOnly, pr
const compilation = tsb.create(projectPath, overrideOptions, { const compilation = tsb.create(projectPath, overrideOptions, {
verbose: false, verbose: false,
transpileOnly: Boolean(transpileOnly), transpileOnly: Boolean(transpileOnly),
transpileWithSwc: typeof transpileOnly !== 'boolean' && transpileOnly.esbuild transpileWithEsbuild: typeof transpileOnly !== 'boolean' && transpileOnly.esbuild
}, err => reporter(err)); }, err => reporter(err));
function pipeline(token?: util.ICancellationToken) { function pipeline(token?: util.ICancellationToken) {

View File

@ -131,7 +131,7 @@ function create(projectPath, existingOptions, config, onError = _defaultOnError)
} }
let result; let result;
if (config.transpileOnly) { if (config.transpileOnly) {
const transpiler = !config.transpileWithSwc const transpiler = !config.transpileWithEsbuild
? new transpiler_1.TscTranspiler(logFn, printDiagnostic, projectPath, cmdLine) ? new transpiler_1.TscTranspiler(logFn, printDiagnostic, projectPath, cmdLine)
: new transpiler_1.ESBuildTranspiler(logFn, printDiagnostic, projectPath, cmdLine); : new transpiler_1.ESBuildTranspiler(logFn, printDiagnostic, projectPath, cmdLine);
result = (() => createTranspileStream(transpiler)); result = (() => createTranspileStream(transpiler));

View File

@ -36,7 +36,7 @@ const _defaultOnError = (err: string) => console.log(JSON.stringify(err, null, 4
export function create( export function create(
projectPath: string, projectPath: string,
existingOptions: Partial<ts.CompilerOptions>, existingOptions: Partial<ts.CompilerOptions>,
config: { verbose?: boolean; transpileOnly?: boolean; transpileOnlyIncludesDts?: boolean; transpileWithSwc?: boolean }, config: { verbose?: boolean; transpileOnly?: boolean; transpileOnlyIncludesDts?: boolean; transpileWithEsbuild?: boolean },
onError: (message: string) => void = _defaultOnError onError: (message: string) => void = _defaultOnError
): IncrementalCompiler { ): IncrementalCompiler {
@ -128,7 +128,7 @@ export function create(
let result: IncrementalCompiler; let result: IncrementalCompiler;
if (config.transpileOnly) { if (config.transpileOnly) {
const transpiler = !config.transpileWithSwc const transpiler = !config.transpileWithEsbuild
? new TscTranspiler(logFn, printDiagnostic, projectPath, cmdLine) ? new TscTranspiler(logFn, printDiagnostic, projectPath, cmdLine)
: new ESBuildTranspiler(logFn, printDiagnostic, projectPath, cmdLine); : new ESBuildTranspiler(logFn, printDiagnostic, projectPath, cmdLine);
result = <any>(() => createTranspileStream(transpiler)); result = <any>(() => createTranspileStream(transpiler));