@intlayer/next-i18next 9.7.0 → 9.7.2

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,4 +1,4 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -24,5 +24,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
 
27
- //#endregion
28
27
  exports.__toESM = __toESM;
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  let next_intlayer = require("next-intlayer");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
 
5
- //#region src/appWithTranslation.tsx
5
+ // src/appWithTranslation.tsx
6
6
  /**
7
7
  * Drop-in replacement for next-i18next's `appWithTranslation` HOC.
8
8
  *
@@ -26,6 +26,5 @@ const appWithTranslation = (WrappedApp, _configOverride) => {
26
26
  return AppWithTranslation;
27
27
  };
28
28
 
29
- //#endregion
30
29
  exports.appWithTranslation = appWithTranslation;
31
30
  //# sourceMappingURL=appWithTranslation.cjs.map
@@ -1,32 +1,31 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_appWithTranslation = require('./appWithTranslation.cjs');
3
- const require_serverSideTranslations = require('./serverSideTranslations.cjs');
2
+ const require_appWithTranslation = require("./appWithTranslation.cjs");
3
+ const require_serverSideTranslations = require("./serverSideTranslations.cjs");
4
4
  let _intlayer_i18next = require("@intlayer/i18next");
5
5
  let _intlayer_react_i18next = require("@intlayer/react-i18next");
6
6
 
7
- //#region src/index.ts
7
+ // src/index.ts
8
8
  const i18n = _intlayer_i18next.i18next;
9
9
 
10
- //#endregion
11
- Object.defineProperty(exports, 'I18nContext', {
10
+ Object.defineProperty(exports, "I18nContext", {
12
11
  enumerable: true,
13
12
  get: function () {
14
13
  return _intlayer_react_i18next.I18nContext;
15
14
  }
16
15
  });
17
- Object.defineProperty(exports, 'I18nextProvider', {
16
+ Object.defineProperty(exports, "I18nextProvider", {
18
17
  enumerable: true,
19
18
  get: function () {
20
19
  return _intlayer_react_i18next.I18nextProvider;
21
20
  }
22
21
  });
23
- Object.defineProperty(exports, 'Trans', {
22
+ Object.defineProperty(exports, "Trans", {
24
23
  enumerable: true,
25
24
  get: function () {
26
25
  return _intlayer_react_i18next.Trans;
27
26
  }
28
27
  });
29
- Object.defineProperty(exports, 'Translation', {
28
+ Object.defineProperty(exports, "Translation", {
30
29
  enumerable: true,
31
30
  get: function () {
32
31
  return _intlayer_react_i18next.Translation;
@@ -34,32 +33,32 @@ Object.defineProperty(exports, 'Translation', {
34
33
  });
35
34
  exports.appWithTranslation = require_appWithTranslation.appWithTranslation;
36
35
  exports.i18n = i18n;
37
- Object.defineProperty(exports, 'initReactI18next', {
36
+ Object.defineProperty(exports, "initReactI18next", {
38
37
  enumerable: true,
39
38
  get: function () {
40
39
  return _intlayer_react_i18next.initReactI18next;
41
40
  }
42
41
  });
43
42
  exports.serverSideTranslations = require_serverSideTranslations.serverSideTranslations;
44
- Object.defineProperty(exports, 'useDictionary', {
43
+ Object.defineProperty(exports, "useDictionary", {
45
44
  enumerable: true,
46
45
  get: function () {
47
46
  return _intlayer_react_i18next.useDictionary;
48
47
  }
49
48
  });
50
- Object.defineProperty(exports, 'useDictionaryDynamic', {
49
+ Object.defineProperty(exports, "useDictionaryDynamic", {
51
50
  enumerable: true,
52
51
  get: function () {
53
52
  return _intlayer_react_i18next.useDictionaryDynamic;
54
53
  }
55
54
  });
56
- Object.defineProperty(exports, 'useTranslation', {
55
+ Object.defineProperty(exports, "useTranslation", {
57
56
  enumerable: true,
58
57
  get: function () {
59
58
  return _intlayer_react_i18next.useTranslation;
60
59
  }
61
60
  });
62
- Object.defineProperty(exports, 'withTranslation', {
61
+ Object.defineProperty(exports, "withTranslation", {
63
62
  enumerable: true,
64
63
  get: function () {
65
64
  return _intlayer_react_i18next.withTranslation;
@@ -1,5 +1,5 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  let _intlayer_config_colors = require("@intlayer/config/colors");
4
4
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
5
5
  let _intlayer_config_logger = require("@intlayer/config/logger");
@@ -10,7 +10,7 @@ let _intlayer_config_node = require("@intlayer/config/node");
10
10
  let _intlayer_engine_utils = require("@intlayer/engine/utils");
11
11
  let next_intlayer_server = require("next-intlayer/server");
12
12
 
13
- //#region src/plugin/index.ts
13
+ // src/plugin/index.ts
14
14
  /**
15
15
  * `require` that works in both the CJS and ESM builds of this plugin.
16
16
  * `import.meta.url` is rewritten to the module path in the CJS output by the
@@ -135,7 +135,6 @@ const createNextI18nPlugin = (_i18nPath) => {
135
135
  */
