@intlayer/dictionaries-entry 7.0.6 → 7.0.8-canary.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.
- package/dist/cjs/index.cjs +5 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +5 -0
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
2
|
let node_fs = require("node:fs");
|
|
3
|
-
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
4
3
|
let node_path = require("node:path");
|
|
5
|
-
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
6
4
|
let __intlayer_config = require("@intlayer/config");
|
|
7
|
-
__intlayer_config = require_rolldown_runtime.__toESM(__intlayer_config);
|
|
8
5
|
let __intlayer_config_built = require("@intlayer/config/built");
|
|
9
6
|
__intlayer_config_built = require_rolldown_runtime.__toESM(__intlayer_config_built);
|
|
10
7
|
|
|
11
8
|
//#region src/index.ts
|
|
9
|
+
/**
|
|
10
|
+
* @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.
|
|
11
|
+
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
12
|
+
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
13
|
+
*/
|
|
12
14
|
const getDictionaries = (configuration = __intlayer_config_built.default) => {
|
|
13
15
|
const { content, build } = configuration;
|
|
14
16
|
const dictionariesPath = (0, node_path.join)(content.mainDir, `dictionaries.cjs`);
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4,6 +4,11 @@ import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config";
|
|
|
4
4
|
import config from "@intlayer/config/built";
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
7
|
+
/**
|
|
8
|
+
* @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.
|
|
9
|
+
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
10
|
+
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
11
|
+
*/
|
|
7
12
|
const getDictionaries = (configuration = config) => {
|
|
8
13
|
const { content, build } = configuration;
|
|
9
14
|
const dictionariesPath = join(content.mainDir, `dictionaries.cjs`);
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["getDictionaries: GetDictionaries"],"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":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["getDictionaries: GetDictionaries"],"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,gBAAgC,WAC7B;CACH,MAAM,EAAE,SAAS,UAAU;CAG3B,MAAM,mBAAmB,KAAK,QAAQ,SAAS,mBAAmB;CAElE,IAAI,eAAe,EAAE;AACrB,KAAI,WAAW,iBAAiB,EAAE;AAEhC,mBAAiB,iBAAiB;AAElC,kBAAgB,MAAM,WAAW,sBAAsB,iBAAiB;;AAG1E,QAAQ,gBAAgB,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/dictionaries-entry",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.8-canary.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": [
|
|
@@ -73,21 +73,21 @@
|
|
|
73
73
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@intlayer/config": "7.0.
|
|
76
|
+
"@intlayer/config": "7.0.8-canary.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@types/node": "24.
|
|
80
|
-
"@utils/ts-config": "7.0.
|
|
81
|
-
"@utils/ts-config-types": "7.0.
|
|
82
|
-
"@utils/tsdown-config": "7.0.
|
|
83
|
-
"rimraf": "6.0
|
|
84
|
-
"tsdown": "0.
|
|
79
|
+
"@types/node": "24.10.0",
|
|
80
|
+
"@utils/ts-config": "7.0.8-canary.0",
|
|
81
|
+
"@utils/ts-config-types": "7.0.8-canary.0",
|
|
82
|
+
"@utils/tsdown-config": "7.0.8-canary.0",
|
|
83
|
+
"rimraf": "6.1.0",
|
|
84
|
+
"tsdown": "0.16.0",
|
|
85
85
|
"typescript": "5.9.3",
|
|
86
|
-
"vitest": "4.0.
|
|
86
|
+
"vitest": "4.0.7"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@intlayer/config": "7.0.
|
|
90
|
-
"@intlayer/types": "7.0.
|
|
89
|
+
"@intlayer/config": "7.0.8-canary.0",
|
|
90
|
+
"@intlayer/types": "7.0.8-canary.0"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|
|
93
93
|
"node": ">=14.18"
|