$ the-wire · showcase
Router skips in-component guards on the server; grammar tests get eyes
By RepoJournal · Filed · About Vue.js · Composed from the cited sources · methodology
vue-router fixed a memory leak that only appears with the shared matcher during SSR, while language-tools replaced scope-name text snapshots with rendered SVG images and expanded its grammar corpus to 50 fixtures.
fix(guards): skip in-component guards during SSR vuejs/router
With the `matcher` option, routers share route records, and `onBeforeRouteLeave`/`onBeforeRouteUpdate` registered during a server render were never removed because components do not unmount on the server; each request left a guard in memory that could run in a later request. Guards are now not registered outside the browser at all.
test(vscode): snapshot the TextMate grammars as SVG vuejs/language-tools
Grammar tests recorded a text snapshot of scope names, exact but unreadable as highlighting; the snapshot is now one SVG per fixture, so a grammar change shows up as an image diff on the pull request and can actually be reviewed.
test(vscode): a grammar corpus laid out by concern, with measured rule coverage vuejs/language-tools
The lone 19-file fixture directory mixing many concerns per file, with no visibility into gaps, is replaced by 50 fixtures split across `sfc/`, `script/`, `style/`, `template/` and `template-pug/`, with rule coverage measured at 95 of 109.
feat(unplugin): expose compilePathMatcher and comparePathScore vuejs/router
`vue-router/unplugin` now exports `compilePathMatcher` and `comparePathScore` at build time, so a framework can generate a `createFixedResolver()` module from routes that do not come from files (Nuxt pages with `definePageMeta` paths and aliases) without copying router internals.
feat(unplugin): expose compilePathMatcher and comparePathScore (#2982) vuejs/router
Alongside the new exports, static parts of parsed paths are now encoded for matching, so `definePage({ path: '/café' })` matches `/caf%C3%A9`, and paths that already contain encoded sequences like `/caf%C3%A9` keep matching. Also in this pass: pascal-case route names with encoded segments now decode correctly in the unplugin.