@koine/next 1.0.91 → 1.0.93
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/config/index.js +4 -4
- package/node/config/index.js +4 -4
- package/package.json +5 -5
package/config/index.js
CHANGED
|
@@ -56,8 +56,8 @@ export function encodePathname(pathname) {
|
|
|
56
56
|
*
|
|
57
57
|
* Here we add the wildcard flag maybe found in the pathname to the template
|
|
58
58
|
* name too, this is because we do not want to have the wildcard in the JSON
|
|
59
|
-
* keys as those are also used to throught the `
|
|
60
|
-
* there is a bit cumbersome.
|
|
59
|
+
* keys as those are also used to produce links throught the `useTo` hook and
|
|
60
|
+
* having asterisks there is a bit cumbersome.
|
|
61
61
|
*
|
|
62
62
|
* @see https://nextjs.org/docs/messages/invalid-multi-match
|
|
63
63
|
*/
|
|
@@ -130,7 +130,7 @@ export function getPathRewrite(route) {
|
|
|
130
130
|
// console.log(`rewrite pathname "${source}" to template "${destination}"`);
|
|
131
131
|
return {
|
|
132
132
|
source: source,
|
|
133
|
-
destination: destination,
|
|
133
|
+
destination: destination.replace(/\/index$/, ""),
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
@@ -143,7 +143,7 @@ export function getPathRedirect(locale, route, permanent) {
|
|
|
143
143
|
var destination = "/".concat(normaliseUrlPathname(pathname));
|
|
144
144
|
// console.log(`redirect template "${source}" to pathname "${destination}"`);
|
|
145
145
|
return {
|
|
146
|
-
source: source,
|
|
146
|
+
source: source.replace(/\/index$/, ""),
|
|
147
147
|
destination: destination,
|
|
148
148
|
permanent: Boolean(permanent),
|
|
149
149
|
locale: false,
|
package/node/config/index.js
CHANGED
|
@@ -62,8 +62,8 @@ exports.encodePathname = encodePathname;
|
|
|
62
62
|
*
|
|
63
63
|
* Here we add the wildcard flag maybe found in the pathname to the template
|
|
64
64
|
* name too, this is because we do not want to have the wildcard in the JSON
|
|
65
|
-
* keys as those are also used to throught the `
|
|
66
|
-
* there is a bit cumbersome.
|
|
65
|
+
* keys as those are also used to produce links throught the `useTo` hook and
|
|
66
|
+
* having asterisks there is a bit cumbersome.
|
|
67
67
|
*
|
|
68
68
|
* @see https://nextjs.org/docs/messages/invalid-multi-match
|
|
69
69
|
*/
|
|
@@ -136,7 +136,7 @@ function getPathRewrite(route) {
|
|
|
136
136
|
// console.log(`rewrite pathname "${source}" to template "${destination}"`);
|
|
137
137
|
return {
|
|
138
138
|
source: source,
|
|
139
|
-
destination: destination,
|
|
139
|
+
destination: destination.replace(/\/index$/, ""),
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
exports.getPathRewrite = getPathRewrite;
|
|
@@ -150,7 +150,7 @@ function getPathRedirect(locale, route, permanent) {
|
|
|
150
150
|
var destination = "/".concat(normaliseUrlPathname(pathname));
|
|
151
151
|
// console.log(`redirect template "${source}" to pathname "${destination}"`);
|
|
152
152
|
return {
|
|
153
|
-
source: source,
|
|
153
|
+
source: source.replace(/\/index$/, ""),
|
|
154
154
|
destination: destination,
|
|
155
155
|
permanent: Boolean(permanent),
|
|
156
156
|
locale: false,
|
package/package.json
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"react": "^18.2.0",
|
|
19
19
|
"next": "^12.3.1",
|
|
20
|
-
"@koine/browser": "1.0.
|
|
21
|
-
"@koine/utils": "1.0.
|
|
20
|
+
"@koine/browser": "1.0.93",
|
|
21
|
+
"@koine/utils": "1.0.93",
|
|
22
22
|
"ts-debounce": "^4.0.0",
|
|
23
|
-
"@koine/dom": "1.0.
|
|
23
|
+
"@koine/dom": "1.0.93",
|
|
24
24
|
"date-fns-tz": "^1.3.7",
|
|
25
25
|
"framer-motion": "^7.5.3",
|
|
26
|
-
"@koine/react": "1.0.
|
|
26
|
+
"@koine/react": "1.0.93",
|
|
27
27
|
"styled-components": "^5.3.6",
|
|
28
28
|
"@mui/base": "^5.0.0-alpha.101",
|
|
29
29
|
"react-icons": "^4.4.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@hookform/resolvers": "^2.9.8"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {},
|
|
47
|
-
"version": "1.0.
|
|
47
|
+
"version": "1.0.93",
|
|
48
48
|
"module": "./index.js",
|
|
49
49
|
"types": "./index.d.ts"
|
|
50
50
|
}
|