sv-router 0.16.2 → 0.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sv-router",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "Type-safe routing for Svelte SPAs",
5
5
  "keywords": [
6
6
  "router",
@@ -41,22 +41,22 @@
41
41
  "@testing-library/jest-dom": "^6.9.1",
42
42
  "@testing-library/svelte": "^5.3.1",
43
43
  "@testing-library/user-event": "^14.6.1",
44
- "@types/node": "^24.12.3",
45
- "@vitest/coverage-v8": "^4.1.5",
46
- "eslint": "^10.3.0",
44
+ "@types/node": "^24.12.4",
45
+ "@vitest/coverage-v8": "^4.1.7",
46
+ "eslint": "^10.4.0",
47
47
  "eslint-config-prettier": "^10.1.8",
48
48
  "eslint-plugin-simple-import-sort": "^13.0.0",
49
- "eslint-plugin-svelte": "^3.17.1",
49
+ "eslint-plugin-svelte": "^3.18.0",
50
50
  "eslint-plugin-unicorn": "^64.0.0",
51
51
  "globals": "^17.6.0",
52
52
  "happy-dom": "^20.9.0",
53
- "oxfmt": "^0.49.0",
53
+ "oxfmt": "^0.52.0",
54
54
  "svelte-check": "^4.4.8",
55
55
  "type-testing": "^0.2.0",
56
56
  "typescript": "^6.0.3",
57
- "typescript-eslint": "^8.59.2",
58
- "vite": "^8.0.11",
59
- "vitest": "^4.1.5"
57
+ "typescript-eslint": "^8.60.0",
58
+ "vite": "^8.0.14",
59
+ "vitest": "^4.1.7"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "svelte": "^5"
@@ -229,8 +229,9 @@ export async function onNavigate(path, options = {}) {
229
229
  const matchPath = getMatchPath(path);
230
230
  const { match, layouts, hooks, meta: newMeta, params: newParams } = matchRoute(matchPath, routes);
231
231
 
232
- const search = parseSearch(options.search);
233
- const hooksContext = { pathname: matchPath, meta: newMeta, ...options, search };
232
+ const navContext = path ? options : { ...options, ...updatedLocation() };
233
+ const search = parseSearch(navContext.search);
234
+ const hooksContext = { ...navContext, pathname: matchPath, meta: newMeta, search };
234
235
 
235
236
  let errorHooks = [];
236
237
  for (const hook of hooks) {
@@ -68,7 +68,7 @@ function resolveRouteComponent(input) {
68
68
 
69
69
  /**
70
70
  * @param {unknown} input
71
- * @returns {input is import("../index.d.ts").LazyRouteComponent}
71
+ * @returns {input is import('../index.d.ts').LazyRouteComponent}
72
72
  */
73
73
  export function isLazyImport(input) {
74
74
  return (