Skip to content

chore: fix build for checkouts under a dot-directory - #2893

Merged
thymikee merged 1 commit into
mainfrom
fix/build-dot-paths
Nov 13, 2026
Merged

thymikee merged 1 commit into
mainfrom
fix/build-dot-paths

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

With the repo checked out under a dot-directory (for example a worktree in ~/.t3/worktrees/... or ~/.worktrees/...), yarn build produced broken output and tests and lint failed:

  • babel.config.js applied @babel/preset-typescript through a **/*.ts glob, which doesn't match paths with a dot segment. TypeScript went through untranspiled, so build/*.js contained type annotations.
  • scripts/build.js matched **/*.js, **/*.ts and **/__{tests,mocks,fixtures}__/** against absolute paths, so .ts files were copied as-is instead of compiled, and test folders ended up in build/.

Changes:

  • babel.config.js: the TypeScript override uses /\.ts$/ instead of the glob.
  • scripts/build.js: globs are matched against the path relative to packages/, so the checkout location no longer matters.

Test Plan

Fresh checkout of main under a dot-directory:

Before After
packages/cli-tools/build/logger.js raw TypeScript CommonJS
__tests__ folders in build/ 1 0
yarn jest packages 20 failures in cli-config-apple alone 52 suites, 298 tests pass
yarn lint import/namespace errors 0 errors

A build of the same commit from a path without a dot segment produces byte-identical build/**/*.js.

@thymikee
thymikee merged commit 2574a3a into main Nov 13, 2026
4 of 8 checks passed
@thymikee
thymikee deleted the fix/build-dot-paths branch November 13, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant