Skip to content

chore: remove declarationMap and restrict published files#29

Merged
sv2dev merged 1 commit intomainfrom
chore/package-cleanup
Apr 2, 2026
Merged

chore: remove declarationMap and restrict published files#29
sv2dev merged 1 commit intomainfrom
chore/package-cleanup

Conversation

@sv2dev
Copy link
Copy Markdown
Owner

@sv2dev sv2dev commented Apr 2, 2026

Summary

  • Remove declarationMap: true from root tsconfig.json — declaration maps are not needed for consumers
  • Add files field to both esroute and @esroute/lit packages to only publish dist/, LICENSE, and README.md, excluding tsconfig.check.json, tsconfig.tsbuildinfo, and source files

Test plan

  • Run npm run build and confirm no .d.ts.map files in dist/
  • Run npm pack --dry-run in each package and confirm only dist/, LICENSE, and README.md are included

Summary by CodeRabbit

  • Chores
    • Optimized published packages to include only essential files (distribution, license, and documentation), reducing download size and improving installation efficiency
    • Refined TypeScript build configuration for streamlined compilation

Remove declarationMap from tsconfig as declaration maps are not needed.
Add files field to both packages to exclude tsconfig.check.json,
tsconfig.tsbuildinfo, and src from the published npm package.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c7e3faee-5bf3-48e0-b8fa-57c6e8686c2d

📥 Commits

Reviewing files that changed from the base of the PR and between c4f2f06 and d0da69f.

📒 Files selected for processing (3)
  • packages/esroute-lit/package.json
  • packages/esroute/package.json
  • tsconfig.json
💤 Files with no reviewable changes (1)
  • tsconfig.json

Walkthrough

The changes update build and publication configuration for the monorepo. Two package.json files now explicitly specify publishable contents, and the TypeScript configuration disables declaration map generation during compilation.

Changes

Cohort / File(s) Summary
Package Publication Configuration
packages/esroute-lit/package.json, packages/esroute/package.json
Added files field to restrict published package contents to dist, LICENSE, and README.md.
TypeScript Build Configuration
tsconfig.json
Removed declarationMap: true option, disabling generation of declaration map files for TypeScript declarations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 Hops through the config with glee,
Files now lean, trim, and light,
Maps removed, declarations pure,
Packages published just right!
ʕ•́ ω •̀ʔ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the two main changes: removing declarationMap from tsconfig.json and adding files fields to restrict package contents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 chore/package-cleanup

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.

@sv2dev sv2dev merged commit 946ed34 into main Apr 2, 2026
2 checks passed
@sv2dev sv2dev deleted the chore/package-cleanup branch April 2, 2026 11:45
@coderabbitai coderabbitai bot mentioned this pull request Apr 2, 2026
1 task
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