Skip to content

fix: resolve pi build rootDir error by adding types export to core#346

Merged
BYK merged 1 commit into
mainfrom
fix/pi-tsconfig-rootdir
May 15, 2026
Merged

fix: resolve pi build rootDir error by adding types export to core#346
BYK merged 1 commit into
mainfrom
fix/pi-tsconfig-rootdir

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 15, 2026

Summary

Fixes the release build failure for v0.20.0 (CI run #813).

  • Remove paths mapping from packages/pi/tsconfig.build.json that caused tsc to follow into core's source files during declaration emission, violating rootDir
  • Add "types" export condition to packages/core/package.json so tsc resolves @loreai/core to pre-built .d.ts files instead of source

The root cause was introduced in #331 which added a static import { getGitRemote } from "@loreai/core" to pi's index.ts. The paths mapping made tsc resolve this to ../core/src/index.ts (the barrel file), pulling all of core's source into the compilation — all outside pi's rootDir: "src". This only fails during tsc -p tsconfig.build.json (declaration emission), not during tsc --noEmit (typecheck).

The pi package's tsconfig.build.json had a paths mapping that resolved
@loreai/core to source files, pulling them outside rootDir during
declaration emission. Remove the paths mapping and add a 'types' export
condition to core's package.json so tsc resolves to pre-built .d.ts files.
@BYK BYK merged commit 0ce0929 into main May 15, 2026
7 checks passed
@BYK BYK deleted the fix/pi-tsconfig-rootdir branch May 15, 2026 15:43
@BYK BYK mentioned this pull request May 15, 2026
6 tasks
@craft-deployer craft-deployer Bot mentioned this pull request May 15, 2026
6 tasks
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.

1 participant