@native-router/core 1.4.0 → 1.4.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/dist/index.cjs CHANGED
@@ -26,9 +26,10 @@ class RedirectLoopError extends NativeRouterError {
26
26
  */
27
27
  class SearchError extends NativeRouterError {
28
28
  /** The raw search string that failed validation. */
29
+ search;
29
30
 
30
31
  /** The issues reported by the schema. */
31
-
32
+ issues;
32
33
  constructor(search, issues) {
33
34
  super(`Invalid search params "${search}": ${issues.map(({
34
35
  message,
@@ -210,7 +211,7 @@ function match(router, pathname) {
210
211
  const route = routes[i];
211
212
  const end = !route.children;
212
213
  const matched = route.path ? pathToRegexp.match(route.path, {
213
- strict: true,
214
+ trailing: false,
214
215
  sensitive: true,
215
216
  decode: typeof decodeURIComponent === 'function' ? decodeURIComponent : undefined,
216
217
  end
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { parsePath, createPath } from 'history';
1
+ import { createPath, parsePath } from 'history';
2
2
  import { match as match$1 } from 'path-to-regexp';
3
- import { reject, noop, createCurrentGuard } from './util.mjs';
3
+ import { createCurrentGuard, reject, noop } from './util.mjs';
4
4
 
5
5
  /* eslint-disable max-classes-per-file */
6
6
 
@@ -24,9 +24,10 @@ class RedirectLoopError extends NativeRouterError {
24
24
  */
25
25
  class SearchError extends NativeRouterError {
26
26
  /** The raw search string that failed validation. */
27
+ search;
27
28
 
28
29
  /** The issues reported by the schema. */
29
-
30
+ issues;
30
31
  constructor(search, issues) {
31
32
  super(`Invalid search params "${search}": ${issues.map(({
32
33
  message,
@@ -208,7 +209,7 @@ function match(router, pathname) {
208
209
  const route = routes[i];
209
210
  const end = !route.children;
210
211
  const matched = route.path ? match$1(route.path, {
211
- strict: true,
212
+ trailing: false,
212
213
  sensitive: true,
213
214
  decode: typeof decodeURIComponent === 'function' ? decodeURIComponent : undefined,
214
215
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@native-router/core",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/types/index.d.ts",
@@ -52,24 +52,24 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "history": "^5.3.0",
55
- "path-to-regexp": "^6.2.1"
55
+ "path-to-regexp": "^8.4.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@babel/core": "^7.22.9",
59
- "@babel/preset-env": "^7.22.9",
60
- "@babel/preset-typescript": "^7.22.5",
61
- "@rollup/plugin-babel": "^6.0.3",
62
- "@rollup/plugin-commonjs": "^25.0.4",
63
- "@rollup/plugin-node-resolve": "^15.1.0",
64
- "@rollup/plugin-replace": "^5.0.2",
65
- "@types/node": "^20.4.5",
66
- "@types/sinon": "^10.0.15",
58
+ "@babel/core": "^8.0.1",
59
+ "@babel/preset-env": "^8.0.2",
60
+ "@babel/preset-typescript": "^8.0.1",
61
+ "@rollup/plugin-babel": "^7.1.0",
62
+ "@rollup/plugin-commonjs": "^29.0.3",
63
+ "@rollup/plugin-node-resolve": "^16.0.3",
64
+ "@rollup/plugin-replace": "^6.0.3",
65
+ "@types/node": "^26.2.0",
66
+ "@types/sinon": "^22.0.0",
67
67
  "@typescript-eslint/eslint-plugin": "^6.2.0",
68
68
  "@typescript-eslint/parser": "^6.2.0",
69
- "@vitest/coverage-v8": "^4.0.18",
70
- "commitizen": "^4.3.0",
71
- "core-js": "^3.31.1",
72
- "cross-env": "^7.0.3",
69
+ "@vitest/coverage-v8": "^4.1.11",
70
+ "commitizen": "^4.3.2",
71
+ "core-js": "^3.50.0",
72
+ "cross-env": "^10.1.0",
73
73
  "eslint": "^8.50.0",
74
74
  "eslint-config-airbnb": "^19.0.4",
75
75
  "eslint-config-airbnb-typescript": "^17.1.0",
@@ -81,21 +81,21 @@
81
81
  "eslint-plugin-prettier": "^5.0.0",
82
82
  "eslint-plugin-react": "^7.33.0",
83
83
  "eslint-plugin-react-hooks": "^4.6.0",
84
- "gh-pages": "^5.0.0",
85
- "husky": "^8.0.3",
86
- "lint-staged": "^13.2.3",
87
- "prettier": "^3.0.0",
88
- "rollup": "^3.28.0",
84
+ "gh-pages": "^6.3.0",
85
+ "husky": "^9.1.7",
86
+ "lint-staged": "^17.3.0",
87
+ "prettier": "^3.9.6",
88
+ "rollup": "^4.62.5",
89
+ "semantic-release": "^25.0.9",
89
90
  "should": "^13.2.3",
90
91
  "should-sinon": "0.0.6",
91
- "sinon": "^15.2.0",
92
- "terser": "^5.19.2",
93
- "tsc-alias": "^1.8.7",
94
- "typedoc": "^0.24.8",
92
+ "sinon": "^22.1.0",
93
+ "terser": "^5.50.0",
94
+ "tsc-alias": "^1.9.2",
95
+ "typedoc": "^0.28.20",
95
96
  "typedoc-plugin-mark-react-functional-components": "^0.2.2",
96
- "typedoc-plugin-missing-exports": "^2.0.0",
97
- "typescript": "^5.9.3",
98
- "vitest": "^4.0.18",
99
- "semantic-release": "^25.0.3"
97
+ "typedoc-plugin-missing-exports": "^4.1.4",
98
+ "typescript": "~5.9.3",
99
+ "vitest": "^4.1.11"
100
100
  }
101
101
  }