build: stop shipping JS source maps; keep declaration maps - #527
Conversation
dist/ drops 7.3M -> 5.1M and the packed tarball 1,022,395 -> 731,570 bytes (-28%, 265 fewer files). Declaration maps stay for library consumers; nothing in lib/, scripts/, or tests references .js.map or --enable-source-maps. Audit roadmap 4.5.1. https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughSummaryThis is a minor, build-output-only optimization that stops shipping JavaScript source maps while retaining TypeScript declaration maps. The change is safe (one-line tsconfig.json update) with no runtime impact, no API changes, and clear rollback path. Existing validation confirms zero regressions: all tests pass (vitest 13/13), pack budget constraints met, and 266 declaration maps remain intact for consumers. Changestsconfig.json: Disabled JavaScript source map emission ( Impact
Validation
WalkthroughTypeScript compiler option ChangesBuild Configuration Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes note: this is a single-line config toggle with no behavioral logic, test coverage, or runtime impact. if this disables debugging in production or staging builds, check that debug tooling (web inspector, error tracking) doesn't rely on these maps. if builds run on windows, confirm the downstream build system doesn't choke on missing maps. no regression tests needed for config-only changes. 🚥 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)
✨ Simplify code
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 |
Summary
Stops emitting/shipping JavaScript source maps while keeping declaration maps for library consumers — audit roadmap §4.5.1 (
docs/audits/AUDIT_2026-06-10.md, PR #522). One-linetsconfig.jsonchange.Impact
dist/unpacked.js.mapshipped.d.ts.map(kept)JS source maps were dead weight in the published package: the tarball ships
dist/withoutlib/sources, so the maps could never resolve for consumers, and nothing inlib/,scripts/, tests, or docs references.js.mapor--enable-source-maps. Declaration maps stay because go-to-definition works for monorepo/git consumers.Validation
npm run buildclean; zero.js.mapin dist, all 266.d.ts.mapintactnode scripts/check-pack-budget.mjs— Pack budget ok (731,570 bytes / 836 files)npx vitest run test/check-pack-budget.test.ts— 13/13npm run typecheckRisk / Rollback
Build-output-only change; revert the single commit to restore maps. Local debugging is unaffected (
tsc --sourceMapor vitest's own transforms still work for development).https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
Generated by Claude Code
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
stops emitting js source maps (
sourceMap: false) while keeping declaration maps intact — a build-output-only change that trims 266.js.mapfiles and cuts the published tarball by ~28%.tsconfig.json:"sourceMap": true→"sourceMap": false;declarationMapstays enabled so go-to-definition remains functional for monorepo/git consumers.Confidence Score: 5/5
safe to merge — single-line build config change with no effect on runtime, auth, storage, or token-handling paths.
the only file touched is tsconfig.json, and the only effect is omitting .js.map files from the compiled output. declaration maps are preserved. the pr description documents build, pack-budget, and typecheck validation, and the pack-budget vitest suite (13/13) gates the exact metric this change affects. no windows filesystem, concurrency, or token-safety concerns are in scope.
no files require special attention.
Important Files Changed
sourceMapflipped fromtruetofalse;declarationMapremains enabled; reduces dist from 7.3 MB to 5.1 MB with no functional impact on runtime or library consumersReviews (1): Last reviewed commit: "build: stop shipping JS source maps; kee..." | Re-trigger Greptile