nuxt-typed-router 3.1.4-beta.0 → 3.1.5
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/README.md +5 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
[![npm downloads][npm-total-downloads-src]][npm-downloads-href]
|
|
17
17
|
<img src='https://img.shields.io/npm/l/nuxt-typed-router.svg'>
|
|
18
18
|
|
|
19
|
+
-----------
|
|
20
|
+
> ⚠️ Nuxt 3.4 introduced a breaking change in its router output
|
|
21
|
+
> Install `v3.1.4` of nuxt-typed-router if you're using this Nuxt version
|
|
22
|
+
-----------
|
|
23
|
+
|
|
19
24
|
## Provide a type safe router to Nuxt with auto-generated typed definitions for route path, name and params
|
|
20
25
|
|
|
21
26
|
- Supports all programmatic navigation utils (`NuxtLink`, `useRouter`, `navigateTo`, `useRoute`, `useLocalePath`, etc...)
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1439,7 +1439,7 @@ function extractUnMatchingSiblings(mainRoute, siblingRoutes) {
|
|
|
1439
1439
|
const specialCharacterRegxp = /([^a-zA-Z0-9_])/gm;
|
|
1440
1440
|
function is18Sibling(source, route) {
|
|
1441
1441
|
const { i18n, i18nOptions, i18nLocales } = moduleOptionStore;
|
|
1442
|
-
if (i18n && i18nOptions?.strategy !== "no_prefix") {
|
|
1442
|
+
if (i18n && i18nOptions && i18nOptions?.strategy !== "no_prefix") {
|
|
1443
1443
|
const separator = i18nOptions?.routesNameSeparator ?? "___";
|
|
1444
1444
|
const i18LocalesRecognizer = i18nLocales?.map((m) => m.replace(specialCharacterRegxp, "\\$&")).join("|");
|
|
1445
1445
|
return source.some((rt) => {
|
|
@@ -1463,7 +1463,7 @@ function is18Sibling(source, route) {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
function modifyRoutePrefixDefaultIfI18n(route) {
|
|
1465
1465
|
const { i18n, i18nOptions, i18nLocales } = moduleOptionStore;
|
|
1466
|
-
if (i18n && route.name) {
|
|
1466
|
+
if (i18n && i18nOptions && route.name) {
|
|
1467
1467
|
const separator = i18nOptions?.routesNameSeparator ?? "___";
|
|
1468
1468
|
const i18LocalesRecognizer = i18nLocales?.map((m) => m.replace(specialCharacterRegxp, "\\$&")).join("|");
|
|
1469
1469
|
if (i18nOptions?.strategy === "prefix_and_default") {
|