@x18n/node 0.0.10 → 0.0.13

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 +15 -5
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -719,10 +719,17 @@ const keygenStyles = {
719
719
  "kebab-case": "kebab"
720
720
  };
721
721
  const editorSettings = {
722
- annotations: "x18n.annotations",
723
- annotationInPlace: "x18n.inPlace",
724
- annotationMaxLength: "x18n.annotationMaxLength",
725
- displayLanguage: "x18n.displayLocale"
722
+ "annotations": "x18n.annotations",
723
+ "annotationInPlace": "x18n.annotationInPlace",
724
+ "annotationInPlaceFullMatch": "x18n.annotationInPlaceFullMatch",
725
+ "annotationMaxLength": "x18n.annotationMaxLength",
726
+ "displayLanguage": "x18n.displayLocale",
727
+ "showFlags": "x18n.showFlags",
728
+ "theme.annotation": "x18n.theme.annotation",
729
+ "theme.annotationMissing": "x18n.theme.annotationMissing",
730
+ "theme.annotationBorder": "x18n.theme.annotationBorder",
731
+ "theme.annotationMissingBorder": "x18n.theme.annotationMissingBorder",
732
+ "theme.annotationInPlaceFullMatch": "x18n.theme.annotationInPlaceFullMatch"
726
733
  };
727
734
  const handledByDefaults = [
728
735
  "readonly",
@@ -731,7 +738,6 @@ const handledByDefaults = [
731
738
  "includeSubfolders",
732
739
  "ignoreFiles",
733
740
  "editor.preferEditor",
734
- "showFlags",
735
741
  "annotationDelimiter",
736
742
  "languageTagSystem",
737
743
  "targetPickingStrategy",
@@ -1089,6 +1095,10 @@ async function i18nAllyFallback(root) {
1089
1095
  function applyDefaults(draft, config) {
1090
1096
  if (config.sourceLocale) draft.sourceLocale = config.sourceLocale;
1091
1097
  if (config.ignoreLocales) draft.ignoreLocales = [...draft.ignoreLocales, ...config.ignoreLocales];
1098
+ if (config.localeFallbacks) draft.localeFallbacks = draft.localeFallbacks === "auto" || config.localeFallbacks === "auto" ? config.localeFallbacks : {
1099
+ ...draft.localeFallbacks,
1100
+ ...config.localeFallbacks
1101
+ };
1092
1102
  if (config.resources) draft.resources = [...draft.resources, ...config.resources];
1093
1103
  if (config.formats) draft.formats = {
1094
1104
  ...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.13",
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.13",
29
+ "@x18n/core": "0.0.13",
30
30
  "chokidar": "^6.0.0",
31
31
  "ignore": "^7.0.13",
32
32
  "jiti": "^2.7.0",