JavaScript and TypeScript, JSX included, are read by TypeScript's parser for comment-only changes (PIPT-76) #332
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/pipeline-templates!332
Loading…
Reference in a new issue
No description provided.
Delete branch "comment-jsx"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/PIPT-76
Follows the comment-only change (#316). Its hand-written lexer couldn't tell JSX's text (
<a>http://x</a>) from a comment, so every.tsxand.jsxfile, and JavaScript that might hold JSX, still built on a comment edit.What changes
typescript@6.0.3to the suites' dependencies (about 24 MB). 6.0 is the last TypeScript whose parser is a stable JavaScript API; 7.0's is the native compiler's, marked unstable.comments.mjsreads JavaScript and TypeScript, JSX included, with TypeScript's parser: the code is the syntax tree with each token's exact text, and comments a tool reads stay in it. A file with a syntax error counts whole.@deprecatednow counts as code. The independent check below found TypeScript marks it on the node, and a lint rule can refuse a deprecated use. #316's lexer, live now, treated it as a plain comment in.tsfiles; this fixes that.Verified: all 2,025 JavaScript and TypeScript files in the fleet's local clones are now read (none counted whole,
.tsxincluded). With every dropped comment's letters changed, TypeScript 5.9's parser (a separate copy) gives the same tree, kinds, texts, operators and flags, for all 1,562 files that have comments.🤖 Generated with Claude Code
merge-queue stopped this at
61d2404: CI failed: CI / setup-windows (pull_request). Push a fix. A failure fixed on main lands once thequeuelabel is removed and added again: the queue merges main in and CI runs on the new head.