Skip to content

v2.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Sep 01:40
1fd9364

Validation now reads code the way the _hyperscript runtime reads element scripts, the shipped docs are corrected and parser-checked, and the editor-assist tools are hardened.

Upgrading

  • Default parse mode changed. validate_hyperscript and parse_hyperscript now read code as an element script (a program of features), the way the runtime parses _="…" attributes and <script type="text/hyperscript">. A bare command such as toggle .active, or an expression such as 1 + 2, is now reported invalid with a hint. Pass mode: "snippet" to validate fragments.
  • Node 22 or later is required.
  • main is removed from the package; it pointed at the server entry point, so importing the package started the server. Run the server through its bin, which is unchanged.

Changes

  • Verdicts match the runtime. Scripts that begin with set or js, or contain only comments, are now valid, as they are in the browser. Checked against _hyperscript running in Chromium: 41 cases, 0 mismatches.
  • Corrected docs and examples. Examples the parser rejected are fixed (focus/blur, scroll … into view, halt the default, while …, and others), and so are semantics the parser can't catch:
    • Dotted "modifiers" such as on click.once listen for an event literally named click.once.
    • you is the tell target, not the event target.
    • Conversions are case-sensitive (as JSON, not as json).
    • :name is element-scoped, not local.
  • Events guide rewritten around the real on modifiers: every, first, counts, [filter], from, elsewhere, in for delegation, debounced at, throttled at and queue. get_completions offers these instead of dotted modifiers. Every example the server ships is now parse-checked by the test suite.
  • Editor assist.
    • Bad input returns an isError tool result instead of a JSON-RPC internal error.
    • Completion context works: on offers events, toggle .active on offers targets, and results narrow to the word being typed.
    • get_document_symbols covers set, when, bind, live, install and js.
  • Error positions are filled in for end-of-input and tokenizer errors (line 1-based, column 0-based).
  • Input limit. Code over 100,000 characters is rejected, since parsing blocks the server.
  • AST view shows receivers and values that were hidden before, such as set's value and the unless condition.
  • Dependencies refreshed. npm audit reports 0 findings (was 9, 3 high). MCP SDK 1.30.1.

Notes

  • The first release cut by pushing a version tag: the Publish workflow publishes to npm and creates this release.
  • Published via GitHub Actions trusted publishing (OIDC) with provenance.

What's Changed

  • chore(ci): add Dependabot config, bump actions to v5 by @codetalcott in #2
  • fix(mcp-server): parse element scripts like the runtime; correct shipped docs; two-way drift test by @codetalcott in #21
  • Follow-up: remaining review items (tool hardening, positions, AST view, deps/CI) by @codetalcott in #22
  • chore(release): bump @hyperscript-tools/mcp-server to 2.9.0 by @codetalcott in #23
  • ci: publish and create the GitHub release when a version tag is pushed by @codetalcott in #24

Full Changelog: v2.8.0...v2.9.0