From 3a8ad661c4bcd4d8b70a1012ea0a2ea2fd110aa1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 12 Feb 2026 12:53:38 +0100 Subject: [PATCH] Refactor transpileFile function to remove unused parameter and update sourcefile reference (#294867) --- build/next/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/next/index.ts b/build/next/index.ts index 8d8429012de..2d30bbf737a 100644 --- a/build/next/index.ts +++ b/build/next/index.ts @@ -699,11 +699,11 @@ const transformOptions: esbuild.TransformOptions = { }), }; -async function transpileFile(srcPath: string, destPath: string, relativePath: string): Promise { +async function transpileFile(srcPath: string, destPath: string): Promise { const source = await fs.promises.readFile(srcPath, 'utf-8'); const result = await esbuild.transform(source, { ...transformOptions, - sourcefile: relativePath, + sourcefile: srcPath, }); await fs.promises.mkdir(path.dirname(destPath), { recursive: true }); @@ -728,7 +728,7 @@ async function transpile(outDir: string, excludeTests: boolean): Promise { await Promise.all(files.map(file => { const srcPath = path.join(REPO_ROOT, SRC_DIR, file); const destPath = path.join(REPO_ROOT, outDir, file.replace(/\.ts$/, '.js')); - return transpileFile(srcPath, destPath, file); + return transpileFile(srcPath, destPath); })); } @@ -996,7 +996,7 @@ async function watch(): Promise { await Promise.all(tsFiles.map(srcPath => { const relativePath = path.relative(path.join(REPO_ROOT, SRC_DIR), srcPath); const destPath = path.join(REPO_ROOT, outDir, relativePath.replace(/\.ts$/, '.js')); - return transpileFile(srcPath, destPath, relativePath); + return transpileFile(srcPath, destPath); })); }