nuxt-typed-router 3.2.2 → 3.2.3

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 CHANGED
@@ -50,6 +50,11 @@
50
50
 
51
51
  Demo repo 🧪 : [nuxt-typed-router-demo](https://github.com/victorgarciaesgi/nuxt-typed-router-demo)
52
52
 
53
+ ## Cool video about it from LearnVue!
54
+
55
+ [![Watch the video](https://img.youtube.com/vi/jiYoAiFb71Y/default.jpg)](https://www.youtube.com/watch?v=jiYoAiFb71Y&t)
56
+
57
+
53
58
  <br/>
54
59
 
55
60
  # Compatibility:
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "3.2.2"
8
+ "version": "3.2.3"
9
9
  }
package/dist/module.mjs CHANGED
@@ -300,7 +300,6 @@ function createRoutesTypesFile({
300
300
  /* typescript */
301
301
  `
302
302
  ${createRoutesNamesListExport(routesList)}
303
- export type WithoutBracket<T extends string> = T extends \`:\${string}\` ? never : T;
304
303
 
305
304
  ${createRoutesParamsRecordExport(routesParams)}
306
305
 
@@ -641,8 +640,6 @@ function createIndexFile() {
641
640
  RoutesNamesList,
642
641
  RoutesNamesListRecord,
643
642
  RoutesParamsRecord,
644
- RoutePath,
645
- RoutePathByName
646
643
  } from './__routes';
647
644
  export { useRoute } from './__useTypedRoute';
648
645
  export { useRouter } from './__useTypedRouter';
@@ -660,7 +657,7 @@ function createIndexFile() {
660
657
  ${returnIfTrue(
661
658
  i18n,
662
659
  `export {useLocalePath, useLocaleRoute} from './__i18n-router';
663
- export type {TypedToLocalePath, TypedLocaleRoute} from './__i18n-router';`
660
+ export type {TypedToLocalePath, TypedLocaleRoute, I18nLocales} from './__i18n-router';`
664
661
  )}
665
662
 
666
663
 
@@ -1309,7 +1306,6 @@ const watermarkTemplate = `
1309
1306
  `;
1310
1307
 
1311
1308
  let previousGeneratedRoutes = "";
1312
- let firstRun = false;
1313
1309
  async function saveGeneratedFiles({ outputData }) {
1314
1310
  const { i18n } = moduleOptionStore;
1315
1311
  const filesMap = [
@@ -1377,15 +1373,6 @@ async function saveGeneratedFiles({ outputData }) {
1377
1373
  if (previousGeneratedRoutes !== outputData.routesList.join(",")) {
1378
1374
  previousGeneratedRoutes = outputData.routesList.join(",");
1379
1375
  console.log(logSymbols.success, `Router autocompletions generated \u{1F6A6}`);
1380
- if (!firstRun) {
1381
- firstRun = true;
1382
- console.log(
1383
- logSymbols.warning,
1384
- chalk.yellow(
1385
- `Route path autocomplete is still experimental. You can disable it with the "nuxtTypedRouter.pathCheck: false" option`
1386
- )
1387
- );
1388
- }
1389
1376
  }
1390
1377
  }
1391
1378
 
@@ -1400,7 +1387,7 @@ function is18Sibling(source, route) {
1400
1387
  const { i18n, i18nOptions, i18nLocales } = moduleOptionStore;
1401
1388
  if (i18n && i18nOptions && i18nOptions?.strategy !== "no_prefix") {
1402
1389
  const i18LocalesRecognizer = i18nLocales?.map((m) => m.replace(specialCharacterRegxp, "\\$&")).join("|");
1403
- return !!route.path?.match(new RegExp(`/?(${i18LocalesRecognizer})(/.+)?`, "g"));
1390
+ return !!route.path?.match(new RegExp(`^/?(${i18LocalesRecognizer})(/.*)?$`, "g"));
1404
1391
  }
1405
1392
  return false;
1406
1393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-typed-router",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "Provide autocompletion for routes paths, names and params in Nuxt apps",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -28,7 +28,8 @@
28
28
  "test": "pnpm run dev:prepare && pnpm run test:types && pnpm run test:fixtures",
29
29
  "lint": "eslint --ext .ts --ext .vue .",
30
30
  "docs:dev": "cd docs && pnpm run dev",
31
- "docs:build": "npm run dev:prepare && cd docs && nuxi generate",
31
+ "docs:prepare": "nuxt-module-build --stub && nuxi prepare playground",
32
+ "docs:build": "npm run docs:prepare && cd docs && nuxi generate",
32
33
  "typecheck": "tsc --noEmit",
33
34
  "release": "bumpp && npm publish && git push --follow-tags"
34
35
  },
@@ -59,7 +60,7 @@
59
60
  "url": "https://github.com/victorgarciaesgi/nuxt-typed-router/issues"
60
61
  },
61
62
  "dependencies": {
62
- "@nuxt/kit": "^3.4.3",
63
+ "@nuxt/kit": "^3.5.1",
63
64
  "chalk": "^5.2.0",
64
65
  "defu": "^6.1.2",
65
66
  "lodash-es": "^4.17.21",
@@ -70,33 +71,33 @@
70
71
  "prettier": "2.8.8"
71
72
  },
72
73
  "devDependencies": {
73
- "@nuxt/devtools": "^0.4.6",
74
+ "@nuxt/devtools": "^0.5.5",
74
75
  "@nuxt/module-builder": "^0.3.1",
75
- "@nuxt/test-utils": "^3.4.3",
76
+ "@nuxt/test-utils": "^3.5.1",
76
77
  "@nuxt/types": "^2.16.3",
77
78
  "@nuxtjs/eslint-config-typescript": "^12.0.0",
78
79
  "@nuxtjs/i18n": "8.0.0-beta.10",
79
- "@nuxtjs/web-vitals": "^0.2.5",
80
+ "@nuxtjs/web-vitals": "^0.2.6",
80
81
  "@types/lodash-es": "^4.17.7",
81
- "@types/node": "^20.1.2",
82
+ "@types/node": "^20.2.3",
82
83
  "@types/prettier": "^2.7.2",
83
- "@typescript-eslint/eslint-plugin": "^5.59.5",
84
- "@typescript-eslint/parser": "^5.59.5",
84
+ "@typescript-eslint/eslint-plugin": "^5.59.7",
85
+ "@typescript-eslint/parser": "^5.59.7",
85
86
  "@vue/test-utils": "^2.3.2",
86
87
  "bumpp": "9.1.0",
87
- "changelogithub": "0.12.9",
88
+ "changelogithub": "0.12.11",
88
89
  "cross-env": "^7.0.3",
89
- "eslint": "8.40.0",
90
+ "eslint": "8.41.0",
90
91
  "eslint-config-prettier": "^8.8.0",
91
- "eslint-plugin-vue": "^9.12.0",
92
- "nuxt": "3.4.3",
92
+ "eslint-plugin-vue": "^9.14.0",
93
+ "nuxt": "3.5.1",
93
94
  "nuxt-seo-kit": "1.3.8",
94
- "playwright": "1.33.0",
95
+ "playwright": "1.34.3",
95
96
  "tsd": "^0.28.1",
96
97
  "typescript": "^5.0.4",
97
- "vitest": "^0.31.0",
98
- "vue-eslint-parser": "^9.2.1",
99
- "vue-router": "^4.1.6",
100
- "vue-tsc": "^1.6.4"
98
+ "vitest": "^0.31.1",
99
+ "vue-eslint-parser": "^9.3.0",
100
+ "vue-router": "^4.2.1",
101
+ "vue-tsc": "^1.6.5"
101
102
  }
102
103
  }