Skip to content

fix(sandbox): drop inherited tsconfig paths in package build#115

Merged
jamie-at-bunny merged 3 commits into
mainfrom
fix/sandbox-publish-tsconfig-paths
Jul 9, 2026
Merged

fix(sandbox): drop inherited tsconfig paths in package build#115
jamie-at-bunny merged 3 commits into
mainfrom
fix/sandbox-publish-tsconfig-paths

Conversation

@jamie-at-bunny

Copy link
Copy Markdown
Member

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.json maps @bunny.net/openapi-client to packages/openapi-client/src via paths so the repo works without a prebuild step. packages/sandbox/tsconfig.build.json extends the root config and inherited that mapping, so tsc pulled the client's sources into the sandbox program and tripped the rootDir: src check, even though the workflow builds openapi-client's dist first.

Fix

Override paths to {} in packages/sandbox/tsconfig.build.json. The package build now resolves @bunny.net/openapi-client through 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 build reproduces the CI failure before the change and passes after, emitted .d.ts files reference @bunny.net/openapi-client by name (no relative paths into the sibling package), and the root tsc --noEmit still passes.

No changeset needed: once merged, the release workflow re-runs on main and picks up the still-unpublished sandbox 0.3.0.

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.
@bogdan-at-bunny

Copy link
Copy Markdown

@codex review

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8ceee51

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a CI failure in the sandbox release workflow by overriding the inherited root tsconfig.json path aliases in packages/sandbox/tsconfig.build.json. The root config maps @bunny.net/openapi-client to its source files for monorepo development convenience, but that mapping caused tsc to pull those source files into the sandbox build, violating the rootDir: "src" constraint with TS6059 errors.

  • One-line fix: adds "paths": {} to tsconfig.build.json so the build resolves @bunny.net/openapi-client via the package's published dist/ exports instead of source, matching exactly how npm consumers see the package.
  • No side effects: the root config and the development tsconfig.json are unchanged, so in-repo type-checking without a prebuild step continues to work as before.

Confidence Score: 5/5

Safe to merge — the change is a targeted single-line override that unblocks the release workflow without affecting development or the root type-check.

The fix is minimal and well-scoped: overriding paths to {} in the build config is the standard TypeScript pattern for stripping monorepo path aliases before publication. The root config is untouched, the dev-time noEmit check still uses source paths, and the workflow already builds openapi-client's dist before sandbox. There is nothing in the change that could introduce a regression.

No files require special attention.

Important Files Changed

Filename Overview
packages/sandbox/tsconfig.build.json Adds "paths": {} to override the inherited root-level path aliases, preventing tsc from pulling openapi-client source files into the sandbox build and triggering TS6059 rootDir errors.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[tsconfig.json root] -->|"paths: @bunny.net/openapi-client → packages/openapi-client/src"| B[Dev / noEmit checks]
    A -->|"extends"| C[packages/sandbox/tsconfig.build.json]

    subgraph Before
        C1[tsconfig.build.json inherits paths] -->|"tsc follows path alias"| D1[pulls openapi-client/src files]
        D1 -->|"violates rootDir: src"| E1["TS6059 errors ❌"]
    end

    subgraph After
        C2["tsconfig.build.json paths: {} overrides"] -->|"resolves via package exports"| D2[dist/ of openapi-client]
        D2 -->|"rootDir: src satisfied"| E2["Build succeeds ✅"]
    end

    C --> C1
    C --> C2
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[tsconfig.json root] -->|"paths: @bunny.net/openapi-client → packages/openapi-client/src"| B[Dev / noEmit checks]
    A -->|"extends"| C[packages/sandbox/tsconfig.build.json]

    subgraph Before
        C1[tsconfig.build.json inherits paths] -->|"tsc follows path alias"| D1[pulls openapi-client/src files]
        D1 -->|"violates rootDir: src"| E1["TS6059 errors ❌"]
    end

    subgraph After
        C2["tsconfig.build.json paths: {} overrides"] -->|"resolves via package exports"| D2[dist/ of openapi-client]
        D2 -->|"rootDir: src satisfied"| E2["Build succeeds ✅"]
    end

    C --> C1
    C --> C2
Loading

Reviews (2): Last reviewed commit: "Merge branch 'fix/sandbox-publish-tsconf..." | Re-trigger Greptile

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: bccda068b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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
@jamie-at-bunny jamie-at-bunny merged commit e81f43c into main Jul 9, 2026
2 checks passed
@jamie-at-bunny jamie-at-bunny deleted the fix/sandbox-publish-tsconfig-paths branch July 9, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants