fix(sandbox): drop inherited tsconfig paths in package build#115
Conversation
The root tsconfig maps @bunny.net/openapi-client to its source files so the repo builds without a prebuild step. The sandbox package build inherited that mapping, pulling openapi-client sources into its program and failing rootDir checks in the publish workflow. Override paths so the build resolves openapi-client through its dist exports instead.
|
@codex review |
|
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The root tsconfig maps @bunny.net/openapi-client to its source files so the repo builds without a prebuild step. The sandbox package build inherited that mapping, pulling openapi-client sources into its program and failing rootDir checks in the publish workflow. Override paths so the build resolves openapi-client through its dist exports instead.
…om/BunnyWay/cli into fix/sandbox-publish-tsconfig-paths # Conflicts: # packages/sandbox/tsconfig.build.json
Problem
The sandbox publish job failed in the release workflow (run 29016270633) with dozens of TS6059 errors: openapi-client source files are "not under rootDir".
The root
tsconfig.jsonmaps@bunny.net/openapi-clienttopackages/openapi-client/srcviapathsso the repo works without a prebuild step.packages/sandbox/tsconfig.build.jsonextends the root config and inherited that mapping, sotscpulled the client's sources into the sandbox program and tripped therootDir: srccheck, even though the workflow builds openapi-client's dist first.Fix
Override
pathsto{}inpackages/sandbox/tsconfig.build.json. The package build now resolves@bunny.net/openapi-clientthrough its package exports (dist/), the same way npm consumers do. The workflow already builds openapi-client before sandbox, so dist is present.Verified locally:
bun run --filter @bunny.net/sandbox buildreproduces the CI failure before the change and passes after, emitted.d.tsfiles reference@bunny.net/openapi-clientby name (no relative paths into the sibling package), and the roottsc --noEmitstill passes.No changeset needed: once merged, the release workflow re-runs on main and picks up the still-unpublished sandbox 0.3.0.