Skip to content

fix(core): tolerate unmapped computed method brackets - #4

Merged
trueadm merged 1 commit into
mainfrom
fix/computed-method-source-maps
Aug 26, 2026
Merged

trueadm merged 1 commit into
mainfrom
fix/computed-method-source-maps

Conversation

@trueadm

@trueadm trueadm commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • skip the optional computed-bracket diagnostic mapping when Esrap emits no boundary markers
  • retain the key and method mappings
  • cover computed object methods in every shared target mapping suite

Validation

  • pnpm exec vitest run --project tsrx-react --project tsrx-preact --project tsrx-solid --project tsrx-vue packages/tsrx-react/tests/basic.test.js packages/tsrx-preact/tests/basic.test.js packages/tsrx-solid/tests/basic.test.js packages/tsrx-vue/tests/basic.test.js
  • pnpm exec tsgo --noEmit -p packages/tsrx/tsconfig.json
  • pnpm changeset:check

Note

Low Risk
Localized guard in source-map mapping logic with a regression test; no auth, data, or runtime behavior changes.

Overview
Virtual TypeScript / Volar mapping generation no longer crashes when Esrap’s printer source map omits markers at the [ / ] columns around a computed object method (e.g. { [method]() { … } }).

In set_bracket_computed_mapping, the optional diagnostic mapping that widens the span to include computed brackets is skipped when src_to_gen_map has no entry for the bracket-adjacent positions; mappings for the key and method body are unchanged.

A shared source-mappings regression test covers computed object methods alongside the existing computed object key case.

Reviewed by Cursor Bugbot for commit 101b27e. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tsrx-website Ready Ready Preview Aug 26, 2026 6:27pm
tsrx-website-mcp Ready Ready Preview Aug 26, 2026 6:27pm

Request Review

@trueadm
trueadm merged commit 6c34d7d into main Aug 26, 2026
9 checks passed
@trueadm
trueadm deleted the fix/computed-method-source-maps branch August 26, 2026 19:58
@github-actions github-actions Bot mentioned this pull request Aug 26, 2026
leonidaz added a commit that referenced this pull request Sep 16, 2026
* fix(grammar): recognize multiline JSX expression boundaries

* fix(intellij): align embedded JSX member roles

* chore: publish JSX highlighting parity

* fix(review): apply review findings

* fix(ci): make highlighting fixtures format-stable

* Address PR review feedback (#101)

- avoid the key probe's fixture identifier collision

* feat(intellij): analyze rainbow bracket structure

* feat(intellij): integrate optional Rainbow Brackets

* test(intellij): prove Rainbow Brackets integration

* docs(intellij): document Rainbow compatibility

* perf(intellij): keep rainbow highlighting linear

* fix(review): apply rainbow findings #1-#4

* docs(plan): record Rainbow Brackets delivery

* fix(intellij): preserve nested JSX and align rainbow color cycles

* chore: remove local Rainbow Brackets plan

* style(intellij): format Rainbow Brackets fixture

* test(intellij): use implicit output in template fixtures

---------

Co-authored-by: Leonidas <[email protected]>

This branch was successfully deployed

2 active deployments
Preview – tsrx-website — 101b27ee Deployed Aug 26, 2026 by vercel[bot]
Preview – tsrx-website-mcp — 101b27ee Deployed Aug 26, 2026 by vercel[bot]
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