Skip to content

feat: top-level declarations from transform.#91

Merged
knightedcodemonkey merged 2 commits intomainfrom
bananas
Mar 28, 2026
Merged

feat: top-level declarations from transform.#91
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 28, 2026 15:51
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 91.93548% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.05%. Comparing base (af5d069) to head (7c8a94c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/transform.ts 91.93% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   87.85%   88.05%   +0.20%     
==========================================
  Files          26       26              
  Lines        2107     2169      +62     
  Branches      584      607      +23     
==========================================
+ Hits         1851     1910      +59     
- Misses         83       84       +1     
- Partials      173      175       +2     

☔ 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
Copy Markdown

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

Adds an opt-in capability to transformJsxSource() to collect metadata about top-level declarations (functions/classes/variables), including export kind and source ranges.

Changes:

  • Extend transformJsxSource() options/result to support collectTopLevelDeclarations and return declarations metadata.
  • Implement AST walking to collect top-level declaration metadata, including initializer kind and statement vs node ranges.
  • Add/extend tests for declaration collection behavior and bump package version to 1.11.0.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/transform.ts Adds new option/types and collects top-level declaration metadata from the parsed AST.
test/transform.test.ts Adds coverage for declaration collection (success + parser-error path) and option validation.
package.json Bumps package version to 1.11.0.
package-lock.json Updates lockfile version metadata to match 1.11.0.

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

Comment thread test/transform.test.ts Outdated
@knightedcodemonkey knightedcodemonkey merged commit 4b41dd3 into main Mar 28, 2026
7 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 28, 2026 16:00
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