Skip to content

Commit 94f7cb5

Browse files
authored
fix(vscode): skip redundant tsc build in prepackage to prevent TS5055 (#4401)
The prepackage script called `npm run build` (full tsc compilation of all workspace packages) before bundling. This second tsc pass fails with TS5055 in CI because: 1. `npm ci` already built everything via the `prepare` lifecycle 2. `release:version` bumps package versions, making tsbuildinfo stale 3. The redundant `npm run build` triggers tsc --build which attempts a full rebuild, but composite project references cause dist/*.d.ts to be resolved as input files → TS5055 The fix removes the redundant `npm run build` call. The CLI bundle is produced by esbuild directly from TypeScript source files (entry: packages/cli/index.ts), so compiled dist/ artifacts are not needed. Root cause introduced by #4295 (composite project references).
1 parent 6b0e758 commit 94f7cb5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/vscode-ide-companion/scripts/prepackage.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ function removeSelfReferenceFromNodeModules() {
178178
function main() {
179179
const npm = npmBin();
180180

181-
// Root bundling depends on built workspace outputs. Use the root build to
182-
// ensure all required workspace dist/ artifacts exist.
183-
console.log('[prepackage] Building repo...');
184-
run(npm, ['--prefix', repoRoot, 'run', 'build'], { cwd: repoRoot });
185-
181+
// The CLI bundle is produced by esbuild directly from TypeScript source
182+
// (entryPoint: packages/cli/index.ts), so a full tsc build is not needed.
183+
// Calling `npm run build` here would trigger tsc --build a second time
184+
// (after the initial `prepare` in npm ci) and fail with TS5055 when the
185+
// version bump made source files diverge from the stale tsbuildinfo.
186186
console.log('[prepackage] Bundling root CLI...');
187187
run(npm, ['--prefix', repoRoot, 'run', 'bundle'], { cwd: repoRoot });
188188

0 commit comments

Comments
 (0)