Repository navigation
fix: drop unnecessary CJS output and optimize turbo config - #2
Conversation
All packages target ESM-only consumers (Cloudflare Workers), so CJS output was dead weight roughly doubling dist size. Also fix turbo task config: remove build dependency from test (tests import from src/), and add outputs:[] to typecheck and lint for proper caching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bundle Size Report
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR changes build outputs to ESM-only across integrations and packages by updating bunup configs and package.json export maps, and adjusts turbo task definitions related to test, typecheck, and lint outputs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@integrations/remix/package.json`:
- Around line 42-44: The package currently lists "@standard-schema/spec" only
under peerDependencies; add the same version ("^1.1.0") to devDependencies in
package.json so local tooling (typecheck, test, build) can resolve the type-only
imports from action.ts and types.ts during development; update the
devDependencies section to include "@standard-schema/spec": "^1.1.0".
In `@packages/cli/package.json`:
- Around line 39-42: The four workspace packages "@workkit/d1", "@workkit/env",
"@workkit/errors", and "@workkit/types" are marked external by the bundler and
are required at runtime by the CLI, so they must be listed under dependencies
rather than devDependencies in package.json; update package.json to remove these
entries from devDependencies and add them to dependencies (preserving the
"workspace:*" version specifiers) so they are resolved for end users at runtime.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3e73ffae-b594-419e-9484-78598ae137af
📒 Files selected for processing (43)
integrations/astro/bunup.config.tsintegrations/astro/package.jsonintegrations/hono/bunup.config.tsintegrations/hono/package.jsonintegrations/remix/bunup.config.tsintegrations/remix/package.jsonpackages/ai-gateway/bunup.config.tspackages/ai-gateway/package.jsonpackages/ai/bunup.config.tspackages/ai/package.jsonpackages/api/bunup.config.tspackages/api/package.jsonpackages/auth/bunup.config.tspackages/auth/package.jsonpackages/cache/bunup.config.tspackages/cache/package.jsonpackages/cli/bunup.config.tspackages/cli/package.jsonpackages/cron/bunup.config.tspackages/cron/package.jsonpackages/crypto/bunup.config.tspackages/crypto/package.jsonpackages/d1/bunup.config.tspackages/d1/package.jsonpackages/do/bunup.config.tspackages/do/package.jsonpackages/env/bunup.config.tspackages/env/package.jsonpackages/errors/bunup.config.tspackages/errors/package.jsonpackages/kv/bunup.config.tspackages/kv/package.jsonpackages/queue/bunup.config.tspackages/queue/package.jsonpackages/r2/bunup.config.tspackages/r2/package.jsonpackages/ratelimit/bunup.config.tspackages/ratelimit/package.jsonpackages/testing/bunup.config.tspackages/testing/package.jsonpackages/types/bunup.config.tspackages/types/package.jsonturbo.json
💤 Files with no reviewable changes (15)
- packages/types/package.json
- packages/cron/package.json
- packages/r2/package.json
- packages/kv/package.json
- packages/ratelimit/package.json
- packages/d1/package.json
- packages/do/package.json
- packages/ai-gateway/package.json
- packages/ai/package.json
- packages/auth/package.json
- packages/cache/package.json
- packages/crypto/package.json
- packages/queue/package.json
- packages/api/package.json
- packages/testing/package.json
- CLI: move @workkit/{d1,env,errors,types} to dependencies — they are
marked external in bunup and must be resolved at runtime by consumers
- Remix: add @standard-schema/spec to devDependencies alongside peerDeps
so local tooling can resolve type-only imports during development
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
bunup.config.tsfiles (packages + integrations) — output is now ESM-only, roughly halving dist size"main"and"require"entries from all 21package.jsonexports — consumers are Cloudflare Workers (ESM-only)"dependsOn": ["build"]from turbotesttask — tests import from../src/, not dist"outputs": []to turbotypecheckandlinttasks for proper cachingTest plan
bun run buildpasses — only.jsand.d.tsfiles in dist (no.cjs/.d.cts)bun run typecheckpassesbun run testpasses (confirms tests do not depend on build output)🤖 Generated with Claude Code
Summary by CodeRabbit