Repository navigation
A patch release with the fixes from an external code review and security audit of 3.2.0. It has no API changes, and every 3.2.0 app keeps working.
The main fixes:
- Cancelled navigations keep their history. In browsers with precommit handlers (Chromium), a guard that cancels a navigation leaves history untouched, including the Forward entries.
createApp(app, options)cleans up after itself. A failed startup undoes its own changes, so you can retry, and an interrupted one leaves a newer app alone.- Safer build tooling. Section and middleware discovery is stricter, and
quiver app --outrefuses to overwrite its inputs. - Stronger release process. The full checks now run on the release tag before anything is staged on npm.
The component recipe files are also PascalCase now (Link.js, Toasts.js, ThemeSwitcher.js), and the docs, READMEs and /add-* commands were audited against all of it.
npm i @go4cas/quiver@3.2.1 · arrow-use stays 0.1.2 · published with provenance
Fixed
@go4cas/quiver(3.2.0 audit S32-01, N211): two section folders that are one section, either differing only in the parameter name (pages/[id]/,pages/[slug]/) or spelled two ways in Unicode, each with a_middleware.js, are now a scan error naming both files. Before,quiver:appheld the section key twice and only one guard list ran. A convention folder that exists but can't be read (middleware/, a folder underpages/,app.config.js) is now an error instead of an empty folder; an absent one is still fine. A symbolic link to a.jsfile inlayouts/,middleware/orviews/, or a linked_middleware.js, is an error instead of being skipped. Same in the Vite plugin, the Bun plugin andquiver app@go4cas/quiverCLI (S32-03, N212):quiver app --outrejectsapp.config.jsand apages/**/_middleware.js(usage error, exit 2, with or without--watch), like the convention folders before. Bothquiver appandquiver routesnow replace an existing output file only when it is empty or starts with// Generated by Quiver.(every 3.x manifest does); any other file is left alone with a[quiver]error and exit 1. The temporary file is created exclusively under a random name, so concurrent writers each leave a complete manifest@go4cas/quiver(R32-05, N210): the build-timemetareader finds the real top-levelexport const meta =with a small tokenizer. A commented-outmeta, or one in a string, template, regular expression or block, no longer supplies the menu link; comments between the declaration's tokens work; a literal followed by more expression ({ … }.nav ? a : b,{ … } || x) is unreadable instead of read as its first object;export let/var metaandexport { meta }are unreadable. The "meta is not a plain literal" warning now looks fornav/layoutin the initializer only, not in the rest of the file@go4cas/quiverVite plugin (R32-06, N213): editing a page so that it names an unknown layout prints the warning in the terminal at once, without a reload; a warning that stays is not printed again, on edits or on the reload after ameta.navchange; a scan overtaken by a newer one reports nothing.quiver app --watchprints each warning once while it stays, too- Router (R32-01, N201): a navigation a guard cancels no longer loses history. Where the browser has the Navigation API's precommit handlers (Chromium), the guards for a link click,
go()or a replace run before the navigation commits, so a cancel leaves the URL, every history entry and the current position as they were (after going Back, the Forward entries stay), and a guard redirect commits once, at its target. Elsewhere, and for Back/Forward, the entry commits first and a cancel moves back, as before. In every browser, a cancel now keeps a fragment the browser set itself (#top,location.hash) instead of going back to the entry before it createApp(app, options)(R32-02, N202): a startup that fails after its router started, such as an error view that throws while mounting, now stops that router again and empties the target, so a retry on the same target works withoutdestroy(). Guards, hooks and keys provided before it are kept, as C-74 sayscreateApp(app, options)(R32-03, N203): a startup thatdestroy()interrupts rejects withcreateApp(): destroy() was called before this app mounted, so it was abandoned.and no longer removes config keys a newer app provided, even when the values are equal: undoing aprovide()now checks who wrote the key, not what the value is- Pages that return a
component()(R32-04, N204): events passed as the component call's second argument reach it again (emitwas a no-op), with and without a layout - Guard redirects (S32-02, N205): a redirect is parsed once, against the document's base URL, and the router checks and navigates to that parsed URL; its path is the one the next guards see
initRouter({ middleware })(R32-08, N206): a hole in aglobalor section guard array is rejected at startup with its index, instead of failing as an undefined guard during navigation- Link recipe (audit S32-02, N220): the policy now applies to the URL the browser resolves. Link parses the
hrefit renders againstdocument.baseURI; a path must land on this origin inside the app's base, and an absolute URL's parsed scheme must behttp(s):,mailto:ortel:. A target such as\evil.exampleor a tab before/evil.example, which passed the old string check and became//evil.exampleat the root base, now renders without anhref - Link recipe (audit R32-07, N220): the active state compares canonical segments, the way the router matches (percent-escapes decoded, Unicode NFC), so the generated menu link for
release notes.jsis current at/release%20notes; a query or hash intono longer stops a match and external URLs are never active.aria-current="page"is set only on an exact match; the newdata-activeattribute (pageorsection) marks the current link and the links to sections above it, and the layouts recipe styles[data-active], so the sidebar looks as before. An app styling[aria-current="page"]to highlight a parent section should switch to[data-active] - useForm recipe (audit R32-09, N221):
validateandonSubmitget one deep snapshot of the values that shares nothing withform, so an edit to a nested field during an asyncvalidateis neither submitted unvalidated nor lost (it stays for the next submit). Supported values are primitives and plain objects and arrays of them; anything else stops the submit with a message inform.message, andsubmittingis released - Recipe installs (audit R32-11, N222):
recipes/README.md("Existing files"), the docs and the/add-component,/add-composable,/add-layoutand/add-themecommands check every destination a recipe'sfileslists, copy only the missing ones and keep each existing file unless the owner asks to replace it. One existing file such assrc/layouts/menu.jsno longer counts as the whole recipe, so a customlayouts/default.jsstays whilemenu.js,layouts.css, the required recipes, packages and CSS lines are still added
Security
- CI (audit S32-05, N230): a release tag now runs the full check suite on the tagged commit before anything is staged on npm. The checks moved into a reusable workflow,
.github/workflows/checks.yml, whichTestsruns on pull requests andmainandPublishruns on each release tag; thestagejob needs it to pass. Dry runs still only pack. Check names are nowchecks / unit,checks / audit,checks / e2e,checks / browsers,checks / packandchecks / screenshots - Repository settings (S32-05):
.github/settings/holds themainruleset (pull requests, the six checks), the release-tag ruleset (admins only) and thenpmenvironment's tag policy, with the commands to apply them in RELEASING.md bun run audit(S32-04, N231): an accepted advisory that matches no locked version, or an exception naming a version the advisory doesn't match, now fails with a diagnostic instead of passing. The VitePress dev-server exceptions stay accepted until 2027-02-11- Docs (S32-06, N232): the app-config and middleware guides say that
app.config.js, layouts, views and middleware ship to the browser, and show a session checked on the server
Changed
- Tests (R32-10, N214): the CLI tests use the canonical temp directory (macOS
/var→/private/var) and wait for the child's streams to close before reading its output bun run pack:try(R32-12, N215): also buildstests/packed/bun-app, a smallquiver:appapp, with a realBun.build(splitting: true) against the packed tarballs, and checks in Chromium at/and/sub/app/its layout, the navigation frommeta.nav, a section guard, lazily loaded page chunks, and that a broken source folder fails the build with the scanner's message.examples/bunkeeps the manual setup- Recipes (D45, N200): component recipe files are PascalCase, like the app's own components:
link.js→Link.js,toasts.js/toasts.css→Toasts.js/Toasts.css,theme-switcher.js/theme-switcher.css→ThemeSwitcher.js/ThemeSwitcher.css, inrecipes/and where they install (src/components/). Recipe names,/add-*names and every export are unchanged. An app that already copied a recipe keeps working; to match, rename the files and fix the imports and the@importlines instyle.css - Starter:
src/components/holds only PascalCase files (Counter.js,UserCard.js,Link.js,Toasts.js,ThemeSwitcher.js) - Docs and both
AGENTS.md: the file-name convention per folder (components PascalCase; composables and state camelCase; pages, layouts, views and middleware lower-case or kebab-case), in "App structure and config"; a new repo test,tests/repo/naming.test.js, checks the starter and the recipes - Docs (3.2.1 docs audit, N240): the
/add-pagecommand no longer offers a'basic'layout orcreateApp({ layouts })registration, and/add-layoutin the AI guide and the plugin README no longer says it registers a layout; the routing guide'smeta.layoutcomment namessrc/layouts/, and itsLinkline and startup section, the app-structure guide and the Bun API page match 3.2.1 (data-active, what a failedcreateApp(app, options)undoes,quiver:appunder Bun); the examples page no longer calls the no-build manifest hand-written; the workflow guide's final page keeps itsmeta.nav; the migration guide gives the PascalCase recipe file names and a "Recipes copied from 3.2.0" section (aria-currenttodata-active); the layouts recipe page lists its real aliases; andREADME.md,CONTRIBUTING.md, the starter trees, the troubleshooting Node note and thelinkregistry description were brought up to date
Full changelog: v3.2.0...v3.2.1