@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 +3 -2
- package/dist/index.mjs +5 -4
- package/package.json +28 -28
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
|
-
|
|
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 {
|
|
1
|
+
import { createPath, parsePath } from 'history';
|
|
2
2
|
import { match as match$1 } from 'path-to-regexp';
|
|
3
|
-
import { reject, noop
|
|
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
|
-
|
|
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.
|
|
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": "^
|
|
55
|
+
"path-to-regexp": "^8.4.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "^
|
|
59
|
-
"@babel/preset-env": "^
|
|
60
|
-
"@babel/preset-typescript": "^
|
|
61
|
-
"@rollup/plugin-babel": "^
|
|
62
|
-
"@rollup/plugin-commonjs": "^
|
|
63
|
-
"@rollup/plugin-node-resolve": "^
|
|
64
|
-
"@rollup/plugin-replace": "^
|
|
65
|
-
"@types/node": "^
|
|
66
|
-
"@types/sinon": "^
|
|
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.
|
|
70
|
-
"commitizen": "^4.3.
|
|
71
|
-
"core-js": "^3.
|
|
72
|
-
"cross-env": "^
|
|
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": "^
|
|
85
|
-
"husky": "^
|
|
86
|
-
"lint-staged": "^
|
|
87
|
-
"prettier": "^3.
|
|
88
|
-
"rollup": "^
|
|
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": "^
|
|
92
|
-
"terser": "^5.
|
|
93
|
-
"tsc-alias": "^1.
|
|
94
|
-
"typedoc": "^0.
|
|
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": "^
|
|
97
|
-
"typescript": "
|
|
98
|
-
"vitest": "^4.
|
|
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
|
}
|