Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"aria-current-matches-query",
"async-flash-decoder",
"base-path-segment-boundary",
"base-trailing-slash",
"chained-with-carries-all-args",
"claims-registry-sweep",
"claims-shared-location-parse",
Expand Down Expand Up @@ -45,6 +46,7 @@
"fs-server-pages",
"golf-client-entries-next31",
"hash-history-typed-paths",
"history-depth-capped-length",
"hydration-trusts-server-link-state",
"intent-preload-once-per-link",
"is-routing-native-pops",
Expand Down Expand Up @@ -72,6 +74,8 @@
"own-single-flight-and-nojs",
"paths-sibling-param-calls",
"pay-for-use-pending-state",
"peers-rc19",
"plain-href-link-claims",
"pluggable-link-preload",
"popular-pears-boil",
"preload-route-module",
Expand All @@ -87,6 +91,7 @@
"query-redirect-revalidate-pending",
"query-search-stability",
"query-ssr-response-headers",
"query-stale-write",
"rc9-server-function-action-url",
"reassert-claimed-state-after-morph",
"redirect-carrier-semantics",
Expand Down Expand Up @@ -125,10 +130,12 @@
"skip-non-http-anchor-links",
"solid-2-beta-router-migration",
"ssr-link-state",
"ssr-redirect-response-head",
"stamp-query-flights",
"static-render-history-fallback",
"submission-retry-promise",
"tap-viewport-eager-preload",
"template-anchor-url",
"typed-match-and-route-info",
"typed-search-params",
"update-solid-beta-18",
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @solidjs/router

## 2.0.0-next.43

### Patch Changes

- 7872c96: A `base` with a trailing slash, such as Vite's `import.meta.env.BASE_URL` (`"/app/"`), no longer produces double slashes. `Router.paths` hrefs and `navigate("/about")` now give `/app/about` instead of `/app//about`, which matched no route.
- 1865ccc: Stamp a pushed history entry's `_depth` as one above the current entry instead of `history.length - 1`. Browsers cap session history (50 entries in Chromium and Firefox), so once the cap was reached every new entry got the same depth. That broke scroll restoration and `useBeforeLeave` back-navigation deltas on long sessions. Entries the router did not push, such as a `#anchor` jump, are stamped one above the last known depth as well.
- d4c5e6e: Peer dependencies on `solid-js` and `@solidjs/web` move to `^2.0.0-rc.19`.
- ea3d8ba: Server link claims no longer parse a root-relative href with `URL` when its path and query only use characters `URL` keeps unchanged and it has no `.`/`..` segments, and `comparablePath` skips its parse for such paths. Other hrefs still go through `URL`. On a 1000-link SSR page this cuts the claims' cost per request from about 1.2 ms to about 0.4 ms.
- 8d2a9e4: `query.get` no longer returns a value from a fetch that was superseded. When an older fetch for a key settles after `revalidate()` started a newer one, or after `query.set` wrote a value, its result is no longer written over the newer value.
- 5f02d81: A server-side `navigate()` now writes its 302 status and `Location` header into the existing `event.response` instead of replacing the object. Headers already on the response, such as `Set-Cookie` and the flash-cookie clear, are kept, and a redirect issued after `createSSRResponse` captured the head still reaches it. Query redirects during SSR resolve `Location` against the router base as a result.
- 7488be9: Link preloading and click handling resolve an anchor's `href` against `document.baseURI`. An anchor cloned from a `<template>` keeps its raw `href` (e.g. `/about`) until it is adopted into the page, so `eagerPreload`'s idle flush threw `Invalid URL` when it reached one that a transition still held off the page (#704).

## 2.0.0-next.42

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Ryan Turnquist"
],
"license": "MIT",
"version": "2.0.0-next.42",
"version": "2.0.0-next.43",
"homepage": "https://github.com/solidjs/solid-router#readme",
"repository": {
"type": "git",
Expand Down