Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build: stop shipping JS source maps; keep declaration maps - #527

Merged
ndycode merged 1 commit into
mainfrom
claude/audit-12-sourcemap-trim
Jun 10, 2026
Merged

ndycode merged 1 commit into
mainfrom
claude/audit-12-sourcemap-trim

Conversation

@ndycode

@ndycode ndycode commented Jun 10, 2026

Copy link
Copy Markdown
Owner

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-line tsconfig.json change.

Impact

Metric Before After
dist/ unpacked 7.3 MB 5.1 MB (−30%)
Packed tarball 1,022,395 bytes 731,570 bytes (−28%)
Files in tarball 1,101 836
.js.map shipped 266 0
.d.ts.map (kept) 266 266

JS source maps were dead weight in the published package: the tarball ships dist/ without lib/ sources, so the maps could never resolve for consumers, and nothing in lib/, scripts/, tests, or docs references .js.map or --enable-source-maps. Declaration maps stay because go-to-definition works for monorepo/git consumers.

Validation

  • npm run build clean; zero .js.map in dist, all 266 .d.ts.map intact
  • node scripts/check-pack-budget.mjs — Pack budget ok (731,570 bytes / 836 files)
  • npx vitest run test/check-pack-budget.test.ts — 13/13
  • npm run typecheck

Risk / Rollback

Build-output-only change; revert the single commit to restore maps. Local debugging is unaffected (tsc --sourceMap or 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.map files and cuts the published tarball by ~28%.

  • tsconfig.json: "sourceMap": true"sourceMap": false; declarationMap stays enabled so go-to-definition remains functional for monorepo/git consumers.
  • no runtime, auth, storage, or token-handling paths are touched; the change is fully reversible with a single-commit revert.

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

Filename Overview
tsconfig.json single-line change: sourceMap flipped from true to false; declarationMap remains enabled; reduces dist from 7.3 MB to 5.1 MB with no functional impact on runtime or library consumers

Reviews (1): Last reviewed commit: "build: stop shipping JS source maps; kee..." | Re-trigger Greptile

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
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f2656f8b-b0a8-4d2b-b54b-420b62f65f0d

📥 Commits

Reviewing files that changed from the base of the PR and between 98d9819 and 0cbbaed.

📒 Files selected for processing (1)
  • tsconfig.json
📜 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)
  • GitHub Check: Greptile Review
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

**: # PROJECT KNOWLEDGE BASE

Generated: 2026-04-25
Commit: a87e005
Branch: main
Package version: 2.2.0

OVERVIEW

codex-multi-auth is a Codex CLI-first OAuth account manager and optional forwarding wrapper for the official Codex CLI. The installed codex-multi-auth entrypoint handles account-management commands locally, codex-multi-auth-codex forwards official Codex commands through this package's wrapper when explicitly used, and runtime rotation can route live Responses traffic through a localhost account-rotation proxy by default. The plugin-host entrypoint remains exported for compatibility, but the primary product surface is the account manager, optional wrapper, storage, runtime proxy, and repair tooling.

STRUCTURE

./
├── scripts/
│   ├── codex.js              # codex-multi-auth-codex wrapper, official CLI forwarder, shadow CODEX_HOME/runtime proxy setup
│   ├── codex-multi-auth.js   # standalone package CLI entrypoint
│   ├── codex-routing.js      # auth command and compatibility alias routing
│   ├── codex-bin-resolver.js # official Codex binary discovery
│   ├── codex-app-router.js   # persistent localhost router for packaged Codex app bind
│   └── codex-app-launcher.js # reversible user-level app launcher routing helper
├── index.ts                  # optional plugin-host runtime entry
├── lib/                      # core runtime logic (see lib/AGENTS.md)
│   ├── auth/                 # OAuth flow, PKCE, callback server
│   ├── runtime/              # Codex CLI/app integration helpers, app bind, live sync, runtime observability
│   ├── request/              # request transform, SSE, failover, backoff
│   ├── storage/              # path resolution, migrations, backups, restore, import/export
│   ├── codex-cli/            # Codex CLI state sync and writer helpers
│   ├── codex-manager/        # command modules and settings panels
│   ├── prompts/              # model-family prompts, GitHub ETag cache
│   ├── recovery/             # conve...

Files:

  • tsconfig.json
🔇 Additional comments (1)
tsconfig.json (1)

21-21: LGTM!


📝 Walkthrough

Summary

This 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.

Changes

tsconfig.json: Disabled JavaScript source map emission (sourceMap: false) while keeping TypeScript declaration map support. This eliminates the 266 .js.map files shipped in the tarball, which cannot resolve since the dist/ distribution excludes source lib/ files.

Impact

  • Package size reduction: 28% tarball savings (1.02 MB → 731 KB); 30% unpacked dist/ reduction (7.3 MB → 5.1 MB)
  • File count: 1,101 → 836 files in tarball
  • Consumer experience: Declaration maps preserved for monorepo and git consumers; local development unaffected (vitest transforms and tsc --sourceMap still available)

Validation

  • Build passes with zero .js.map files; all 266 .d.ts.map files present
  • Pack budget test passes; vitest suite: 13/13 pass
  • Typecheck completed successfully
  • No exported APIs or public types affected

Walkthrough

TypeScript compiler option sourceMap changed from true to false in tsconfig.json:21, disabling source map file generation during builds. No other compiler options, paths, or build configuration modified.

Changes

Build Configuration Update

Layer / File(s) Summary
Disable source map generation
tsconfig.json
compilerOptions.sourceMap toggled from true to false, preventing .js.map file generation during TypeScript compilation.

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)
Check name Status Explanation
Title check ✅ Passed title follows conventional commits format with type 'build', scope omitted, and lowercase imperative summary under 72 chars.
Description check ✅ Passed description covers summary, impact metrics, validation steps, and risk/rollback plan; however, missing structured validation checklist checkboxes and docs governance checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/audit-12-sourcemap-trim
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/audit-12-sourcemap-trim

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ndycode
ndycode merged commit 2255b5d into main Jun 10, 2026
2 checks passed
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.

2 participants