fix(app): emit declaration files and fix package type exports for external consumers#26
Conversation
…ernal consumers - Add tsconfig.build.json that emits .d.ts only from src/ (excludes examples with test fixture imports) - Change build script to vite build && tsc -p tsconfig.build.json so declarations survive Vite's dist clean - Point exports.types from ./src/index.ts to ./dist/index.d.ts so consumers get compiled declarations - Remove src/ from published files — only dist/ is shipped - Add tests/consumer/ fixture with strict tsconfig and proof-obligation import to pass tsc --noEmit Closes #25 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Session BackupCommit: c7fe624
|
|
Warning Review limit reached
More reviews will be available in 47 minutes and 28 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe package build pipeline is updated to emit TypeScript declaration files via a new ChangesFix Published Type Exports
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…use) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Session BackupCommit: fff5520
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app/package.json`:
- Around line 21-30: The test:consumer script currently typechecks against
declarations in ../../dist/index.d.ts without ensuring those declarations are
built first, which causes failures on clean checkouts. Modify the test:consumer
script in the scripts section to include the build step before running the
typecheck command, either by prepending the build task directly to the
test:consumer script or by creating a pretest:consumer hook that runs the build
step automatically. This ensures the declaration files exist before the consumer
proof test attempts to validate against them.
In `@packages/app/tests/consumer/tsconfig.json`:
- Around line 10-12: Add a `baseUrl: "."` property to the tsconfig.json file in
the paths configuration block alongside the existing `paths` mapping for
`@prover-coder-ai/openapi-effect`. This ensures TypeScript's module resolution
properly follows the package.json exports.types entry instead of bypassing
normal module resolution through the direct dist path mapping.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ba868e59-d79e-4feb-a59b-53cc3f468911
📒 Files selected for processing (4)
packages/app/package.jsonpackages/app/tests/consumer/index.tspackages/app/tests/consumer/tsconfig.jsonpackages/app/tsconfig.build.json
tests/consumer has its own tsconfig.json with paths mapping for @prover-coder-ai/openapi-effect. Including it in the main tsc --noEmit causes TS2307 since the package isn't resolved in the monorepo context. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Session BackupCommit: c8a0046
|
…k, add baseUrl - test:consumer now runs tsc -p tsconfig.build.json first so the script works on a clean checkout without a pre-built dist/ - Add baseUrl: "." to tests/consumer/tsconfig.json alongside paths so TypeScript module resolution follows the standard paths protocol Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Session BackupCommit: 0eb9ca7
|
Closes #25
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com