mirror of
https://github.com/maputnik/editor.git
synced 2026-10-14 06:53:45 +00:00
chore(deps): Bump i18next from 26.4.2 to 26.4.3 (#2231)
Bumps [i18next](https://github.com/i18next/i18next) from 26.4.2 to 26.4.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/i18next/i18next/releases">i18next's releases</a>.</em></p> <blockquote> <h2>v26.4.3</h2> <ul> <li>perf: <code>ResourceStore.hasLanguageSomeTranslations()</code> no longer enumerates every key of a large bundle on each call. It ran <code>Object.keys()</code> on the whole bundle just to learn whether it had at least one key, and <code>init()</code> / <code>changeLanguage()</code> reach it three times per instance (once while picking the language, twice via <code>setResolvedLanguage()</code>). With large flat bundles and one i18next instance per SSR request reusing the same resources, that showed up as measurable CPU work before any <code>t()</code> call. Bundle objects already found non-empty are now remembered in a <code>WeakSet</code> shared across instances, so later checks are O(1): 2,000 inits with a 6,800-key bundle went from ~750 ms to ~20 ms, the same as a one-key bundle. Only the non-empty result is cached. No API removes single keys from a bundle, so a non-empty bundle stays non-empty, and empty bundles are re-checked every time, so keys added later (backend loads, <code>addResource</code>, <code>addResourceBundle</code>, direct or silent changes) count right away. The only edge case: a bundle emptied by hand with <code>delete</code> on every key while it is still in the store keeps counting as having translations; use <code>removeResourceBundle()</code> for that. Thanks <a href="https://github.com/dmchoi77"><code>@dmchoi77</code></a> for the detailed report (<a href="https://redirect.github.com/i18next/i18next/issues/2449">#2449</a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/i18next/i18next/blob/master/CHANGELOG.md">i18next's changelog</a>.</em></p> <blockquote> <h2>26.4.3</h2> <ul> <li>perf: <code>ResourceStore.hasLanguageSomeTranslations()</code> no longer enumerates every key of a large bundle on each call. It ran <code>Object.keys()</code> on the whole bundle just to learn whether it had at least one key, and <code>init()</code> / <code>changeLanguage()</code> reach it three times per instance (once while picking the language, twice via <code>setResolvedLanguage()</code>). With large flat bundles and one i18next instance per SSR request reusing the same resources, that showed up as measurable CPU work before any <code>t()</code> call. Bundle objects already found non-empty are now remembered in a <code>WeakSet</code> shared across instances, so later checks are O(1): 2,000 inits with a 6,800-key bundle went from ~750 ms to ~20 ms, the same as a one-key bundle. Only the non-empty result is cached. No API removes single keys from a bundle, so a non-empty bundle stays non-empty, and empty bundles are re-checked every time, so keys added later (backend loads, <code>addResource</code>, <code>addResourceBundle</code>, direct or silent changes) count right away. The only edge case: a bundle emptied by hand with <code>delete</code> on every key while it is still in the store keeps counting as having translations; use <code>removeResourceBundle()</code> for that. Thanks <a href="https://github.com/dmchoi77"><code>@dmchoi77</code></a> for the detailed report (<a href="https://redirect.github.com/i18next/i18next/issues/2449">#2449</a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/i18next/commit/0d2845a2360dcc236fe9681f849781f5dfdd35c4"><code>0d2845a</code></a> 26.4.3</li> <li><a href="https://github.com/i18next/i18next/commit/a2dbe15e844b7f897ff5851419ba000fbacdbc45"><code>a2dbe15</code></a> build</li> <li><a href="https://github.com/i18next/i18next/commit/e75843ffeac038a961f91181d963ae4a8f228976"><code>e75843f</code></a> perf: cache non-empty bundles in hasLanguageSomeTranslations, changelog v26.4.3</li> <li><a href="https://github.com/i18next/i18next/commit/edaea71b729aa54dc35d5e7dfea72b2b12f24a61"><code>edaea71</code></a> Fix TypeScript examples build and update them to i18next v26 (<a href="https://redirect.github.com/i18next/i18next/issues/2448">#2448</a>)</li> <li><a href="https://github.com/i18next/i18next/commit/4ebd19d89111fa558d7086f6be64eb748bad6327"><code>4ebd19d</code></a> docs: "For AI assistants" paragraph in the README and a fuller saveMissing JSDoc</li> <li>See full diff in <a href="https://github.com/i18next/i18next/compare/v26.4.2...v26.4.3">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Generated
+4
-4
@@ -30,7 +30,7 @@
|
||||
"downshift": "^9.4.0",
|
||||
"events": "^3.3.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"i18next": "^26.4.2",
|
||||
"i18next": "^26.4.3",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"i18next-resources-to-backend": "^1.2.3",
|
||||
"json-stringify-pretty-compact": "^4.0.0",
|
||||
@@ -6628,9 +6628,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "26.4.2",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-26.4.2.tgz",
|
||||
"integrity": "sha512-RX+R0VLg13IbvRuJSxnqykUFS9vQZTl8wYpWPCIUDWVrSGjsQywB5Y+pjzrkboxGAuYfJZVH1InFTdgBdxq6ug==",
|
||||
"version": "26.4.3",
|
||||
"resolved": "https://registry.npmjs.org/i18next/-/i18next-26.4.3.tgz",
|
||||
"integrity": "sha512-QIIueUYS2giFVIY3hu/X5Dz7/qTzwcXE06H29m1DKVhUGVPCyT0wnsh14wEn/cTy9nZ/B6VhbDItdXotOKSO8A==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
"downshift": "^9.4.0",
|
||||
"events": "^3.3.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"i18next": "^26.4.2",
|
||||
"i18next": "^26.4.3",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"i18next-resources-to-backend": "^1.2.3",
|
||||
"json-stringify-pretty-compact": "^4.0.0",
|
||||
|
||||
Reference in New Issue
Block a user