136
136
  const withI18next = createNextI18nPlugin();
137
137
 
138
- //#endregion
139
138
  exports.createNextI18nPlugin = createNextI18nPlugin;
140
139
  exports.default = createNextI18nPlugin;
141
140
  exports.withI18next = withI18next;
@@ -3,7 +3,7 @@ let _intlayer_config_built = require("@intlayer/config/built");
3
3
  let _intlayer_config_colors = require("@intlayer/config/colors");
4
4
  let _intlayer_config_logger = require("@intlayer/config/logger");
5
5
 
6
- //#region src/serverSideTranslations.ts
6
+ // src/serverSideTranslations.ts
7
7
  /**
8
8
  * Drop-in replacement for next-i18next's `serverSideTranslations`.
9
9
  *
@@ -40,6 +40,5 @@ const serverSideTranslations = async (locale, namespacesRequired, configOverride
40
40
  } };
41
41
  };
42
42
 
43
- //#endregion
44
43
  exports.serverSideTranslations = serverSideTranslations;
45
44
  //# sourceMappingURL=serverSideTranslations.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { IntlayerProvider } from "next-intlayer";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
 
4
- //#region src/appWithTranslation.tsx
4
+ // src/appWithTranslation.tsx
5
5
  /**
6
6
  * Drop-in replacement for next-i18next's `appWithTranslation` HOC.
7
7
  *
@@ -25,6 +25,5 @@ const appWithTranslation = (WrappedApp, _configOverride) => {
25
25
  return AppWithTranslation;
26
26
  };
27
27
 
28
- //#endregion
29
28
  export { appWithTranslation };
30
29
  //# sourceMappingURL=appWithTranslation.mjs.map
@@ -3,9 +3,8 @@ import { serverSideTranslations } from "./serverSideTranslations.mjs";
3
3
  import { i18next } from "@intlayer/i18next";
4
4
  import { I18nContext, I18nextProvider, Trans, Translation, initReactI18next, useDictionary, useDictionaryDynamic, useTranslation, withTranslation } from "@intlayer/react-i18next";
5
5
 
6
- //#region src/index.ts
6
+ // src/index.ts
7
7
  const i18n = i18next;
8
8
 
9
- //#endregion
10
9
  export { I18nContext, I18nextProvider, Trans, Translation, appWithTranslation, i18n, initReactI18next, serverSideTranslations, useDictionary, useDictionaryDynamic, useTranslation, withTranslation };
11
10
  //# sourceMappingURL=index.mjs.map
@@ -7,7 +7,7 @@ import { getConfiguration } from "@intlayer/config/node";
7
7
  import { runOnce } from "@intlayer/engine/utils";
8
8
  import { withIntlayer } from "next-intlayer/server";
9
9
 
10
- //#region src/plugin/index.ts
10
+ // src/plugin/index.ts
11
11
  /**
12
12
  * `require` that works in both the CJS and ESM builds of this plugin.
13
13
  * `import.meta.url` is rewritten to the module path in the CJS output by the
@@ -132,6 +132,5 @@ const createNextI18nPlugin = (_i18nPath) => {
132
132
  */
133
133
  const withI18next = createNextI18nPlugin();
134
134
 
135
- //#endregion
136
135
  export { createNextI18nPlugin, createNextI18nPlugin as default, withI18next };
137
136
  //# sourceMappingURL=index.mjs.map
@@ -2,7 +2,7 @@ import { log } from "@intlayer/config/built";
2
2
  import { CYAN } from "@intlayer/config/colors";
3
3
  import { colorize, getAppLogger } from "@intlayer/config/logger";
4
4
 
5
- //#region src/serverSideTranslations.ts
5
+ // src/serverSideTranslations.ts
6
6
  /**
7
7
  * Drop-in replacement for next-i18next's `serverSideTranslations`.
8
8
  *
@@ -39,6 +39,5 @@ const serverSideTranslations = async (locale, namespacesRequired, configOverride
39
39
  } };
40
40
  };
41
41
 
42
- //#endregion
43
42
  export { serverSideTranslations };
44
43
  //# sourceMappingURL=serverSideTranslations.mjs.map
@@ -1,5 +1,4 @@
1
1
  import { appWithTranslation as appWithTranslation$1 } from "next-i18next/pages";
2
- //#region src/appWithTranslation.d.ts
3
2
  /**
4
3
  * Drop-in replacement for next-i18next's `appWithTranslation` HOC.
5
4
  *
@@ -12,5 +11,4 @@ import { appWithTranslation as appWithTranslation$1 } from "next-i18next/pages";
12
11
  * ```
13
12
  */
