@ogygia/router
0.14.0 minor
@ogygia/router
Minor Changes
- #715
9604456Thanks @PuruVJ! -@ogygia/router,@ogygia/flags: Breaking:anonymousVisitor()returns{ vid, anonymous: true }and never fillssub, which stays a signed-in user's id (somount()never signs a cookie value onward as one). Flags hash onsub, elsevid(an anonymous visitor keeps its bucket), theog-vidcookie reaches a source as{ vid, anonymous: true }, and the defaultopenfeature()/ofrep()context sendsvidastargetingKeywhen there is nosub. Code that readc.visitor.subfor anonymous visitors readsc.visitor.vid; exposure events from them arrive without asub. - #1143
c9dc308Thanks @PuruVJ! -@ogygia/router: Breaking: when route patterns overlap, a path now resolves to the route SvelteKit would pick for the same files (an[[optional]]that is not last counts for nothing, so/[[lang]]/docsranks as/docs;/bbeats/b/[[page]]; ties go by route id, never table order), andCompiledPatternno longer has ascorefield. - #1842
b6b930eThanks @PuruVJ! - These methods are now typed as function properties, so passing one on by itself (const { handle } = router) type-checks underunbound-method; none of them usedthis. A method type was bivariant in its parameters and a function property is checked strictly, so code that assigned a narrower function to one of them may now need its parameter types widened. The changed types:ogygiaTransport.Region.encode/.decodeand the ref entry'sencode/decode(@ogygia/core),CapabilitySigner.sign/.verify(@ogygia/core),Router.handle(@ogygia/router),Signer.sign/.verifyandStaging.discard(@ogygia/machine).
Patch Changes
- #533
49ff074Thanks @PuruVJ! - -@ogygia/compiler: new package, ogygia's compiler and its Vite plugin:@ogygia/compiler(the compiler),@ogygia/compiler/vite(ogygia(),definePlugin) and@ogygia/compiler/ids. It uses core only through@ogygia/core/contract; core never depends on it. -@ogygia/core: breaking: the@ogygia/core/vite,@ogygia/core/internal/compilerand@ogygia/core/internal/compiler-idsimport paths are gone. Import fromogygia/vite(or@ogygia/compiler/vite),@ogygia/compilerand@ogygia/compiler/idsinstead; the names are the same. -@ogygia/core: the types of theogygia:*virtual modules and the build's switches are named in core (@ogygia/core/contract), so core's own types no longer reach into the compiler. -ogygia:ogygia/vite,ogygia/internal/compilerandogygia/internal/compiler-idsre-export@ogygia/compiler; apps change nothing. -@ogygia/barrels,@ogygia/cli,@ogygia/content,@ogygia/devtools,@ogygia/federation,@ogygia/flags,@ogygia/postrender,@ogygia/router: they takedefinePluginand the compiler from@ogygia/compiler, a new peer dependency (ogygiabrings it). - #1142
2ea1252Thanks @PuruVJ! -href(),api()andentries()write a route's URL as Kit does: a[...rest]value keeps its slashes (each segment encoded, no more%2F), and an empty[[optional]]or[...rest]segment is dropped (/a/b, not/a//b). A rest value with an empty piece (a leading, trailing or doubled/) or a./..piece throws, and so does a param that fills a segment other than the last one empty, so a filled URL never names another origin or another route. - #1457
620d27eThanks @PuruVJ! - The head's end is found as the browser reads it: anapp.htmlthat writes</HEAD>gets ogygia's head injections, and a</head>inside a head script's text (a JSON-LD string) no longer takes them into the script. The body's end is found in any case. - #878
08fd293Thanks @PuruVJ! - A streamed page whose head closes as</head >(space or newline before>) gets its late boot, and a comment naming</head>before the page no longer takes it. - #1100
4dfe7a7Thanks @PuruVJ! -api(),href()andentries()throw on a param of.or..that fills a whole path segment, instead of building a URL that names another route (/users/[id]/deletewithid: '..'asked/delete). - #700
ff753ffThanks @PuruVJ! -@ogygia/router: a route segment with several params ([a]-[b]-[c]) matches in time in line with the path, and splits as SvelteKit's lazy params do (/x-y-zon[a]-[b]givesa: 'x',b: 'y-z';/p-q-x-ron[a]-x-[b]givesa: 'p-q',b: 'r'). Paths longer than 8192 characters match no route. - #1186
033654aThanks @PuruVJ! - A route load that fails runs once per request: the error page no longer runs it again to find the failed layout (its side effects ran twice, and a flaky load that passed the second time put the error page in the wrong layout). A later call to the same load in that request gets the same failure. - #1760
770cbb4Thanks @PuruVJ! -c.json()andc.text()keep the headers they are given as aHeadersobject or as pairs, and aContent-Typeyou pass (in any case) replaces the default instead of joining it. - #701
a0a50edThanks @PuruVJ! -@ogygia/router: the trailing-slash redirect (slash: 'never' | 'always') always points at a path on this origin: itsLocationstarts with exactly one/and holds no\. - #1227
69bd68dThanks @PuruVJ! - A form POST naming an action the page does not have (?/deleteon a page with onlydefault) now answers 404, as in Kit. It ran the default action instead.
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]
0.13.0 minor
@ogygia/router
Patch Changes
- #226
019b77eThanks @PuruVJ! - A streamed page drains its late regions until nothing new registers: a late region that resolves to a region holding another promise region streams that one down the same response too, instead of leaving an empty slot nothing fills (#199). - #321
17e009aThanks @PuruVJ! -api()rejects when a successful answer's JSON body does not parse, instead of resolvingundefined. - #306
8b33368Thanks @PuruVJ! - A streamed page whose visitor leaves stops: its generator and every late-region source end, and nothing more renders (#284). - #321
17e009aThanks @PuruVJ! - A streamed page's source whose cleanup throws as the visitor leaves now printsrequest_cleanup_failedwith the error, instead of nothing. - #184
1767110Thanks @PuruVJ! - Packages declaresideEffects(only their.cssfiles run on import), so bundlers drop the modules an app never uses.
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]
0.12.0 minor
@ogygia/router
Updated dependencies: @ogygia/[email protected]
0.11.0 minor
@ogygia/router
Updated dependencies: @ogygia/[email protected]