create-vue 3.16.0 → 3.16.1

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 +6 -2
  2. package/package.json +1 -1
package/bundle.js CHANGED
@@ -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.1";
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vue",
3
- "version": "3.16.0",
3
+ "version": "3.16.1",
4
4
  "description": "🛠️ The recommended way to start a Vite-powered Vue project",
5
5
  "type": "module",
6
6
  "bin": {