Skip to content

Volt 0.19: oxc 0.18, the error overlay, and priv npm vendoring - #42

Merged
dannote merged 15 commits into
masterfrom
volt-0.19
Sep 30, 2026
Merged

dannote merged 15 commits into
masterfrom
volt-0.19

Conversation

@dannote

@dannote dannote commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Volt 0.19: moves to oxc 0.18.1, vize 0.15, quickbeam 0.11.2, and json_codec 0.3, and reworks the development error overlay.

oxc 0.18 migration (breaking)

  • Lint results are OXC.Diagnostic maps with :error/:warning severities and line/column positions. Parse errors are diagnostics too.
  • Lint :plugins, :env, and :globals take string names, as in an oxlint config. Atom names raise an ArgumentError.
  • Custom lint rules report start/end instead of span, and Imports.rewrite!/3 raises OXC.Error.
  • Type-aware checks run the type-aware rules that categories such as "correctness" select (fix: apply lint categories to type-aware checks #41).

Error overlay

  • The dev server keeps the current errors per session and replays them to clients that connect. It also adds the HMR client to rendered HTML pages, so the overlay appears on a fresh page load.
  • <volt-error-overlay> renders with lit-html into a Shadow DOM. It shows the file, line, column, a source frame, hint, and stacktrace, and hides once the errors are fixed.
  • The source frame is highlighted with the optional lumis dependency and its parser packages.
  • Volt.HMR.error/3 accepts messages, exceptions, and diagnostics and takes a :title. Volt.HMR.clear_error/2 hides the errors. The page reloads after the HMR connection returns.

Browser code with npm packages

  • mix volt.priv.vendor vendors npm packages for priv browser code into priv/<root>/node_modules, keeping only the files the sources reach. That directory is kept out of git and generated by mix setup, CI, and the hex.build/hex.publish aliases.
  • Volt.Priv.bundle!/3 bundles a priv entry with the vendored packages, and vendors on first use in a git or path checkout.

Testing

  • mix lint and mix test pass (724 tests).
  • I checked the overlay in a browser with the vanilla example and an Astral site: on page load and live during HMR, at desktop and phone widths, with Lumis highlighting, and clearing after the fix.

Closes #40.

Lint diagnostics are OXC.Diagnostic maps, and lint plugin, environment,
and global names are strings. Type-aware checks extract component
scripts with the configured Volt plugins.
The dev server keeps the current errors per session, replays them to
clients that connect, and adds the HMR client to rendered HTML pages so
the overlay still appears when a page's module graph fails to load. The
overlay shows file, line, column, and a source frame, hides once errors
are fixed, and the page reloads after the HMR connection returns.
dannote and others added 12 commits September 30, 2026 11:17
Rebased onto Volt 0.19: batches group files by the rules
OXC.Lint.type_aware_rules/1 resolves, without a category list here.

Co-authored-by: Danila Poyarkov <dev@dannote.net>
The page showed through the translucent backdrop and competed with the
error text.
With Lumis and a parser package for the file's language, error entries
carry frame_html: the whole file is highlighted so multi-line tokens keep
their colors, and the frame keeps Volt's gutter, marker, and caret.
Without them the frame stays plain text.
A deep purple panel with the logo's purple-to-cyan gradient bar, the
drop and bolt mark in the header, and matching frame colors.
… lit-html

mix volt.priv.vendor installs the packages a priv package.json lists and
keeps only the files the sources reach, so they ship in the Hex package.
Volt.Priv.bundle!/3 bundles a priv entry with them. The error overlay is
a <volt-error-overlay> element rendered with lit-html into a Shadow DOM,
so app styles cannot affect it, and it no longer shows the logo.
priv/ts/node_modules is ignored. mix setup, CI, and hex.build and
hex.publish vendor it, and Volt.Priv.bundle/3 vendors on first use in a
git or path checkout. mix volt.priv.vendor drops --check.
Compiling the project to vendor unloads Hex's own modules, so the aliases
run mix volt.priv.vendor with cmd.
fix: apply lint categories to type-aware checks
@dannote dannote changed the title Volt 0.19: oxc 0.18 diagnostics and development error overlay Volt 0.19: oxc 0.18, the error overlay, and priv npm vendoring Sep 30, 2026
@dannote
dannote merged commit 40c6906 into master Sep 30, 2026
2 checks passed
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.

Lint categories do not enable type-aware rules

2 participants