Skip to content

fix: overlapping edits when transpiling with stripped types.#86

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

fix: overlapping edits when transpiling with stripped types.#86
knightedcodemonkey merged 2 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 22:38
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.21%. Comparing base (720732c) to head (890cf7e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/transpile.ts 80.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
- Coverage   88.51%   88.21%   -0.31%     
==========================================
  Files          25       25              
  Lines        1986     2019      +33     
  Branches      540      547       +7     
==========================================
+ Hits         1758     1781      +23     
- Misses         72       77       +5     
- Partials      156      161       +5     

☔ 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

Adds a more robust TypeScript “strip” pipeline by iterating TS-syntax removal until stable, enabling removal of chained casts around JSX output.

Changes:

  • Add multi-pass TypeScript stripping (stripTypeScriptSyntax) to handle nested/chained TS wrapper nodes.
  • Refactor transpileJsxSource to perform JSX compilation first, then run TS stripping on the generated code when typescript: 'strip'.
  • Add a regression test for chained TS casts around JSX expressions; bump package version to 1.9.2.

Reviewed changes

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

File Description
test/transpile.test.ts Adds coverage for chained as casts around a JSX expression in strip mode.
src/transpile.ts Introduces iterative TS stripping and refactors JSX/TS strip flow.
package.json Bumps package version to 1.9.2.
package-lock.json Updates lockfile version fields to match 1.9.2.

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

@knightedcodemonkey knightedcodemonkey merged commit 246f74c into main Mar 16, 2026
4 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 16, 2026 22:54
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