@intlayer/dictionaries-entry 7.5.0-canary.1 → 7.5.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.
@@ -1,9 +1,9 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
2
  let node_fs = require("node:fs");
3
3
  let node_path = require("node:path");
4
- let __intlayer_config = require("@intlayer/config");
5
- let __intlayer_config_built = require("@intlayer/config/built");
6
- __intlayer_config_built = require_rolldown_runtime.__toESM(__intlayer_config_built);
4
+ let _intlayer_config = require("@intlayer/config");
5
+ let _intlayer_config_built = require("@intlayer/config/built");
6
+ _intlayer_config_built = require_rolldown_runtime.__toESM(_intlayer_config_built);
7
7
 
8
8
  //#region src/index.ts
9
9
  /**
@@ -11,13 +11,13 @@ __intlayer_config_built = require_rolldown_runtime.__toESM(__intlayer_config_bui
11
11
  * Using an external package allow to alias it in the bundle configuration (such as webpack).
12
12
  * The alias allow hot reload the app (such as nextjs) on any dictionary change.
13
13
  */
14
- const getDictionaries = (configuration = __intlayer_config_built.default) => {
14
+ const getDictionaries = (configuration = _intlayer_config_built.default) => {
15
15
  const { content, build } = configuration;
16
16
  const dictionariesPath = (0, node_path.join)(content.mainDir, `dictionaries.cjs`);
17
17
  let dictionaries = {};
18
18
  if ((0, node_fs.existsSync)(dictionariesPath)) {
19
- (0, __intlayer_config.clearModuleCache)(dictionariesPath);
20
- dictionaries = (build.require ?? __intlayer_config.configESMxCJSRequire)(dictionariesPath);
19
+ (0, _intlayer_config.clearModuleCache)(dictionariesPath);
20
+ dictionaries = (build.require ?? _intlayer_config.configESMxCJSRequire)(dictionariesPath);
21
21
  }
22
22
  return dictionaries ?? {};
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["getDictionaries: GetDictionaries","config","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dictionaries-entry is a package that only returns the 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 } from 'node:fs';\nimport { join } from 'node:path';\nimport { clearModuleCache, configESMxCJSRequire } from '@intlayer/config';\nimport config from '@intlayer/config/built';\nimport type { DictionaryRegistry, IntlayerConfig } from '@intlayer/types';\n\ntype GetDictionaries = (configuration?: IntlayerConfig) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: IntlayerConfig = config\n) => {\n const { content, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(content.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n // Clear cache for dictionaries.cjs and all its dependencies (JSON files)\n clearModuleCache(dictionariesPath);\n\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAaA,mBACX,gBAAgCC,oCAC7B;CACH,MAAM,EAAE,SAAS,UAAU;CAG3B,MAAM,uCAAwB,QAAQ,SAAS,mBAAmB;CAElE,IAAI,eAAe,EAAE;AACrB,6BAAe,iBAAiB,EAAE;AAEhC,0CAAiB,iBAAiB;AAElC,kBAAgB,MAAM,WAAWC,wCAAsB,iBAAiB;;AAG1E,QAAQ,gBAAgB,EAAE"}
1
+ {"version":3,"file":"index.cjs","names":["getDictionaries: GetDictionaries","config","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dictionaries-entry is a package that only returns the 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 } from 'node:fs';\nimport { join } from 'node:path';\nimport { clearModuleCache, configESMxCJSRequire } from '@intlayer/config';\nimport config from '@intlayer/config/built';\nimport type { DictionaryRegistry, IntlayerConfig } from '@intlayer/types';\n\ntype GetDictionaries = (configuration?: IntlayerConfig) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: IntlayerConfig = config\n) => {\n const { content, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(content.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n // Clear cache for dictionaries.cjs and all its dependencies (JSON files)\n clearModuleCache(dictionariesPath);\n\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAaA,mBACX,gBAAgCC,mCAC7B;CACH,MAAM,EAAE,SAAS,UAAU;CAG3B,MAAM,uCAAwB,QAAQ,SAAS,mBAAmB;CAElE,IAAI,eAAe,EAAE;AACrB,6BAAe,iBAAiB,EAAE;AAEhC,yCAAiB,iBAAiB;AAElC,kBAAgB,MAAM,WAAWC,uCAAsB,iBAAiB;;AAG1E,QAAQ,gBAAgB,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/dictionaries-entry",
3
- "version": "7.5.0-canary.1",
3
+ "version": "7.5.0",
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": [
@@ -77,16 +77,16 @@
77
77
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
78
78
  },
79
79
  "dependencies": {
80
- "@intlayer/config": "7.5.0-canary.1"
80
+ "@intlayer/config": "7.5.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@intlayer/types": "7.5.0-canary.1",
84
- "@types/node": "25.0.2",
83
+ "@intlayer/types": "7.5.0",
84
+ "@types/node": "25.0.3",
85
85
  "@utils/ts-config": "1.0.4",
86
86
  "@utils/ts-config-types": "1.0.4",
87
87
  "@utils/tsdown-config": "1.0.4",
88
88
  "rimraf": "6.1.2",
89
- "tsdown": "0.18.0",
89
+ "tsdown": "0.18.1",
90
90
  "typescript": "5.9.3",
91
91
  "vitest": "4.0.16"
92
92
  },