@intlayer/unmerged-dictionaries-entry 8.9.1 → 8.9.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["defaultConfiguration"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/unmerged-dictionaries-entry is a package that only returns the unmerged dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = defaultConfiguration\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, any> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;AAmBA,MAAa,2BACX,gBAAgCA,mCAC7B;CACH,MAAM,EAAE,WAAW;CACnB,MAAM,EAAE,4BAA4B;CAEpC,MAAM,eAAoC,EAAE;AAE5C,6BAAe,wBAAwB,EAAE;EAEvC,MAAM,iCAAoB,wBAAwB,CAAC,QAAQ,SACzD,KAAK,SAAS,QAAQ,CACvB;AAED,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,8BAAe,6BAAc,KAAK,CAAC;GACzC,MAAM,wDACC,yBAAyB,KAAK,EACnC,QACD;AACD,gBAAa,OAAO,KAAK,MAAM,QAAQ;;;AAI3C,QAAO"}
1
+ {"version":3,"file":"index.cjs","names":["defaultConfiguration"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/unmerged-dictionaries-entry is a package that only returns the unmerged dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = defaultConfiguration\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, any> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;AAmBA,MAAa,2BACX,gBAAgCA,mCAC7B;CACH,MAAM,EAAE,WAAW;CACnB,MAAM,EAAE,4BAA4B;CAEpC,MAAM,eAAoC,EAAE;CAE5C,4BAAe,wBAAwB,EAAE;EAEvC,MAAM,iCAAoB,wBAAwB,CAAC,QAAQ,SACzD,KAAK,SAAS,QAAQ,CACvB;EAED,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,8BAAe,6BAAc,KAAK,CAAC;GACzC,MAAM,wDACC,yBAAyB,KAAK,EACnC,QACD;GACD,aAAa,OAAO,KAAK,MAAM,QAAQ;;;CAI3C,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/unmerged-dictionaries-entry is a package that only returns the unmerged dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = defaultConfiguration\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, any> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAa,2BACX,gBAAgC,yBAC7B;CACH,MAAM,EAAE,WAAW;CACnB,MAAM,EAAE,4BAA4B;CAEpC,MAAM,eAAoC,EAAE;AAE5C,KAAI,WAAW,wBAAwB,EAAE;EAEvC,MAAM,QAAQ,YAAY,wBAAwB,CAAC,QAAQ,SACzD,KAAK,SAAS,QAAQ,CACvB;AAED,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,SAAS,MAAM,QAAQ,KAAK,CAAC;GACzC,MAAM,UAAU,aACd,KAAK,yBAAyB,KAAK,EACnC,QACD;AACD,gBAAa,OAAO,KAAK,MAAM,QAAQ;;;AAI3C,QAAO"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/unmerged-dictionaries-entry is a package that only returns the unmerged dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { default as defaultConfiguration } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = defaultConfiguration\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, any> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAa,2BACX,gBAAgC,yBAC7B;CACH,MAAM,EAAE,WAAW;CACnB,MAAM,EAAE,4BAA4B;CAEpC,MAAM,eAAoC,EAAE;CAE5C,IAAI,WAAW,wBAAwB,EAAE;EAEvC,MAAM,QAAQ,YAAY,wBAAwB,CAAC,QAAQ,SACzD,KAAK,SAAS,QAAQ,CACvB;EAED,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,SAAS,MAAM,QAAQ,KAAK,CAAC;GACzC,MAAM,UAAU,aACd,KAAK,yBAAyB,KAAK,EACnC,QACD;GACD,aAAa,OAAO,KAAK,MAAM,QAAQ;;;CAI3C,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/unmerged-dictionaries-entry",
3
- "version": "8.9.1",
3
+ "version": "8.9.3",
4
4
  "private": false,
5
5
  "description": "Provides the entry path for Intlayer dictionaries, solving filesystem retrieval issues for bundlers like Webpack and Rollup.",
6
6
  "keywords": [
@@ -71,16 +71,16 @@
71
71
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
72
72
  },
73
73
  "dependencies": {
74
- "@intlayer/config": "8.9.1"
74
+ "@intlayer/config": "8.9.3"
75
75
  },
76
76
  "devDependencies": {
77
- "@intlayer/types": "8.9.1",
78
- "@types/node": "25.6.0",
77
+ "@intlayer/types": "8.9.3",
78
+ "@types/node": "25.6.1",
79
79
  "@utils/ts-config": "1.0.4",
80
80
  "@utils/ts-config-types": "1.0.4",
81
81
  "@utils/tsdown-config": "1.0.4",
82
82
  "rimraf": "6.1.3",
83
- "tsdown": "0.21.10",
83
+ "tsdown": "0.22.00",
84
84
  "typescript": "6.0.3",
85
85
  "vitest": "4.1.5"
86
86
  },