@farbenmeer/router 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/path.js +2 -2
  2. package/package.json +4 -2
package/dist/path.js CHANGED
@@ -27,7 +27,7 @@ export function compilePathRegex(path) {
27
27
  const pattern = path
28
28
  .replaceAll(/\*(\w+)/g, "(?<$1>.+)") // *name -> named capture group
29
29
  .replaceAll(/\*/g, ".+") // * -> match everything including /
30
- .replaceAll(/:(\w+)/g, "(?<$1>[\\w-]+)"); // :param -> named capture group
30
+ .replaceAll(/:(\w+)/g, "(?<$1>[^\\/]+)"); // :param -> named capture group
31
31
  // If pattern contains a wildcard, it already matches everything - use exact match
32
32
  if (path.includes("*")) {
33
33
  return new RegExp(`^(${pattern})$`);
@@ -43,7 +43,7 @@ export function compileExactPathRegex(path) {
43
43
  const pattern = path
44
44
  .replaceAll(/\*(\w+)/g, "(?<$1>.+)") // *name -> named capture group
45
45
  .replaceAll(/\*/g, ".+") // * -> match everything including /
46
- .replaceAll(/:(\w+)/g, "(?<$1>[\\w-]+)"); // :param -> named capture group
46
+ .replaceAll(/:(\w+)/g, "(?<$1>[^\\/]+)"); // :param -> named capture group
47
47
  return new RegExp(`^(${pattern})$`);
48
48
  }
49
49
  export function buildFullPath(parentPath, path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farbenmeer/router",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "author": {
5
5
  "name": "Michel Smola",
6
6
  "email": "michel.smola@farbenmeer.de"
@@ -25,6 +25,7 @@
25
25
  "@vitest/browser-playwright": "^4.0.16",
26
26
  "react": "^19.1.1",
27
27
  "vitest": "^4.0.16",
28
+ "playwright": "^1.58.1",
28
29
  "vitest-browser-react": "^2.0.2"
29
30
  },
30
31
  "peerDependencies": {
@@ -34,6 +35,7 @@
34
35
  "scripts": {
35
36
  "build": "tsc -p tsconfig.build.json",
36
37
  "release": "pnpm run build && pnpm publish",
37
- "test": "vitest"
38
+ "test": "vitest",
39
+ "ci-setup": "playwright install --with-deps"
38
40
  }
39
41
  }