@x18n/node 0.0.10 → 0.0.12

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/dist/index.mjs +4 -0
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1089,6 +1089,10 @@ async function i18nAllyFallback(root) {
1089
1089
  function applyDefaults(draft, config) {
1090
1090
  if (config.sourceLocale) draft.sourceLocale = config.sourceLocale;
1091
1091
  if (config.ignoreLocales) draft.ignoreLocales = [...draft.ignoreLocales, ...config.ignoreLocales];
1092
+ if (config.localeFallbacks) draft.localeFallbacks = draft.localeFallbacks === "auto" || config.localeFallbacks === "auto" ? config.localeFallbacks : {
1093
+ ...draft.localeFallbacks,
1094
+ ...config.localeFallbacks
1095
+ };
1092
1096
  if (config.resources) draft.resources = [...draft.resources, ...config.resources];
1093
1097
  if (config.formats) draft.formats = {
1094
1098
  ...draft.formats,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@x18n/node",
3
3
  "type": "module",
4
- "version": "0.0.10",
4
+ "version": "0.0.12",
5
5
  "description": "Node.js host for x18n: file system access, config and plugin loading",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -25,8 +25,8 @@
25
25
  "node": ">=22"
26
26
  },
27
27
  "dependencies": {
28
- "@x18n/builtins": "0.0.10",
29
- "@x18n/core": "0.0.10",
28
+ "@x18n/builtins": "0.0.12",
29
+ "@x18n/core": "0.0.12",
30
30
  "chokidar": "^6.0.0",
31
31
  "ignore": "^7.0.13",
32
32
  "jiti": "^2.7.0",