14
13
  export declare const appWithTranslation: typeof appWithTranslation$1;
15
- //#endregion
16
14
  //# sourceMappingURL=appWithTranslation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appWithTranslation.d.ts","names":[],"sources":["../../src/appWithTranslation.tsx"],"mappings":";;;;;;;;;;;;;qBAgBa,2BAA2B"}
1
+ {"version":3,"file":"appWithTranslation.d.ts","names":["_appWithTranslation"],"sources":["../../src/appWithTranslation.tsx"],"mappings":";;;;;;;;;;;;qBAgBa,2BAA2BA"}
@@ -2,8 +2,6 @@ import { appWithTranslation } from "./appWithTranslation.js";
2
2
  import { serverSideTranslations } from "./serverSideTranslations.js";
3
3
  import { i18n as i18n$1 } from "@intlayer/i18next";
4
4
  import { I18nContext, I18nextProvider, Trans, Translation, initReactI18next, useDictionary, useDictionaryDynamic, useTranslation, withTranslation } from "@intlayer/react-i18next";
5
- //#region src/index.d.ts
6
5
  export declare const i18n: i18n$1;
7
- //#endregion
8
6
  export { I18nContext, I18nextProvider, Trans, Translation, appWithTranslation, initReactI18next, serverSideTranslations, useDictionary, useDictionaryDynamic, useTranslation, withTranslation };
9
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;qBAEa,MAA6B"}
1
+ {"version":3,"file":"index.d.ts","names":["I18nType"],"sources":["../../src/index.ts"],"mappings":";;;;qBAEa,MAA6BA"}
@@ -1,5 +1,4 @@
1
1
  import { NextConfig } from "next";
2
- //#region src/plugin/index.d.ts
3
2
  /**
4
3
  * A Next.js plugin for next-i18next compat that wraps next-intlayer's plugin
5
4
  * and configures resolve aliases so `next-i18next` imports are served by
@@ -17,6 +16,5 @@ export declare const createNextI18nPlugin: (_i18nPath?: string) => (nextConfig?:
17
16
  * ```
18
17
  */
19
18
  export declare const withI18next: (nextConfig?: NextConfig) => Promise<NextConfig>;
20
- //#endregion
21
19
  export { createNextI18nPlugin as default };
