react-native-intlayer 5.3.8 → 5.3.10

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.
@@ -62,6 +62,11 @@ const configMetroIntlayer = async (baseConfig) => {
62
62
  filePath: require.resolve("@intlayer/config/client"),
63
63
  type: "sourceFile"
64
64
  };
65
+ } else if (moduleName.startsWith("@intlayer/core/file")) {
66
+ return {
67
+ filePath: require.resolve(moduleName.replace("/file", "/file/browser")),
68
+ type: "sourceFile"
69
+ };
65
70
  }
66
71
  return (0, import_metro_resolver.resolve)(context, moduleName, platform);
67
72
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { getDefaultConfig } from 'expo/metro-config';\nimport { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\nimport { resolve } from 'metro-resolver';\nimport { exclusionList } from './exclusionList';\nimport { prepareIntlayer } from '@intlayer/chokidar';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig: MetroConfig\n): Promise<MetroConfig> => {\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n const { mainDir, configDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.cjs');\n const configurationPath = join(configDir, 'configuration.json');\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...baseConfig.resolver,\n resolveRequest: (context, moduleName, platform) => {\n if (moduleName === '@intlayer/dictionaries-entry') {\n return {\n filePath: require.resolve(dictionariesPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/built') {\n return {\n filePath: require.resolve(configurationPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n }\n\n // Prevent infinite recursion\n return resolve(context, moduleName, platform);\n },\n blockList: exclusionList([\n ...[baseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAiC;AACjC,kBAAqB;AACrB,4BAAwB;AACxB,2BAA8B;AAC9B,sBAAgC;AAgBzB,MAAM,sBAAsB,OACjC,eACyB;AACzB,QAAM,qBAAiB,gCAAiB;AAExC,YAAM,iCAAgB,cAAc;AAEpC,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAE9C,QAAM,uBAAmB,kBAAK,SAAS,kBAAkB;AACzD,QAAM,wBAAoB,kBAAK,WAAW,oBAAoB;AAE9D,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,WAAW;AAAA,MACd,gBAAgB,CAAC,SAAS,YAAY,aAAa;AACjD,YAAI,eAAe,gCAAgC;AACjD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,gBAAgB;AAAA,YAC1C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,0BAA0B;AAClD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,iBAAiB;AAAA,YAC3C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,2BAA2B;AACnD,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,mBAAO,+BAAQ,SAAS,YAAY,QAAQ;AAAA,MAC9C;AAAA,MACA,eAAW,oCAAc;AAAA,QACvB,GAAG,CAAC,WAAW,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAG/C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { getDefaultConfig } from 'expo/metro-config';\nimport { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\nimport { resolve } from 'metro-resolver';\nimport { exclusionList } from './exclusionList';\nimport { prepareIntlayer } from '@intlayer/chokidar';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig: MetroConfig\n): Promise<MetroConfig> => {\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n const { mainDir, configDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.cjs');\n const configurationPath = join(configDir, 'configuration.json');\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...baseConfig.resolver,\n resolveRequest: (context, moduleName, platform) => {\n if (moduleName === '@intlayer/dictionaries-entry') {\n return {\n filePath: require.resolve(dictionariesPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/built') {\n return {\n filePath: require.resolve(configurationPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n } else if (moduleName.startsWith('@intlayer/core/file')) {\n // Force React Native to use the correct transpiled version\n return {\n filePath: require.resolve(\n moduleName.replace('/file', '/file/browser')\n ),\n type: 'sourceFile',\n };\n }\n\n // Prevent infinite recursion\n return resolve(context, moduleName, platform);\n },\n blockList: exclusionList([\n ...[baseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAiC;AACjC,kBAAqB;AACrB,4BAAwB;AACxB,2BAA8B;AAC9B,sBAAgC;AAgBzB,MAAM,sBAAsB,OACjC,eACyB;AACzB,QAAM,qBAAiB,gCAAiB;AAExC,YAAM,iCAAgB,cAAc;AAEpC,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAE9C,QAAM,uBAAmB,kBAAK,SAAS,kBAAkB;AACzD,QAAM,wBAAoB,kBAAK,WAAW,oBAAoB;AAE9D,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,WAAW;AAAA,MACd,gBAAgB,CAAC,SAAS,YAAY,aAAa;AACjD,YAAI,eAAe,gCAAgC;AACjD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,gBAAgB;AAAA,YAC1C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,0BAA0B;AAClD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,iBAAiB;AAAA,YAC3C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,2BAA2B;AACnD,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF,WAAW,WAAW,WAAW,qBAAqB,GAAG;AAEvD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAChB,WAAW,QAAQ,SAAS,eAAe,CAC7C;AAAA,YACA,MAAM;AAAA,UACR;AAAA,QACF;AAGA,mBAAO,+BAAQ,SAAS,YAAY,QAAQ;AAAA,MAC9C;AAAA,MACA,eAAW,oCAAc;AAAA,QACvB,GAAG,CAAC,WAAW,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAG/C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -29,6 +29,11 @@ const configMetroIntlayer = async (baseConfig) => {
29
29
  filePath: require.resolve("@intlayer/config/client"),
30
30
  type: "sourceFile"
31
31
  };
32
+ } else if (moduleName.startsWith("@intlayer/core/file")) {
33
+ return {
34
+ filePath: require.resolve(moduleName.replace("/file", "/file/browser")),
35
+ type: "sourceFile"
36
+ };
32
37
  }
33
38
  return resolve(context, moduleName, platform);
34
39
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { getDefaultConfig } from 'expo/metro-config';\nimport { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\nimport { resolve } from 'metro-resolver';\nimport { exclusionList } from './exclusionList';\nimport { prepareIntlayer } from '@intlayer/chokidar';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig: MetroConfig\n): Promise<MetroConfig> => {\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n const { mainDir, configDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.cjs');\n const configurationPath = join(configDir, 'configuration.json');\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...baseConfig.resolver,\n resolveRequest: (context, moduleName, platform) => {\n if (moduleName === '@intlayer/dictionaries-entry') {\n return {\n filePath: require.resolve(dictionariesPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/built') {\n return {\n filePath: require.resolve(configurationPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n }\n\n // Prevent infinite recursion\n return resolve(context, moduleName, platform);\n },\n blockList: exclusionList([\n ...[baseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":"AACA,SAAS,wBAAwB;AACjC,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAgBzB,MAAM,sBAAsB,OACjC,eACyB;AACzB,QAAM,iBAAiB,iBAAiB;AAExC,QAAM,gBAAgB,cAAc;AAEpC,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAE9C,QAAM,mBAAmB,KAAK,SAAS,kBAAkB;AACzD,QAAM,oBAAoB,KAAK,WAAW,oBAAoB;AAE9D,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,WAAW;AAAA,MACd,gBAAgB,CAAC,SAAS,YAAY,aAAa;AACjD,YAAI,eAAe,gCAAgC;AACjD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,gBAAgB;AAAA,YAC1C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,0BAA0B;AAClD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,iBAAiB;AAAA,YAC3C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,2BAA2B;AACnD,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,eAAO,QAAQ,SAAS,YAAY,QAAQ;AAAA,MAC9C;AAAA,MACA,WAAW,cAAc;AAAA,QACvB,GAAG,CAAC,WAAW,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAG/C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { getDefaultConfig } from 'expo/metro-config';\nimport { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\nimport { resolve } from 'metro-resolver';\nimport { exclusionList } from './exclusionList';\nimport { prepareIntlayer } from '@intlayer/chokidar';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig: MetroConfig\n): Promise<MetroConfig> => {\n const intlayerConfig = getConfiguration();\n\n await prepareIntlayer(intlayerConfig);\n\n const { mainDir, configDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.cjs');\n const configurationPath = join(configDir, 'configuration.json');\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...baseConfig.resolver,\n resolveRequest: (context, moduleName, platform) => {\n if (moduleName === '@intlayer/dictionaries-entry') {\n return {\n filePath: require.resolve(dictionariesPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/built') {\n return {\n filePath: require.resolve(configurationPath),\n type: 'sourceFile',\n };\n } else if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n } else if (moduleName.startsWith('@intlayer/core/file')) {\n // Force React Native to use the correct transpiled version\n return {\n filePath: require.resolve(\n moduleName.replace('/file', '/file/browser')\n ),\n type: 'sourceFile',\n };\n }\n\n // Prevent infinite recursion\n return resolve(context, moduleName, platform);\n },\n blockList: exclusionList([\n ...[baseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":"AACA,SAAS,wBAAwB;AACjC,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAgBzB,MAAM,sBAAsB,OACjC,eACyB;AACzB,QAAM,iBAAiB,iBAAiB;AAExC,QAAM,gBAAgB,cAAc;AAEpC,QAAM,EAAE,SAAS,UAAU,IAAI,eAAe;AAE9C,QAAM,mBAAmB,KAAK,SAAS,kBAAkB;AACzD,QAAM,oBAAoB,KAAK,WAAW,oBAAoB;AAE9D,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,WAAW;AAAA,MACd,gBAAgB,CAAC,SAAS,YAAY,aAAa;AACjD,YAAI,eAAe,gCAAgC;AACjD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,gBAAgB;AAAA,YAC1C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,0BAA0B;AAClD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAAQ,iBAAiB;AAAA,YAC3C,MAAM;AAAA,UACR;AAAA,QACF,WAAW,eAAe,2BAA2B;AACnD,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF,WAAW,WAAW,WAAW,qBAAqB,GAAG;AAEvD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAChB,WAAW,QAAQ,SAAS,eAAe,CAC7C;AAAA,YACA,MAAM;AAAA,UACR;AAAA,QACF;AAGA,eAAO,QAAQ,SAAS,YAAY,QAAQ;AAAA,MAC9C;AAAA,MACA,WAAW,cAAc;AAAA,QACvB,GAAG,CAAC,WAAW,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAG/C;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"configMetroIntlayer.d.ts","sourceRoot":"","sources":["../../src/configMetroIntlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOrD,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,WAAW,KACtB,OAAO,CAAC,WAAW,CA8CrB,CAAC"}
1
+ {"version":3,"file":"configMetroIntlayer.d.ts","sourceRoot":"","sources":["../../src/configMetroIntlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOrD,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,WAAW,KACtB,OAAO,CAAC,WAAW,CAsDrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-intlayer",
3
- "version": "5.3.8",
3
+ "version": "5.3.10",
4
4
  "private": false,
5
5
  "description": "A React Native plugin for seamless internationalization (i18n), providing locale detection, redirection, and environment-based configuration",
6
6
  "keywords": [
@@ -63,22 +63,22 @@
63
63
  "./package.json"
64
64
  ],
65
65
  "dependencies": {
66
- "@intlayer/chokidar": "5.3.8",
67
- "@intlayer/core": "5.3.8",
68
- "@intlayer/config": "5.3.8"
66
+ "@intlayer/chokidar": "5.3.10",
67
+ "@intlayer/config": "5.3.10",
68
+ "@intlayer/core": "5.3.10"
69
69
  },
70
70
  "devDependencies": {
71
- "@types/node": "^22.10.6",
72
- "@typescript-eslint/parser": "^8.24.0",
71
+ "@types/node": "^22.13.10",
72
+ "@typescript-eslint/parser": "^8.27.0",
73
73
  "concurrently": "^9.1.2",
74
- "eslint": "^9.20.0",
74
+ "eslint": "^9.22.0",
75
75
  "expo": "^52.0.37",
76
76
  "metro-resolver": "^0.82.0",
77
- "prettier": "^3.5.0",
77
+ "prettier": "^3.5.3",
78
78
  "rimraf": "^6.0.1",
79
- "tsc-alias": "^1.8.10",
80
- "tsup": "^8.3.5",
81
- "typescript": "^5.7.3",
79
+ "tsc-alias": "^1.8.11",
80
+ "tsup": "^8.4.0",
81
+ "typescript": "^5.8.2",
82
82
  "@utils/eslint-config": "1.0.4",
83
83
  "@utils/ts-config": "1.0.4",
84
84
  "@utils/ts-config-types": "1.0.4",
@@ -87,9 +87,9 @@
87
87
  "peerDependencies": {
88
88
  "expo": "^52.0.37",
89
89
  "metro-resolver": "^0.82.0",
90
- "@intlayer/chokidar": "5.3.8",
91
- "@intlayer/config": "5.3.8",
92
- "@intlayer/core": "5.3.8"
90
+ "@intlayer/chokidar": "5.3.10",
91
+ "@intlayer/config": "5.3.10",
92
+ "@intlayer/core": "5.3.10"
93
93
  },
94
94
  "engines": {
95
95
  "node": ">=14.18"