sv-router 0.10.0 → 0.10.1

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.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Modern Svelte Routing",
5
5
  "keywords": [
6
6
  "svelte",
@@ -36,28 +36,28 @@
36
36
  "esm-env": "^1.2.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@changesets/cli": "^2.29.5",
40
- "@eslint/js": "^9.32.0",
41
- "@sveltejs/vite-plugin-svelte": "^6.1.0",
42
- "@testing-library/jest-dom": "^6.6.4",
39
+ "@changesets/cli": "^2.29.7",
40
+ "@eslint/js": "^9.36.0",
41
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
42
+ "@testing-library/jest-dom": "^6.9.0",
43
43
  "@testing-library/svelte": "^5.2.8",
44
44
  "@testing-library/user-event": "^14.6.1",
45
- "@types/node": "^24.2.0",
46
- "eslint": "^9.32.0",
45
+ "@types/node": "^24.6.0",
46
+ "eslint": "^9.36.0",
47
47
  "eslint-config-prettier": "^10.1.8",
48
48
  "eslint-plugin-simple-import-sort": "^12.1.1",
49
- "eslint-plugin-svelte": "^3.11.0",
49
+ "eslint-plugin-svelte": "^3.12.4",
50
50
  "eslint-plugin-unicorn": "^61.0.2",
51
- "globals": "^16.3.0",
52
- "happy-dom": "^18.0.1",
51
+ "globals": "^16.4.0",
52
+ "happy-dom": "^19.0.2",
53
53
  "prettier": "^3.6.2",
54
54
  "prettier-plugin-jsdoc": "^1.3.3",
55
55
  "prettier-plugin-svelte": "^3.4.0",
56
- "svelte-check": "^4.3.1",
56
+ "svelte-check": "^4.3.2",
57
57
  "type-testing": "^0.2.0",
58
58
  "typescript": "^5.9.2",
59
- "typescript-eslint": "^8.39.0",
60
- "vite": "^7.1.0",
59
+ "typescript-eslint": "^8.45.0",
60
+ "vite": "^7.1.7",
61
61
  "vitest": "^3.2.4"
62
62
  },
63
63
  "peerDependencies": {
@@ -242,7 +242,12 @@ export function onGlobalClick(event) {
242
242
  const anchor = /** @type {HTMLElement} */ (event.target).closest('a');
243
243
  if (!anchor) return;
244
244
 
245
- if (anchor.hasAttribute('target') || anchor.hasAttribute('download')) return;
245
+ if (
246
+ anchor.hasAttribute('target') ||
247
+ anchor.hasAttribute('download') ||
248
+ !anchor.hasAttribute('href')
249
+ )
250
+ return;
246
251
 
247
252
  const url = new URL(anchor.href);
248
253
  const currentOrigin = globalThis.location.origin;
@@ -216,7 +216,7 @@ export function createRouterCode(routes, routesPath, { allLazy = false, js = fal
216
216
  `import { createRouter } from 'sv-router';`,
217
217
  ...imports,
218
218
  '',
219
- `const routes = ${stringifiedRoutes};`,
219
+ `export const routes = ${stringifiedRoutes};`,
220
220
  ...(js ? [] : ['export type Routes = typeof routes;']),
221
221
  'export const { p, navigate, isActive, preload, route } = createRouter(routes);',
222
222
  '',