nuxt-typed-router 3.2.4 → 3.2.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/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.5"
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);
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.5",
4
4
  "description": "Provide autocompletion for routes paths, names and params in Nuxt apps",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -67,8 +67,7 @@
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.0"
72
71
  },
73
72
  "devDependencies": {
74
73
  "@nuxt/devtools": "^0.5.5",
@@ -98,6 +97,7 @@
98
97
  "vitest": "^0.31.4",
99
98
  "vue-eslint-parser": "^9.3.1",
100
99
  "vue-router": "^4.2.2",
101
- "vue-tsc": "^1.8.4"
100
+ "vue-tsc": "^1.8.4",
101
+ "prettier": "2.8.8"
102
102
  }
103
103
  }