create-vue 3.16.0 → 3.16.2

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.
Files changed (2) hide show
  1. package/bundle.js +8 -4
  2. package/package.json +1 -1
package/bundle.js CHANGED
@@ -11,13 +11,13 @@ import * as path$4 from "node:path";
11
11
  import * as path$3 from "node:path";
12
12
  import * as path$2 from "node:path";
13
13
  import * as path from "node:path";
14
+ import { fileURLToPath, pathToFileURL } from "node:url";
14
15
  import { parseArgs, stripVTControlCharacters } from "node:util";
15
16
  import g, { stdin, stdout } from "node:process";
16
17
  import * as f$1 from "node:readline";
17
18
  import M from "node:readline";
18
19
  import { WriteStream } from "node:tty";
19
20
  import * as path$1 from "path";
20
- import { pathToFileURL } from "node:url";
21
21
 
22
22
  //#region rolldown:runtime
23
23
  var __create = Object.create;
@@ -2398,11 +2398,15 @@ function getLocale() {
2398
2398
  const shellLocale = process.env.LC_ALL || process.env.LC_MESSAGES || process.env.LANG || Intl.DateTimeFormat().resolvedOptions().locale || "en-US";
2399
2399
  return linkLocale(shellLocale.split(".")[0].replace("_", "-"));
2400
2400
  }
2401
+ async function loadLanguageFile(filePath) {
2402
+ return (await import(pathToFileURL(filePath).toString(), { with: { type: "json" } })).default;
2403
+ }
2401
2404
  async function getLanguage(localesRoot) {
2402
2405
  const locale = getLocale();
2403
2406
  const languageFilePath = path$3.resolve(localesRoot, `${locale}.json`);
2407
+ const fallbackPath = path$3.resolve(localesRoot, "en-US.json");
2404
2408
  const doesLanguageExist = fs$3.existsSync(languageFilePath);
2405
- const lang = doesLanguageExist ? (await import(languageFilePath, { with: { type: "json" } })).default : (await import(path$3.resolve(localesRoot, "en-US.json"), { with: { type: "json" } })).default;
2409
+ const lang = doesLanguageExist ? await loadLanguageFile(languageFilePath) : await loadLanguageFile(fallbackPath);
2406
2410
  return lang;
2407
2411
  }
2408
2412
 
@@ -2701,7 +2705,7 @@ function emptyRouterConfig(rootDir, needsTypeScript) {
2701
2705
  //#endregion
2702
2706
  //#region package.json
2703
2707
  var name = "create-vue";
2704
- var version = "3.16.0";
2708
+ var version = "3.16.2";
2705
2709
  var description = "🛠️ The recommended way to start a Vite-powered Vue project";
2706
2710
  var type = "module";
2707
2711
  var packageManager = "pnpm@10.7.0";
@@ -3028,7 +3032,7 @@ async function init() {
3028
3032
  version: "0.0.0"
3029
3033
  };
3030
3034
  fs.writeFileSync(path.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
3031
- const templateRoot = new URL("./template", import.meta.url).pathname;
3035
+ const templateRoot = fileURLToPath(new URL("./template", import.meta.url));
3032
3036
  const callbacks = [];
3033
3037
  const render = function render$1(templateName) {
3034
3038
  const templateDir = path.resolve(templateRoot, templateName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vue",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "🛠️ The recommended way to start a Vite-powered Vue project",
5
5
  "type": "module",
6
6
  "bin": {