Skip to content

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 3, 2026 03:14
@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 86.04651% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.40%. Comparing base (916cb79) to head (7b5a96c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/cli.ts 75.21% 28 Missing and 1 partial ⚠️
src/module.ts 97.95% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   93.76%   93.40%   -0.37%     
==========================================
  Files          26       26              
  Lines        4986     5167     +181     
  Branches     1114     1140      +26     
==========================================
+ Hits         4675     4826     +151     
- Misses        277      306      +29     
- Partials       34       35       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds source map support to the module transformation system, allowing users to generate source maps alongside transformed code. The feature integrates with both the programmatic API and CLI, supporting inline maps for stdout and sidecar .map files for file outputs.

Key changes:

  • Added sourceMap option to ModuleOptions with function overloads for type-safe return values
  • Refactored format and specifier rewriting to preserve MagicString instances for map generation
  • Added CLI flags --source-map and --source-map=inline with validation

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/types.ts Adds sourceMap?: boolean option to ModuleOptions
src/format.ts Adds function overloads and returns MagicString when sourceMap is true; refactors top-level await wrapping to use prepend/append
src/specifier.ts Adds updateMagicString method and refactors formatSpecifiers to accept optional MagicString
src/module.ts Adds transform function overloads and generates source maps from MagicString; conditionally returns {code, map} object
src/cli.ts Implements --source-map and --source-map=inline CLI support with inline and sidecar map output
test/module.ts Adds test validating source map generation in transform API
test/cli.ts Adds tests for inline maps to stdout, sidecar maps with out-dir, and error validation for inline+out-dir combination
docs/cli.md Documents --source-map CLI option
README.md Documents sourceMap option in API reference
docs/roadmap.md Removes source map feature from roadmap (now implemented)
package.json Version bump to 1.5.0-rc.0
package-lock.json Updates version to match package.json

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit 0433589 into main Jan 3, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch January 3, 2026 04:11
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