@solidjs/router 0.10.8 → 0.10.9

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/dist/index.js CHANGED
@@ -255,7 +255,10 @@ function createRoutes(routeDef, base = "") {
255
255
  return asArray(routeDef.path).reduce((acc, path) => {
256
256
  for (const originalPath of expandOptionals(path)) {
257
257
  const path = joinPaths(base, originalPath);
258
- const pattern = isLeaf ? path : path.split("/*", 1)[0];
258
+ let pattern = isLeaf ? path : path.split("/*", 1)[0];
259
+ pattern = pattern.split("/").map(s => {
260
+ return s.startsWith(':') || s.startsWith('*') ? s : encodeURIComponent(s);
261
+ }).join("/");
259
262
  acc.push({
260
263
  ...shared,
261
264
  originalPath,
package/dist/routing.js CHANGED
@@ -67,7 +67,10 @@ export function createRoutes(routeDef, base = "") {
67
67
  return asArray(routeDef.path).reduce((acc, path) => {
68
68
  for (const originalPath of expandOptionals(path)) {
69
69
  const path = joinPaths(base, originalPath);
70
- const pattern = isLeaf ? path : path.split("/*", 1)[0];
70
+ let pattern = isLeaf ? path : path.split("/*", 1)[0];
71
+ pattern = pattern.split("/").map((s) => {
72
+ return (s.startsWith(':') || s.startsWith('*')) ? s : encodeURIComponent(s);
73
+ }).join("/");
71
74
  acc.push({
72
75
  ...shared,
73
76
  originalPath,
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "Ryan Turnquist"
7
7
  ],
8
8
  "license": "MIT",
9
- "version": "0.10.8",
9
+ "version": "0.10.9",
10
10
  "homepage": "https://github.com/solidjs/solid-router#readme",
11
11
  "repository": {
12
12
  "type": "git",