Skip to content

fix: align with htmljs-parser 5.18 - #608

Merged
DylanPiercey merged 3 commits into
mainfrom
dpiercey-ws-marko-invariants-jcdpv7-parserfixes
Sep 28, 2026
Merged

DylanPiercey merged 3 commits into
mainfrom
dpiercey-ws-marko-invariants-jcdpv7-parserfixes

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

Raises the htmljs-parser floor in language-tools and language-server to 5.18.0, which fixes several expression misparses: a type ending in void, a TypeScript non-null assertion (x!) ending an unenclosed value, delete as a prefix operator, and types in scriptlets.

The VS Code grammar follows the same rules. A ! directly after an operand (x!, f()!, x!!, "s"!) ends an attribute value, spread or tag variable type instead of continuing it as a prefix !. In a tag variable's type, void no longer takes the next attribute as its operand. delete x stays one value.

🤖 Generated with Claude Code

DylanPiercey and others added 3 commits September 28, 2026 09:03
Match htmljs-parser's operator rules in the grammar. A `!` directly after a
word, `)` or `]` is a non-null assertion, so it no longer continues an
attribute value, spread or tag variable type across whitespace; after a
keyword operator (`typeof!`, `in!`) it is still the prefix `!`. In a tag
variable's type `void` is the void type, so it neither continues the value
nor takes the next attribute as its operand. `delete` joins the prefix
keywords.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Match htmljs-parser: a `!` after another `!` (`x!!`) or after a closing
quote or backtick (`"s"!`) is a non-null assertion, so it ends an attribute
value, spread or tag variable type rather than continuing it as a prefix
`!`. A `!!` after an operator still continues.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Raise the parser floor in language-tools and language-server to the release
whose expression rules the grammar now follows, so the language server reads
templates the same way the highlighting does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d5fd054

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@marko/language-tools Patch
@marko/language-server Patch
marko-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: c0d02996-b3c3-4dbb-88c9-2b6b6735867e

📥 Commits

Reviewing files that changed from the base of the PR and between 9ba04d8 and d5fd054.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml and included by **
📒 Files selected for processing (5)
  • .changeset/htmljs-parser-5-18.md
  • .changeset/postfix-bang-type-void-highlighting.md
  • packages/language-server/package.json
  • packages/language-tools/package.json
  • packages/vscode/syntaxes/marko.tmLanguage.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


Walkthrough

The language server and language tools now use htmljs-parser ^5.18.0. Marko syntax rules recognize additional operators and keywords when identifying expression boundaries, and highlight void as a TypeScript primitive in tag-variable type annotations. Two changesets describe the parser and syntax-highlighting updates.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d5fd0

The parser and highlighting updates match the stated changes, with no concrete regression evidenced. The PR appears mergeable subject to normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the pull request aligns the project with htmljs-parser 5.18, which matches the main dependency and grammar changes.
Description check ✅ Passed The description accurately summarizes the dependency upgrade and the related parser and VS Code grammar fixes for void, non-null assertions, delete, and scriptlet types.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@DylanPiercey
DylanPiercey merged commit 6d1f577 into main Sep 28, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 28, 2026
@DylanPiercey DylanPiercey self-assigned this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant