next-intlayer 5.0.5 → 5.1.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/server/withIntlayer.cjs +48 -26
- package/dist/cjs/server/withIntlayer.cjs.map +1 -1
- package/dist/esm/server/withIntlayer.mjs +38 -26
- package/dist/esm/server/withIntlayer.mjs.map +1 -1
- package/dist/types/server/withIntlayer.d.ts +1 -2
- package/dist/types/server/withIntlayer.d.ts.map +1 -1
- package/package.json +20 -20
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var withIntlayer_exports = {};
|
|
20
30
|
__export(withIntlayer_exports, {
|
|
@@ -24,42 +34,53 @@ module.exports = __toCommonJS(withIntlayer_exports);
|
|
|
24
34
|
var import_path = require("path");
|
|
25
35
|
var import_config = require("@intlayer/config");
|
|
26
36
|
var import_webpack = require("@intlayer/webpack");
|
|
37
|
+
var import_package = __toESM(require("next/package.json"));
|
|
38
|
+
const nextMajorVersion = parseInt(import_package.default.version.split(".")[0], 10);
|
|
39
|
+
const isTurbopackEnabled = process.env.npm_lifecycle_script?.includes("--turbo");
|
|
27
40
|
const withIntlayer = (nextConfig = {}) => {
|
|
28
|
-
if (typeof nextConfig !== "object")
|
|
41
|
+
if (typeof nextConfig !== "object") {
|
|
42
|
+
nextConfig = {};
|
|
43
|
+
}
|
|
29
44
|
const intlayerConfig = (0, import_config.getConfiguration)();
|
|
30
45
|
const env = (0, import_config.formatEnvVariable)("next");
|
|
31
46
|
const { mainDir, baseDir } = intlayerConfig.content;
|
|
32
47
|
const dictionariesPath = (0, import_path.join)(mainDir, "dictionaries.mjs");
|
|
33
48
|
const relativeDictionariesPath = (0, import_path.relative)(baseDir, dictionariesPath);
|
|
34
|
-
|
|
49
|
+
const turboConfig = isTurbopackEnabled ? {
|
|
50
|
+
turbo: {
|
|
51
|
+
...nextConfig.experimental?.turbo ?? {},
|
|
52
|
+
resolveAlias: {
|
|
53
|
+
...nextConfig.experimental?.turbo?.resolveAlias ?? {},
|
|
54
|
+
"@intlayer/dictionaries-entry": relativeDictionariesPath
|
|
55
|
+
},
|
|
56
|
+
rules: {
|
|
57
|
+
"*.node": {
|
|
58
|
+
as: "*.node",
|
|
59
|
+
loaders: ["node-loader"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
} : {};
|
|
64
|
+
const newConfig = {
|
|
65
|
+
// Merge environment variables
|
|
35
66
|
env: { ...nextConfig.env, ...env },
|
|
36
|
-
serverExternalPackages
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
67
|
+
// Only add `serverExternalPackages` if Next.js is v15+
|
|
68
|
+
...nextMajorVersion >= 15 ? {
|
|
69
|
+
serverExternalPackages: [
|
|
70
|
+
...nextConfig.serverExternalPackages ?? [],
|
|
71
|
+
"esbuild",
|
|
72
|
+
"module",
|
|
73
|
+
"fs",
|
|
74
|
+
"chokidar",
|
|
75
|
+
"fsevents"
|
|
76
|
+
]
|
|
77
|
+
} : {},
|
|
44
78
|
experimental: {
|
|
45
79
|
...nextConfig.experimental ?? {},
|
|
46
|
-
|
|
47
|
-
turbo: {
|
|
48
|
-
...nextConfig.experimental?.turbo ?? {},
|
|
49
|
-
resolveAlias: {
|
|
50
|
-
...nextConfig.experimental?.turbo?.resolveAlias ?? {},
|
|
51
|
-
"@intlayer/dictionaries-entry": (0, import_path.resolve)(relativeDictionariesPath)
|
|
52
|
-
},
|
|
53
|
-
rules: {
|
|
54
|
-
"*.node": {
|
|
55
|
-
as: "*.node",
|
|
56
|
-
loaders: ["node-loader"]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
80
|
+
...turboConfig
|
|
60
81
|
},
|
|
61
82
|
webpack: (config, options) => {
|
|
62
|
-
if (nextConfig.webpack) {
|
|
83
|
+
if (typeof nextConfig.webpack === "function") {
|
|
63
84
|
config = nextConfig.webpack(config, options);
|
|
64
85
|
}
|
|
65
86
|
config.resolve.alias["@intlayer/dictionaries-entry"] = (0, import_path.resolve)(
|
|
@@ -82,7 +103,8 @@ const withIntlayer = (nextConfig = {}) => {
|
|
|
82
103
|
}
|
|
83
104
|
return config;
|
|
84
105
|
}
|
|
85
|
-
}
|
|
106
|
+
};
|
|
107
|
+
return { ...nextConfig, ...newConfig };
|
|
86
108
|
};
|
|
87
109
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
110
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/withIntlayer.ts"],"sourcesContent":["import { resolve, relative, join } from 'path';\nimport { getConfiguration, formatEnvVariable } from '@intlayer/config';\nimport { IntlayerPlugin } from '@intlayer/webpack';\nimport type { NextConfig } from 'next';\nimport type { NextJsWebpackConfig } from 'next/dist/server/config-shared';\n\ntype WebpackParams = Parameters<NextJsWebpackConfig>;\n\n/**\n * A Next.js plugin that adds the intlayer configuration to the webpack configuration\n * and sets the environment variables\n *\n * Usage:\n *\n * ```ts\n * // next.config.js\n * export default withIntlayer(nextConfig)\n * ```\n
|
|
1
|
+
{"version":3,"sources":["../../../src/server/withIntlayer.ts"],"sourcesContent":["import { resolve, relative, join } from 'path';\nimport { getConfiguration, formatEnvVariable } from '@intlayer/config';\nimport { IntlayerPlugin } from '@intlayer/webpack';\nimport type { NextConfig } from 'next';\nimport type { NextJsWebpackConfig } from 'next/dist/server/config-shared';\nimport nextPkg from 'next/package.json' with { type: 'json' };\n\nconst nextMajorVersion = parseInt(nextPkg.version.split('.')[0], 10);\n\n// Extract from the start script if --turbo or --turbopack flag is used\nconst isTurbopackEnabled =\n process.env.npm_lifecycle_script?.includes('--turbo');\n\ntype WebpackParams = Parameters<NextJsWebpackConfig>;\n\n/**\n * A Next.js plugin that adds the intlayer configuration to the webpack configuration\n * and sets the environment variables\n *\n * Usage:\n *\n * ```ts\n * // next.config.js\n * export default withIntlayer(nextConfig)\n * ```\n */\nexport const withIntlayer = <T extends Partial<NextConfig>>(\n nextConfig: T = {} as T\n): NextConfig & T => {\n if (typeof nextConfig !== 'object') {\n nextConfig = {} as T;\n }\n\n const intlayerConfig = getConfiguration();\n\n // Format all configuration values as environment variables\n const env = formatEnvVariable('next');\n const { mainDir, baseDir } = intlayerConfig.content;\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n // Only provide turbo-specific config if user explicitly sets it\n const turboConfig = isTurbopackEnabled\n ? {\n turbo: {\n ...(nextConfig.experimental?.turbo ?? {}),\n resolveAlias: {\n ...(nextConfig.experimental?.turbo?.resolveAlias ?? {}),\n '@intlayer/dictionaries-entry': relativeDictionariesPath,\n },\n rules: {\n '*.node': {\n as: '*.node',\n loaders: ['node-loader'],\n },\n },\n },\n }\n : {};\n\n const newConfig: Partial<NextConfig> = {\n // Merge environment variables\n env: { ...nextConfig.env, ...env },\n\n // Only add `serverExternalPackages` if Next.js is v15+\n ...(nextMajorVersion >= 15\n ? {\n serverExternalPackages: [\n ...(nextConfig.serverExternalPackages ?? []),\n 'esbuild',\n 'module',\n 'fs',\n 'chokidar',\n 'fsevents',\n ],\n }\n : {}),\n\n experimental: {\n ...(nextConfig.experimental ?? {}),\n ...turboConfig,\n },\n\n webpack: (config: WebpackParams['0'], options: WebpackParams[1]) => {\n // If the user has defined their own webpack config, call it\n if (typeof nextConfig.webpack === 'function') {\n config = nextConfig.webpack(config, options);\n }\n\n // Alias the dictionary entry for all builds\n config.resolve.alias['@intlayer/dictionaries-entry'] = resolve(\n relativeDictionariesPath\n );\n\n // Mark these modules as externals\n config.externals.push({\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n chokidar: 'chokidar',\n fsevents: 'fsevents',\n });\n\n // Use `node-loader` for any `.node` files\n config.module.rules.push({\n test: /\\.node$/,\n loader: 'node-loader',\n });\n\n // Only add Intlayer plugin on server side (node runtime)\n const { isServer, nextRuntime } = options;\n\n if (isServer && nextRuntime === 'nodejs') {\n config.plugins.push(new IntlayerPlugin());\n }\n\n return config;\n },\n };\n\n // Merge the new config with the user's config\n return { ...nextConfig, ...newConfig };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC;AACxC,oBAAoD;AACpD,qBAA+B;AAG/B,qBAAoB;AAEpB,MAAM,mBAAmB,SAAS,eAAAA,QAAQ,QAAQ,MAAM,GAAG,EAAE,CAAC,GAAG,EAAE;AAGnE,MAAM,qBACJ,QAAQ,IAAI,sBAAsB,SAAS,SAAS;AAe/C,MAAM,eAAe,CAC1B,aAAgB,CAAC,MACE;AACnB,MA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CAAC;AAGD,aAAO,OAAO,MAAM,KAAK;AAAA,QACvB,MAAM;AAAA,QACN,QAAQ;AAAA,MACV,CAAC;AAGD,YAAM,EAAE,UAAU,YAAY,IAAI;AAElC,UAAI,YAAY,gBAAgB,UAAU;AACxC,eAAO,QAAQ,KAAK,IAAI,8BAAe,CAAC;AAAA,MAC1C;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAGA,SAAO,EAAE,GAAG,YAAY,GAAG,UAAU;AACvC;","names":["nextPkg"]}
|
|
@@ -1,42 +1,53 @@
|
|
|
1
1
|
import { resolve, relative, join } from "path";
|
|
2
2
|
import { getConfiguration, formatEnvVariable } from "@intlayer/config";
|
|
3
3
|
import { IntlayerPlugin } from "@intlayer/webpack";
|
|
4
|
+
import nextPkg from "next/package.json" with { type: "json" };
|
|
5
|
+
const nextMajorVersion = parseInt(nextPkg.version.split(".")[0], 10);
|
|
6
|
+
const isTurbopackEnabled = process.env.npm_lifecycle_script?.includes("--turbo");
|
|
4
7
|
const withIntlayer = (nextConfig = {}) => {
|
|
5
|
-
if (typeof nextConfig !== "object")
|
|
8
|
+
if (typeof nextConfig !== "object") {
|
|
9
|
+
nextConfig = {};
|
|
10
|
+
}
|
|
6
11
|
const intlayerConfig = getConfiguration();
|
|
7
12
|
const env = formatEnvVariable("next");
|
|
8
13
|
const { mainDir, baseDir } = intlayerConfig.content;
|
|
9
14
|
const dictionariesPath = join(mainDir, "dictionaries.mjs");
|
|
10
15
|
const relativeDictionariesPath = relative(baseDir, dictionariesPath);
|
|
11
|
-
|
|
16
|
+
const turboConfig = isTurbopackEnabled ? {
|
|
17
|
+
turbo: {
|
|
18
|
+
...nextConfig.experimental?.turbo ?? {},
|
|
19
|
+
resolveAlias: {
|
|
20
|
+
...nextConfig.experimental?.turbo?.resolveAlias ?? {},
|
|
21
|
+
"@intlayer/dictionaries-entry": relativeDictionariesPath
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
"*.node": {
|
|
25
|
+
as: "*.node",
|
|
26
|
+
loaders: ["node-loader"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
} : {};
|
|
31
|
+
const newConfig = {
|
|
32
|
+
// Merge environment variables
|
|
12
33
|
env: { ...nextConfig.env, ...env },
|
|
13
|
-
serverExternalPackages
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
// Only add `serverExternalPackages` if Next.js is v15+
|
|
35
|
+
...nextMajorVersion >= 15 ? {
|
|
36
|
+
serverExternalPackages: [
|
|
37
|
+
...nextConfig.serverExternalPackages ?? [],
|
|
38
|
+
"esbuild",
|
|
39
|
+
"module",
|
|
40
|
+
"fs",
|
|
41
|
+
"chokidar",
|
|
42
|
+
"fsevents"
|
|
43
|
+
]
|
|
44
|
+
} : {},
|
|
21
45
|
experimental: {
|
|
22
46
|
...nextConfig.experimental ?? {},
|
|
23
|
-
|
|
24
|
-
turbo: {
|
|
25
|
-
...nextConfig.experimental?.turbo ?? {},
|
|
26
|
-
resolveAlias: {
|
|
27
|
-
...nextConfig.experimental?.turbo?.resolveAlias ?? {},
|
|
28
|
-
"@intlayer/dictionaries-entry": resolve(relativeDictionariesPath)
|
|
29
|
-
},
|
|
30
|
-
rules: {
|
|
31
|
-
"*.node": {
|
|
32
|
-
as: "*.node",
|
|
33
|
-
loaders: ["node-loader"]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
47
|
+
...turboConfig
|
|
37
48
|
},
|
|
38
49
|
webpack: (config, options) => {
|
|
39
|
-
if (nextConfig.webpack) {
|
|
50
|
+
if (typeof nextConfig.webpack === "function") {
|
|
40
51
|
config = nextConfig.webpack(config, options);
|
|
41
52
|
}
|
|
42
53
|
config.resolve.alias["@intlayer/dictionaries-entry"] = resolve(
|
|
@@ -59,7 +70,8 @@ const withIntlayer = (nextConfig = {}) => {
|
|
|
59
70
|
}
|
|
60
71
|
return config;
|
|
61
72
|
}
|
|
62
|
-
}
|
|
73
|
+
};
|
|
74
|
+
return { ...nextConfig, ...newConfig };
|
|
63
75
|
};
|
|
64
76
|
export {
|
|
65
77
|
withIntlayer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/withIntlayer.ts"],"sourcesContent":["import { resolve, relative, join } from 'path';\nimport { getConfiguration, formatEnvVariable } from '@intlayer/config';\nimport { IntlayerPlugin } from '@intlayer/webpack';\nimport type { NextConfig } from 'next';\nimport type { NextJsWebpackConfig } from 'next/dist/server/config-shared';\n\ntype WebpackParams = Parameters<NextJsWebpackConfig>;\n\n/**\n * A Next.js plugin that adds the intlayer configuration to the webpack configuration\n * and sets the environment variables\n *\n * Usage:\n *\n * ```ts\n * // next.config.js\n * export default withIntlayer(nextConfig)\n * ```\n
|
|
1
|
+
{"version":3,"sources":["../../../src/server/withIntlayer.ts"],"sourcesContent":["import { resolve, relative, join } from 'path';\nimport { getConfiguration, formatEnvVariable } from '@intlayer/config';\nimport { IntlayerPlugin } from '@intlayer/webpack';\nimport type { NextConfig } from 'next';\nimport type { NextJsWebpackConfig } from 'next/dist/server/config-shared';\nimport nextPkg from 'next/package.json' with { type: 'json' };\n\nconst nextMajorVersion = parseInt(nextPkg.version.split('.')[0], 10);\n\n// Extract from the start script if --turbo or --turbopack flag is used\nconst isTurbopackEnabled =\n process.env.npm_lifecycle_script?.includes('--turbo');\n\ntype WebpackParams = Parameters<NextJsWebpackConfig>;\n\n/**\n * A Next.js plugin that adds the intlayer configuration to the webpack configuration\n * and sets the environment variables\n *\n * Usage:\n *\n * ```ts\n * // next.config.js\n * export default withIntlayer(nextConfig)\n * ```\n */\nexport const withIntlayer = <T extends Partial<NextConfig>>(\n nextConfig: T = {} as T\n): NextConfig & T => {\n if (typeof nextConfig !== 'object') {\n nextConfig = {} as T;\n }\n\n const intlayerConfig = getConfiguration();\n\n // Format all configuration values as environment variables\n const env = formatEnvVariable('next');\n const { mainDir, baseDir } = intlayerConfig.content;\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n // Only provide turbo-specific config if user explicitly sets it\n const turboConfig = isTurbopackEnabled\n ? {\n turbo: {\n ...(nextConfig.experimental?.turbo ?? {}),\n resolveAlias: {\n ...(nextConfig.experimental?.turbo?.resolveAlias ?? {}),\n '@intlayer/dictionaries-entry': relativeDictionariesPath,\n },\n rules: {\n '*.node': {\n as: '*.node',\n loaders: ['node-loader'],\n },\n },\n },\n }\n : {};\n\n const newConfig: Partial<NextConfig> = {\n // Merge environment variables\n env: { ...nextConfig.env, ...env },\n\n // Only add `serverExternalPackages` if Next.js is v15+\n ...(nextMajorVersion >= 15\n ? {\n serverExternalPackages: [\n ...(nextConfig.serverExternalPackages ?? []),\n 'esbuild',\n 'module',\n 'fs',\n 'chokidar',\n 'fsevents',\n ],\n }\n : {}),\n\n experimental: {\n ...(nextConfig.experimental ?? {}),\n ...turboConfig,\n },\n\n webpack: (config: WebpackParams['0'], options: WebpackParams[1]) => {\n // If the user has defined their own webpack config, call it\n if (typeof nextConfig.webpack === 'function') {\n config = nextConfig.webpack(config, options);\n }\n\n // Alias the dictionary entry for all builds\n config.resolve.alias['@intlayer/dictionaries-entry'] = resolve(\n relativeDictionariesPath\n );\n\n // Mark these modules as externals\n config.externals.push({\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n chokidar: 'chokidar',\n fsevents: 'fsevents',\n });\n\n // Use `node-loader` for any `.node` files\n config.module.rules.push({\n test: /\\.node$/,\n loader: 'node-loader',\n });\n\n // Only add Intlayer plugin on server side (node runtime)\n const { isServer, nextRuntime } = options;\n\n if (isServer && nextRuntime === 'nodejs') {\n config.plugins.push(new IntlayerPlugin());\n }\n\n return config;\n },\n };\n\n // Merge the new config with the user's config\n return { ...nextConfig, ...newConfig };\n};\n"],"mappings":"AAAA,SAAS,SAAS,UAAU,YAAY;AACxC,SAAS,kBAAkB,yBAAyB;A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,YAAY,YAAY;AAC5C,iBAAS,WAAW,QAAQ,QAAQ,OAAO;AAAA,MAC7C;AAGA,aAAO,QAAQ,MAAM,8BAA8B,IAAI;AAAA,QACrD;AAAA,MACF;AAGA,aAAO,UAAU,KAAK;AAAA,QACpB,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,UAAU;AAAA,MACZ,CAAC;AAGD,aAAO,OAAO,MAAM,KAAK;AAAA,QACvB,MAAM;AAAA,QACN,QAAQ;AAAA,MACV,CAAC;AAGD,YAAM,EAAE,UAAU,YAAY,IAAI;AAElC,UAAI,YAAY,gBAAgB,UAAU;AACxC,eAAO,QAAQ,KAAK,IAAI,eAAe,CAAC;AAAA,MAC1C;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAGA,SAAO,EAAE,GAAG,YAAY,GAAG,UAAU;AACvC;","names":[]}
|
|
@@ -9,7 +9,6 @@ import type { NextConfig } from 'next';
|
|
|
9
9
|
* // next.config.js
|
|
10
10
|
* export default withIntlayer(nextConfig)
|
|
11
11
|
* ```
|
|
12
|
-
*
|
|
13
12
|
*/
|
|
14
|
-
export declare const withIntlayer: (nextConfig?:
|
|
13
|
+
export declare const withIntlayer: <T extends Partial<NextConfig>>(nextConfig?: T) => NextConfig & T;
|
|
15
14
|
//# sourceMappingURL=withIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIntlayer.d.ts","sourceRoot":"","sources":["../../../src/server/withIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"withIntlayer.d.ts","sourceRoot":"","sources":["../../../src/server/withIntlayer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,CAAC,UAAU,CAAC,eAC5C,CAAC,KACZ,UAAU,GAAG,CA8Ff,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intlayer",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Simplify internationalization i18n in Next.js with context providers, hooks, locale detection, and multilingual content integration.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,39 +67,39 @@
|
|
|
67
67
|
],
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"node-loader": "^2.1.0",
|
|
70
|
-
"@intlayer/chokidar": "5.0
|
|
71
|
-
"@intlayer/config": "5.0
|
|
72
|
-
"@intlayer/core": "5.0
|
|
73
|
-
"@intlayer/dictionaries-entry": "5.0
|
|
74
|
-
"
|
|
75
|
-
"
|
|
70
|
+
"@intlayer/chokidar": "5.1.0",
|
|
71
|
+
"@intlayer/config": "5.1.0",
|
|
72
|
+
"@intlayer/core": "5.1.0",
|
|
73
|
+
"@intlayer/dictionaries-entry": "5.1.0",
|
|
74
|
+
"@intlayer/webpack": "5.1.0",
|
|
75
|
+
"react-intlayer": "5.1.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/node": "^22.10.6",
|
|
79
|
-
"@types/react": "^
|
|
80
|
-
"@typescript-eslint/parser": "^8.
|
|
79
|
+
"@types/react": "^19.0.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.24.0",
|
|
81
81
|
"concurrently": "^9.1.2",
|
|
82
|
-
"eslint": "^9.
|
|
83
|
-
"prettier": "^3.
|
|
82
|
+
"eslint": "^9.20.0",
|
|
83
|
+
"prettier": "^3.5.0",
|
|
84
84
|
"rimraf": "^6.0.1",
|
|
85
85
|
"tsc-alias": "^1.8.10",
|
|
86
86
|
"tsup": "^8.3.5",
|
|
87
87
|
"typescript": "^5.7.3",
|
|
88
|
-
"@utils/ts-config": "1.0.4",
|
|
89
88
|
"@utils/eslint-config": "1.0.4",
|
|
90
89
|
"@utils/ts-config-types": "1.0.4",
|
|
91
|
-
"@utils/
|
|
92
|
-
"intlayer": "5.0
|
|
90
|
+
"@utils/ts-config": "1.0.4",
|
|
91
|
+
"intlayer": "5.1.0",
|
|
92
|
+
"@utils/tsup-config": "1.0.4"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"next": ">=14.0.0",
|
|
96
96
|
"react": ">=16.0.0",
|
|
97
|
-
"@intlayer/
|
|
98
|
-
"@intlayer/
|
|
99
|
-
"intlayer": "5.0
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
97
|
+
"@intlayer/config": "5.1.0",
|
|
98
|
+
"@intlayer/core": "5.1.0",
|
|
99
|
+
"@intlayer/dictionaries-entry": "5.1.0",
|
|
100
|
+
"intlayer": "5.1.0",
|
|
101
|
+
"@intlayer/webpack": "5.1.0",
|
|
102
|
+
"react-intlayer": "^5.1.0"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
|
105
105
|
"node": ">=14.18"
|