feat(type-parsing): use typescript#887
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 85.04% 85.75% +0.70%
==========================================
Files 179 186 +7
Lines 16496 17162 +666
Branches 1500 1552 +52
==========================================
+ Hits 14029 14717 +688
+ Misses 2457 2436 -21
+ Partials 10 9 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| current.textRaw = transformNodesToString( | ||
| child.children.filter(node => node !== subList) | ||
| ) | ||
| .replace(/\s+/g, ' ') | ||
| .replace(/<!--.*?-->/gs, ''); |
| // Shiki tokenizes `vm`, `.`, `Module` separately; the whole range links | ||
| const anchors = html.match(/href="vm.html#class-module"/g); | ||
| assert.ok(anchors.length >= 1); | ||
| assert.match(html.replace(/<[^>]+>/g, ''), /^vm\.Module$/); |
PR SummaryMedium Risk Overview Parsing: A new Remark/micromark extension turns balanced Resolution: Rendering: Rehype handlers emit Reviewed by Cursor Bugbot for commit 046386f. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The diff was too big to leave as a comment |
There was a problem hiding this comment.
This changes the version of the spec right? How have we been handling this?
There was a problem hiding this comment.
This would be the first change to the spec, however, it's more of a change in wording that behavior. The only behavioral change is that {string}|{boolean} must now be {string|boolean}. Previously, the spec didn't explicitly say whether to do this or not to do this, now it explicitly says to keep all types with the {...} brackets.
There was a problem hiding this comment.
1.0.0 -> 1.1.0 sounds good?
There was a problem hiding this comment.
i am less concerned if we think its still valid 1.0.0 due to omission - but we should develop some governance over what constitutes a change. imagine semver would work in moooooooost cases
|
@bmuenzenmeyer i ended up patching instead of minoring since we previously claim to support these types and similar ones, and this is more of an improvement on that claim than a new feature of the spec. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 046386f. Configure here.
| }); | ||
| } else { | ||
| pending.push(node); | ||
| } |
There was a problem hiding this comment.
Whole-value lookup skips TypeScript
Medium Severity
Before batch TypeScript parsing, a non-empty lookupTypeName result treats the entire annotation as one link. That helper also hits built-in and MDN maps, not just the toolchain type map. Annotations that are not valid TypeScript but match those keys (e.g. display-style names in the built-in map) skip parsing, emit no invalid-annotation warning, and render as a single link instead of plain unlinked code per the spec.
Reviewed by Cursor Bugbot for commit 046386f. Configure here.


Uh oh!
There was an error while loading. Please reload this page.