diff --git a/CHANGELOG.md b/CHANGELOG.md index 1961f57..ab8e0a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [v3.7.0](https://github.com/i18next/i18next-http-middleware/compare/v3.6.0...v3.7.0) +- support i18next v24 + ## [v3.6.0](https://github.com/i18next/i18next-http-middleware/compare/v3.5.0...v3.6.0) - introduce convertDetectedLanguage option diff --git a/example/deno/i18n.js b/example/deno/i18n.js index a785853..be59f5a 100644 --- a/example/deno/i18n.js +++ b/example/deno/i18n.js @@ -15,7 +15,7 @@ i18next .use(i18nextMiddleware.LanguageDetector) .init({ // debug: true, - initImmediate: false, // setting initImediate to false, will load the resources synchronously + initAsync: false, // setting initAsync to false, will load the resources synchronously backend: { // eslint-disable-next-line no-path-concat loadPath: 'locales/{{lng}}/{{ns}}.json', diff --git a/lib/index.js b/lib/index.js index 4a6ee5c..a03d9e2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -43,7 +43,7 @@ export function handle (i18next, options = {}) { } } - const i18n = i18next.cloneInstance({ initImmediate: false }) + const i18n = i18next.cloneInstance({ initAsync: false, initImmediate: false }) i18n.on('languageChanged', lng => { // Keep language in sync req.language = req.locale = req.lng = lng diff --git a/package.json b/package.json index fad4622..2ed02e4 100644 --- a/package.json +++ b/package.json @@ -28,29 +28,29 @@ }, "module": "./esm/index.js", "devDependencies": { - "@babel/cli": "7.23.0", - "@babel/core": "7.23.3", - "@babel/preset-env": "7.23.3", - "@hapi/hapi": "^21.3.2", - "@types/express-serve-static-core": "^4.17.41", + "@babel/cli": "7.25.9", + "@babel/core": "7.26.0", + "@babel/preset-env": "7.26.0", + "@hapi/hapi": "^21.3.12", + "@types/express-serve-static-core": "^5.0.1", "@koa/router": "12.0.1", - "koa": "2.14.2", + "koa": "2.15.3", "babel-plugin-add-module-exports": "1.0.4", "eslint": "8.53.0", "eslint-config-standard": "17.1.0", - "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", - "eslint-plugin-promise": "6.1.1", + "eslint-plugin-import": "2.31.0", + "eslint-plugin-n": "16.6.2", + "eslint-plugin-promise": "6.6.0", "eslint-plugin-require-path-exists": "1.1.9", "eslint-plugin-standard": "5.0.0", "expect.js": "0.3.1", - "express": "4.20.0", - "fastify": "4.24.3", - "i18next": "23.7.1", - "mocha": "10.2.0", - "supertest": "6.3.3", - "tsd": "0.29.0", - "uglify-js": "3.17.4" + "express": "4.21.1", + "fastify": "5.1.0", + "i18next": "24.0.0", + "mocha": "10.8.2", + "supertest": "7.0.0", + "tsd": "0.31.2", + "uglify-js": "3.19.3" }, "description": "i18next-http-middleware is a middleware to be used with Node.js web frameworks like express or Fastify and also for Deno.", "keywords": [