nuxt-i18n-micro 1.65.3 → 1.66.0

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.
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737372517457,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737380798793,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"bc049cd9-4687-453a-a24c-fd55385e6fd1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737372517458,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737380798794,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"bc049cd9-4687-453a-a24c-fd55385e6fd1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- {"id":"215568f4-8658-4051-a067-645327df38fa","timestamp":1737372512028}
1
+ {"id":"bc049cd9-4687-453a-a24c-fd55385e6fd1","timestamp":1737380794260}
@@ -0,0 +1 @@
1
+ {"id":"bc049cd9-4687-453a-a24c-fd55385e6fd1","timestamp":1737380794260,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CcDaBmcC.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.D1x2GrnM.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/rqhqIC0Q.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737372517458,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"215568f4-8658-4051-a067-645327df38fa",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/ClTsZsex.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1737380798794,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"bc049cd9-4687-453a-a24c-fd55385e6fd1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
3
  "configKey": "i18n",
4
- "version": "1.65.3",
4
+ "version": "1.66.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -468,7 +468,8 @@ const module = defineNuxtModule({
468
468
  async setup(options, nuxt) {
469
469
  const defaultLocale = process.env.DEFAULT_LOCALE ?? options.defaultLocale ?? "en";
470
470
  const isSSG = nuxt.options._generate;
471
- const isCloudflarePages = nuxt.options.nitro.preset === "cloudflare_pages" || process.env.NITRO_PRESET === "cloudflare-pages";
471
+ const isCloudflarePages = nuxt.options.nitro.preset?.startsWith("cloudflare");
472
+ const isVercelPages = nuxt.options.nitro.preset?.startsWith("vercel");
472
473
  const logger = useLogger("nuxt-i18n-micro");
473
474
  if (options.includeDefaultLocaleRoute !== void 0) {
474
475
  logger.debug("The 'includeDefaultLocaleRoute' option is deprecated. Use 'strategy' instead.");
@@ -639,7 +640,7 @@ const module = defineNuxtModule({
639
640
  nitroConfig.bundledStorage.push("i18n-locales");
640
641
  nitroConfig.devStorage = nitroConfig.devStorage || {};
641
642
  nitroConfig.devStorage["i18n-locales"] = {
642
- driver: "fs",
643
+ driver: isVercelPages ? "vercelKV" : "fs",
643
644
  base: path.join(nuxt.options.rootDir, "server/assets/i18n-locales")
644
645
  };
645
646
  if (nitroConfig.imports) {
@@ -56,7 +56,7 @@ export interface PluginsInjections {
56
56
  $getLocales: () => Locale[];
57
57
  $defaultLocale: () => string | undefined;
58
58
  $getRouteName: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric, locale?: string) => string;
59
- $t: (key: string, params?: Params, defaultValue?: string) => Translation;
59
+ $t: (key: string, params?: Params, defaultValue?: string | null) => Translation;
60
60
  $ts: (key: string, params?: Params, defaultValue?: string) => string;
61
61
  $tc: (key: string, params: number | Params, defaultValue?: string) => string;
62
62
  $tn: (value: number, options?: Intl.NumberFormatOptions) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "1.65.3",
3
+ "version": "1.66.0",
4
4
  "description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
5
5
  "repository": "s00d/nuxt-i18n-micro",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"id":"215568f4-8658-4051-a067-645327df38fa","timestamp":1737372512028,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}