nuxt-typed-router 3.2.4 → 3.2.6

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/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "3.2.4"
8
+ "version": "3.2.6"
9
9
  }
package/dist/module.mjs CHANGED
@@ -4,7 +4,6 @@ import logSymbols from 'log-symbols';
4
4
  import { defu } from 'defu';
5
5
  import { customAlphabet } from 'nanoid/non-secure';
6
6
  import { nanoid as nanoid$1 } from 'nanoid';
7
- import prettier from 'prettier';
8
7
  import fs, { existsSync } from 'fs';
9
8
  import { fileURLToPath } from 'url';
10
9
  import { dirname, resolve } from 'pathe';
@@ -1233,33 +1232,6 @@ async function handleAddPlugin() {
1233
1232
  });
1234
1233
  }
1235
1234
 
1236
- const { resolveConfig, format } = prettier;
1237
- const defaultPrettierOptions = {
1238
- printWidth: 100,
1239
- tabWidth: 2,
1240
- trailingComma: "es5",
1241
- singleQuote: true,
1242
- semi: true,
1243
- bracketSpacing: true,
1244
- htmlWhitespaceSensitivity: "strict"
1245
- };
1246
- async function formatOutputWithPrettier(template) {
1247
- try {
1248
- let prettierFoundOptions = await resolveConfig(process.cwd());
1249
- if (!prettierFoundOptions) {
1250
- prettierFoundOptions = defaultPrettierOptions;
1251
- }
1252
- const formatedTemplate = format(template, {
1253
- ...prettierFoundOptions,
1254
- parser: "typescript"
1255
- });
1256
- return formatedTemplate;
1257
- } catch (e) {
1258
- console.error(logSymbols.error, chalk.red("Error while formatting the output"), "\n" + e);
1259
- return Promise.reject(e);
1260
- }
1261
- }
1262
-
1263
1235
  dirname(fileURLToPath(import.meta.url));
1264
1236
  async function processPathAndWriteFile({
1265
1237
  content,
@@ -1271,15 +1243,14 @@ async function processPathAndWriteFile({
1271
1243
  const finalOutDir = outDir ?? `.nuxt/typed-router`;
1272
1244
  const processedOutDir = resolve(rootDir, finalOutDir);
1273
1245
  const outputFile = resolve(process.cwd(), `${processedOutDir}/${fileName}`);
1274
- const formatedContent = await formatOutputWithPrettier(content);
1275
1246
  if (fs.existsSync(outputFile)) {
1276
- await writeFile(outputFile, formatedContent);
1247
+ await writeFile(outputFile, content);
1277
1248
  } else {
1278
1249
  let dirList = outputFile.split("/");
1279
1250
  dirList.pop();
1280
1251
  const dirPath = dirList.join("/");
1281
1252
  await mkdirp(dirPath);
1282
- await writeFile(outputFile, formatedContent);
1253
+ await writeFile(outputFile, content);
1283
1254
  }
1284
1255
  } catch (e) {
1285
1256
  return Promise.reject(e);
@@ -1398,7 +1369,7 @@ function modifyRoutePrefixDefaultIfI18n(route) {
1398
1369
  const i18LocalesRecognizer = i18nLocales?.map((m) => m.replace(specialCharacterRegxp, "\\$&")).join("|");
1399
1370
  if (i18nOptions?.strategy === "prefix_and_default") {
1400
1371
  const routeDefaultRegXp = new RegExp(
1401
- `([a-zA-Z-]+)${separator}(${i18LocalesRecognizer})${separator}default`,
1372
+ `([a-zA-Z0-9-]+)${separator}(${i18LocalesRecognizer})${separator}default`,
1402
1373
  "g"
1403
1374
  );
1404
1375
  const match = routeDefaultRegXp.exec(route.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-typed-router",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "description": "Provide autocompletion for routes paths, names and params in Nuxt apps",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -60,44 +60,44 @@
60
60
  "url": "https://github.com/victorgarciaesgi/nuxt-typed-router/issues"
61
61
  },
62
62
  "dependencies": {
63
- "@nuxt/kit": "^3.6.1",
63
+ "@nuxt/kit": "^3.6.5",
64
64
  "chalk": "^5.3.0",
65
65
  "defu": "^6.1.2",
66
66
  "lodash-es": "^4.17.21",
67
67
  "log-symbols": "^5.1.0",
68
68
  "mkdirp": "^3.0.1",
69
69
  "nanoid": "^4.0.2",
70
- "pathe": "1.1.0",
71
- "prettier": "2.8.8"
70
+ "pathe": "1.1.1"
72
71
  },
73
72
  "devDependencies": {
74
- "@nuxt/devtools": "^0.5.5",
75
- "@nuxt/module-builder": "^0.3.1",
76
- "@nuxt/test-utils": "^3.6.1",
77
- "@nuxt/types": "^2.17.0",
73
+ "@nuxt/devtools": "^0.8.0",
74
+ "@nuxt/module-builder": "^0.4.0",
75
+ "@nuxt/test-utils": "^3.6.5",
76
+ "@nuxt/types": "^2.17.1",
78
77
  "@nuxtjs/eslint-config-typescript": "^12.0.0",
79
78
  "@nuxtjs/i18n": "8.0.0-beta.10",
80
79
  "@nuxtjs/web-vitals": "^0.2.6",
81
- "@types/lodash-es": "^4.17.7",
82
- "@types/node": "^20.3.3",
83
- "@types/prettier": "^2.7.3",
84
- "@typescript-eslint/eslint-plugin": "^5.61.0",
85
- "@typescript-eslint/parser": "^5.61.0",
86
- "@vue/test-utils": "^2.4.0",
87
- "bumpp": "9.1.0",
88
- "changelogithub": "0.12.11",
80
+ "@types/lodash-es": "^4.17.8",
81
+ "@types/node": "^20.5.0",
82
+ "@types/prettier": "^3.0.0",
83
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
84
+ "@typescript-eslint/parser": "^6.4.0",
85
+ "@vue/test-utils": "^2.4.1",
86
+ "bumpp": "9.1.1",
87
+ "changelogithub": "0.12.12",
89
88
  "cross-env": "^7.0.3",
90
- "eslint": "8.41.0",
91
- "eslint-config-prettier": "^8.8.0",
92
- "eslint-plugin-vue": "^9.15.1",
93
- "nuxt": "3.5.1",
94
- "nuxt-seo-kit": "1.3.8",
95
- "playwright": "1.34.3",
89
+ "eslint": "8.47.0",
90
+ "eslint-config-prettier": "^9.0.0",
91
+ "eslint-plugin-vue": "^9.17.0",
92
+ "nuxt": "3.6.5",
93
+ "nuxt-seo-kit": "1.3.9",
94
+ "playwright": "1.37.0",
95
+ "prettier": "3.0.2",
96
96
  "tsd": "^0.28.1",
97
97
  "typescript": "^5.1.6",
98
- "vitest": "^0.31.4",
98
+ "vitest": "^0.34.2",
99
99
  "vue-eslint-parser": "^9.3.1",
100
- "vue-router": "^4.2.2",
101
- "vue-tsc": "^1.8.4"
100
+ "vue-router": "^4.2.4",
101
+ "vue-tsc": "^1.8.8"
102
102
  }
103
103
  }