22
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;;qBAkGa,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ;;;;;;;;;;;qBA+FzC,cAAW,aA/FI,eAAkB,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;qBAkGa,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ;;;;;;;;;;;qBA+FzC,cAAW,aA/FI,eAAkB,QAAQ"}
@@ -1,4 +1,3 @@
1
- //#region src/serverSideTranslations.d.ts
2
1
  /**
3
2
  * Drop-in replacement for next-i18next's `serverSideTranslations`.
4
3
  *
@@ -28,5 +27,4 @@
28
27
  export declare const serverSideTranslations: (locale: string, namespacesRequired?: string[], configOverride?: Record<string, unknown>) => Promise<{
29
28
  _nextI18Next: Record<string, unknown>;
30
29
  }>;
31
- //#endregion
32
30
  //# sourceMappingURL=serverSideTranslations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serverSideTranslations.d.ts","names":[],"sources":["../../src/serverSideTranslations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,yBAAsB,gBACnB,+BACe,iBACZ,4BAChB;EAAU,cAAc"}
1
+ {"version":3,"file":"serverSideTranslations.d.ts","names":[],"sources":["../../src/serverSideTranslations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,yBAAsB,gBACnB,+BACe,iBACZ,4BAChB;EAAU,cAAc"}
package/package.json CHANGED
@@ -1,26 +1,22 @@
1
1
  {
2
2
  "name": "@intlayer/next-i18next",
3
- "version": "9.7.0",
3
+ "version": "9.7.2",
4
4
  "private": false,
5
5
  "description": "next-i18next API adapter for intlayer — serverSideTranslations, appWithTranslation, useTranslation backed by next-intlayer",
6
6
  "keywords": [
7
+ "adapter",
8
+ "compatibility",
9
+ "i18n",
10
+ "i18next",
7
11
  "intlayer",
8
12
  "next-i18next",
9
- "i18next",
10
13
  "next.js",
11
- "react",
12
- "i18n",
13
- "adapter",
14
- "compatibility"
14
+ "react"
15
15
  ],
16
16
  "homepage": "https://intlayer.org",
17
17
  "bugs": {
18
18
  "url": "https://github.com/aymericzip/intlayer/issues"
19
19
  },
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://github.com/aymericzip/intlayer.git"
23
- },
24
20
  "license": "Apache-2.0",
25
21
  "author": {
26
22
  "name": "Aymeric PINEAU",
@@ -33,7 +29,25 @@
33
29
  "url": "https://github.com/aymericzip"
34
30
  }
35
31
  ],
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/aymericzip/intlayer.git"
35
+ },
36
+ "files": [
37
+ "./dist",
38
+ "./package.json"
39
+ ],
36
40
  "sideEffects": false,
41
+ "main": "dist/cjs/index.cjs",
42
+ "module": "dist/esm/index.mjs",
43
+ "types": "dist/types/index.d.ts",
44
+ "typesVersions": {
45
+ "*": {
46
+ "plugin": [
47
+ "./dist/types/plugin/index.d.ts"
48
+ ]
49
+ }
50
+ },
37
51
  "exports": {
38
52
  ".": {
39
53
  "types": "./dist/types/index.d.ts",
@@ -47,29 +61,15 @@
47
61
  },
48
62
  "./package.json": "./package.json"
49
63
  },
50
- "main": "dist/cjs/index.cjs",
51
- "module": "dist/esm/index.mjs",
52
- "types": "dist/types/index.d.ts",
53
- "typesVersions": {
54
- "*": {
55
- "plugin": [
56
- "./dist/types/plugin/index.d.ts"
57
- ]
58
- }
59
- },
60
- "files": [
61
- "./dist",
62
- "./package.json"
63
- ],
64
64
  "scripts": {
65
65
  "build": "bun --bun tsdown --config tsdown.config.ts",
66
66
  "build:ci": "bun --bun tsdown --config tsdown.config.ts",
67
67
  "clean": "bun --bun rimraf ./dist .turbo",
68
68
  "dev": "bun --bun tsdown --config tsdown.config.ts --watch",
69
- "format": "bun --bun biome format . --check",
70
- "format:fix": "bun --bun biome format --write .",
71
- "lint": "bun --bun biome lint .",
72
- "lint:fix": "bun --bun biome lint --write .",
69
+ "format": "oxfmt --check .",
70
+ "format:fix": "oxfmt .",
71
+ "lint": "oxlint .",
72
+ "lint:fix": "oxlint --fix .",
73
73
  "prepublish": "cp -f ../../README.md ./README.md",
74
74
  "publish": "bun publish || true",
75
75
  "publish:canary": "bun publish --access public --tag canary || true",
@@ -80,14 +80,14 @@
80
80
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
81
81
  },
82
82
  "dependencies": {
83
- "@intlayer/config": "9.6.0",
84
- "@intlayer/core": "9.7.0",
85
- "@intlayer/engine": "9.7.0",
86
- "@intlayer/i18next": "9.7.0",
87
- "@intlayer/react-i18next": "9.7.0",
88
- "@intlayer/types": "9.7.0",
89
- "next-intlayer": "9.6.0",
90
- "react-intlayer": "9.7.0"
83
+ "@intlayer/config": "9.7.2",
84
+ "@intlayer/core": "9.7.2",
85
+ "@intlayer/engine": "9.7.2",
86
+ "@intlayer/i18next": "9.7.2",
87
+ "@intlayer/react-i18next": "9.7.2",
88
+ "@intlayer/types": "9.7.2",
89
+ "next-intlayer": "9.7.2",
90
+ "react-intlayer": "9.7.2"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@types/node": "^26",
@@ -95,13 +95,13 @@
95
95
  "@utils/ts-config": "1.0.4",
96
96
  "@utils/ts-config-types": "1.0.4",
97
97
  "@utils/tsdown-config": "1.0.4",
98
- "i18next": "26.4.2",
99
- "next-i18next": "16.3.1",
100
- "react-i18next": "17.0.14",
101
- "rimraf": "6.1.3",
102
- "tsdown": "0.23.0",
98
+ "i18next": "26.7.1",
99
+ "next-i18next": "16.4.6",
100
+ "react-i18next": "17.1.11",
101
+ "rimraf": "6.1.4",
102
+ "tsdown": "0.23.7",
103
103
  "typescript": "7.0.2",
104
- "vitest": "5.0.3"
104
+ "vitest": "5.1.0"
105
105
  },
106
106
  "peerDependencies": {
107
107
  "i18next": ">=20.0.0",