dependabot[bot] opened a new pull request, #77333: URL: https://github.com/apache/airflow/pull/77333
Bumps [i18next](https://github.com/i18next/i18next) from 26.7.2 to 27.1.2. <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>v27.1.2</h2> <ul> <li>security: language codes and namespaces that come from requests no longer grow the memory of a server without end. The backend connector kept one entry per failed load, so that it does not read it again, and the language hierarchy and plural rule caches kept one entry per language code. With the default <code>supportedLngs: false</code>, every made-up language a detector found (<code>?lng=xx1</code>, <code>?lng=xx2</code>, ...) or every made-up namespace requested from i18next-http-middleware's <code>getResourcesHandler</code> added about 180 bytes for good. Now only the most recent 1000 failed loads are kept (an older one is read again when it is needed), and both caches are emptied at 1000 codes, as the formatted language codes already were. Pairs with i18next-http-middleware 3.10.1 (<a href="https://github.com/i18next/i18next-http-middleware/security/advisories/GHSA-mjcw-gfh6-3cxm">GHSA-mjcw-gfh6-3cxm</a>).</li> </ul> <h2>v27.1.1</h2> <ul> <li>perf: <code>t()</code> skips the interpolation and nesting regexp scans when the text has no interpolation or nesting prefix, about 6-14% faster for short texts and up to 75% for long ones. The output does not change. Thanks <a href="https://github.com/g4lb"><code>@g4lb</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2469">#2469</a>)</li> </ul> <h2>v27.1.0</h2> <ul> <li>feat: when the plural form selected for <code>count</code> is missing, <code>t()</code> uses the <code>_other</code> form of the same language before the next fallback language, as CLDR does (<a href="https://www.unicode.org/reports/tr35/#Lateral_Inheritance">lateral inheritance</a>), instead of returning the key. Current CLDR data gives French, Spanish, Italian and Portuguese a <code>many</code> form for exact millions, so files with only <code>_one</code> and <code>_other</code> showed the key (or the fallback language) for <code>count: 1000000</code>. The plain key still comes first, so <code>key</code> + <code>key_other</code> keeps resolving <code>key</code>; with a context, <code>key_<context>_other</code> comes before <code>key_other</code>; ordinals use <code>_ordinal_other</code>; and <code>defaultValue_other</code> is used after <code>defaultValue</code>. A form filled in from <code>_other</code> is no longer reported as missing (<code>saveMissing</code>, <code >missingKeyHandler</code>, <code>exists()</code>). Thanks <a >href="https://github.com/TenPotatoes"><code>@TenPotatoes</code></a> (<a >href="https://redirect.github.com/i18next/i18next/issues/2468">#2468</a>)</li> </ul> <h2>v27.0.1</h2> <ul> <li>fix: each cached format keeps at most 1000 formatters, dropping the oldest when full. This covers the built-in formats (number, currency, datetime, relativetime, list) with the default <code>cacheInBuiltFormats: true</code>, and formats added with <code>addCached</code>. The cache key holds all <code>t()</code> options, including the interpolated values, so every new amount, date or name added a formatter that was never released: about 50 MB per 100k values, growing without end in a long-running server. A dropped formatter is made again from the same language and options, so the output does not change. Thanks <a href="https://github.com/liustack"><code>@liustack</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2467">#2467</a>).</li> </ul> <h2>v27.0.0</h2> <p><strong>This is a major breaking release.</strong> It changes defaults that most setups had to override, gives every instance its own logger and post-processors, refuses language codes that look like markup or paths, and removes options that were broken or had no effect. 26.7 warned in debug mode about most of the runtime changes. The <a href="https://www.i18next.com/misc/migration-guide#v26.x.x-to-v27.0.0">migration guide</a> has the details; to keep the v26 behavior where an option exists:</p> <pre lang="js"><code>i18next.init({ fallbackLng: 'dev', // or better your source language: there is no implicit 'dev' any more returnEmptyString: true, // an empty translation is a translation again cleanCode: false, // keep codes without a region as they are ('EN' stays 'EN') }); </code></pre> <pre lang="ts"><code>declare module 'i18next' { interface CustomTypeOptions { strictInterpolationChecks: false; returnEmptyString: true; } } </code></pre> <h3>Changed defaults</h3> <ul> <li><code>fallbackLng</code> defaults to <code>false</code> instead of <code>['dev']</code>. Without a <code>fallbackLng</code>, i18next no longer requests <code>dev</code> from the backend (<code>/locales/dev/translation.json</code> with i18next-http-backend), and <code>saveMissing</code> sends missing keys for the current language instead of <code>dev</code>. With <code>supportedLngs</code> and no <code>fallbackLng</code>, an unsupported language leaves <code>language</code> and <code>languages</code> unset, as <code>fallbackLng: false</code> already did. Set <code>fallbackLng</code> to your main language, or to <code>'dev'</code> for the previous behavior.</li> <li><code>returnEmptyString</code> defaults to <code>false</code>: an empty translation falls back like a missing value (to the fallback language, the default value or the key), as <code>null</code> already does. i18next-cli writes <code>''</code> for untranslated keys in the other languages, which now fall back instead of rendering blank. An explicit <code>''</code> default from code still counts: <code>t('key', '')</code> and <code>t('key', { defaultValue: '' })</code> return <code>''</code>. Set <code>returnEmptyString: true</code> (in <code>init()</code> and in <code>CustomTypeOptions</code>) if an empty translation is meant to render nothing, for example for a Locize project with "preserve empty strings" on.</li> <li>Language codes without a region get their canonical casing, as codes with one already did: <code>'EN'</code> becomes <code>'en'</code>. Only the casing changes: aliases like <code>tl</code>, <code>iw</code> or <code>eng</code> stay as they are (<code>'TL'</code> becomes <code>'tl'</code>), and so do codes that are not BCP 47 (<code>en_US</code>, <code>my_custom</code>). i18next 26.7.0 and 26.7.1 warned that v27 turns <code>iw</code> into <code>he</code> or <code>tl</code> into <code>fil</code>; that was wrong and 26.7.2 corrects it. <code>iw</code>, <code>tl</code> and the like stay as they are. Set <code>cleanCode: false</code> to keep codes without a region exactly as they are. <code>cleanCode</code> is deprecated.</li> <li>types: <code>strictInterpolationChecks</code> defaults to <code>true</code>: <code>t()</code> needs the options for a string with variables, so a <code>{{name}}</code> cannot be left out of a call. Type a wrapper around <code>t()</code> with <code>ParseKeysWithoutVariables</code>, declare the variables <code>interpolation.defaultVariables</code> fills in with <code>defaultVariables</code> in <code>CustomTypeOptions</code>, or set <code>strictInterpolationChecks: false</code> to keep the v26 types (also for ICU and MF2 messages, whose arguments are required either way). The fixes below close the gap plural keys left.</li> <li>types: <code>returnEmptyString</code> defaults to <code>false</code> in <code>TypeOptions</code> too, so a key whose value is <code>''</code> is typed as the key.</li> </ul> <h3>Changed behavior</h3> <ul> <li>The logger and the post-processors belong to the instance. <code>use()</code> of a logger or a post-processor on one instance no longer changes the others, and the <code>init()</code> of one instance no longer rewires the logging of all of them. An instance from <code>createInstance()</code> does not see what the default <code>i18next</code> instance (or any other) registered: call <code>use()</code> on each instance. A clone (<code>cloneInstance()</code>) keeps its parent's logger and post-processors, also those its parent registers later, and what it registers itself stays its own. A plugin that calls <code>use()</code> from its own <code>init()</code> (the Locize InContext editor) registers right away, as before. <code>services.logger</code> stays the instance's logger, with <code>forward()</code>. In debug mode, a <code>postProcess</code> name that is not registered on the instance logs a warning.</li> <li>An object or an array without <code>returnObjects</code> is handled like a missing key: <code>t()</code> returns the default value if one is passed, else the key (with <code>appendNamespaceToMissingKey</code>, <code>parseMissingKeyHandler</code> and the post-processors applied), instead of the sentence <code>key '... (en)' returned an object instead of string.</code>, which ended up in the UI. It is not saved as missing, since the key exists. The debug warning stays, and <code>returnedObjectHandler</code> still decides what is returned when it is set (<code>returnedObjectHandler: (key) => `key '${key}' returned an object instead of string.`</code> brings a sentence back).</li> <li><code>addResources()</code> keeps every value: numbers, booleans and objects were dropped silently, only strings and arrays were added.</li> <li>The default escape no longer escapes <code>/</code>: <code>'$10/month'</code> stays <code>'$10/month'</code> instead of <code>'$10&#x2F;month'</code>, and dates in react-i18next's <code>Trans</code> no longer render as <code>17&#x2F;12&#x2F;2025</code> (<a href="https://github.com/i18next/i18next/discussions/2199">discussion 2199</a>). <code>&</code>, <code><</code>, <code>></code>, <code>"</code> and <code>'</code> are still escaped, which covers HTML text and quoted attributes; a <code>/</code> cannot end either. Update snapshots that contain <code>&#x2F;</code>, or pass your own <code>interpolation.escape</code> to keep escaping it.</li> <li>A language code from <code>lng</code>, <code>changeLanguage()</code>, a language detector or <code>loadLanguages()</code> that does not have the shape of <code>isSafeLanguageCode()</code> (letters, digits, <code>-</code>, <code>_</code>, <code>@</code> and <code>.</code>, no <code>..</code>, at most 128 characters) is refused unless it is configured: listed in <code>supportedLngs</code>, in a <code>fallbackLng</code> that is not a function or in <code>preload</code>, or a language in <code>resources</code>, as given to <code>init()</code>. <code>changeLanguage()</code> continues as with an unsupported code: with the detector's next code, else the fallback language, else none (with <code>fallbackLng: false</code>, a code refused at <code>init()</code> leaves <code>language</code> unset); <code>loadLanguages()</code> skips it. With <code>supportedLngs</code>, the input is matched as before (<code>'de-DE;q=0.9'</code> still gives <code>'de'</code>), and only an unsafe match is re fused, which only <code>nonExplicitSupportedLngs</code> can return (<code>'de-<x>'</code> for a supported <code>'de'</code>). Without <code>supportedLngs</code>, a detector that returned <code>"><img src=x onerror=alert(1)></code> made that string <code>i18next.language</code>, which apps put into <code><html lang></code>, and backends were asked to load it. BCP 47, POSIX (<code>en_US.UTF-8@euro</code>, <code>sr@latin</code>) and private-use codes (<code>en-x-pirate</code>) pass; to use a code with other characters (<code>+</code>, spaces, <code>/</code>), list it in <code>supportedLngs</code>. In debug mode a refused code logs a warning.</li> <li><code>createInstance(options)</code> merges the defaults right away, without initializing: before <code>init()</code>, <code>instance.options</code> has the defaults, <code>getFixedT()</code> no longer throws (<code>t()</code> returns <code>''</code> until <code>init()</code>), and <code>debug: true</code> already shows the warnings before <code>init()</code>. <code>init()</code> still tells the options you set from the defaults, so a <code>keySeparator</code> or <code>nsSeparator</code> passed to <code>createInstance()</code> counts as set by you (<a href="https://redirect.github.com/i18next/i18next/issues/2426">#2426</a>). <code>loadNamespaces()</code> before <code>init()</code> does nothing and calls back, as it did for an instance without options.</li> <li><code>keySeparator: false</code> means flat keys only: a lookup no longer splits a key at the text <code>false</code> (<code>t('nestedfalsec')</code> returned the value of <code>nested.c</code>), and a selector path is joined with <code>.</code> like a key prefix, so selectors work on the flat keys (<code>$ => $['a.b']</code> and <code>$ => $.a.b</code> look up the flat key <code>'a.b'</code>; <code>$ => $.nested.c</code> no longer resolves <code>nested</code>, then <code>c</code>). types: with <code>keySeparator: false</code> in <code>CustomTypeOptions</code>, the keys are the flat keys (no <code>nestedfalsec</code> keys), a key containing <code>false</code> is no longer split, and <code>keyPrefix</code> takes the parts of the flat keys before a <code>.</code>, which is how <code>getFixedT()</code> joins it (<code>'nested'</code> for <code>'nested.c'</code>). A key prefix combined with selectors is not typed for flat keys.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </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>27.1.2</h2> <ul> <li>security: language codes and namespaces that come from requests no longer grow the memory of a server without end. The backend connector kept one entry per failed load, so that it does not read it again, and the language hierarchy and plural rule caches kept one entry per language code. With the default <code>supportedLngs: false</code>, every made-up language a detector found (<code>?lng=xx1</code>, <code>?lng=xx2</code>, ...) or every made-up namespace requested from i18next-http-middleware's <code>getResourcesHandler</code> added about 180 bytes for good. Now only the most recent 1000 failed loads are kept (an older one is read again when it is needed), and both caches are emptied at 1000 codes, as the formatted language codes already were. Pairs with i18next-http-middleware 3.10.1 (<a href="https://github.com/i18next/i18next-http-middleware/security/advisories/GHSA-mjcw-gfh6-3cxm">GHSA-mjcw-gfh6-3cxm</a>).</li> </ul> <h2>27.1.1</h2> <ul> <li>perf: <code>t()</code> skips the interpolation and nesting regexp scans when the text has no interpolation or nesting prefix, about 6-14% faster for short texts and up to 75% for long ones. The output does not change. Thanks <a href="https://github.com/g4lb"><code>@g4lb</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2469">#2469</a>)</li> </ul> <h2>27.1.0</h2> <ul> <li>feat: when the plural form selected for <code>count</code> is missing, <code>t()</code> uses the <code>_other</code> form of the same language before the next fallback language, as CLDR does (<a href="https://www.unicode.org/reports/tr35/#Lateral_Inheritance">lateral inheritance</a>), instead of returning the key. Current CLDR data gives French, Spanish, Italian and Portuguese a <code>many</code> form for exact millions, so files with only <code>_one</code> and <code>_other</code> showed the key (or the fallback language) for <code>count: 1000000</code>. The plain key still comes first, so <code>key</code> + <code>key_other</code> keeps resolving <code>key</code>; with a context, <code>key_<context>_other</code> comes before <code>key_other</code>; ordinals use <code>_ordinal_other</code>; and <code>defaultValue_other</code> is used after <code>defaultValue</code>. A form filled in from <code>_other</code> is no longer reported as missing (<code>saveMissing</code>, <code >missingKeyHandler</code>, <code>exists()</code>). Thanks <a >href="https://github.com/TenPotatoes"><code>@TenPotatoes</code></a> (<a >href="https://redirect.github.com/i18next/i18next/issues/2468">#2468</a>)</li> </ul> <h2>27.0.1</h2> <ul> <li>fix: each cached format keeps at most 1000 formatters, dropping the oldest when full. This covers the built-in formats (number, currency, datetime, relativetime, list) with the default <code>cacheInBuiltFormats: true</code>, and formats added with <code>addCached</code>. The cache key holds all <code>t()</code> options, including the interpolated values, so every new amount, date or name added a formatter that was never released: about 50 MB per 100k values, growing without end in a long-running server. A dropped formatter is made again from the same language and options, so the output does not change. Thanks <a href="https://github.com/liustack"><code>@liustack</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2467">#2467</a>).</li> </ul> <h2>27.0.0</h2> <p><strong>This is a major breaking release.</strong> It changes defaults that most setups had to override, gives every instance its own logger and post-processors, refuses language codes that look like markup or paths, and removes options that were broken or had no effect. 26.7 warned in debug mode about most of the runtime changes. The <a href="https://www.i18next.com/misc/migration-guide#v26.x.x-to-v27.0.0">migration guide</a> has the details; to keep the v26 behavior where an option exists:</p> <pre lang="js"><code>i18next.init({ fallbackLng: 'dev', // or better your source language: there is no implicit 'dev' any more returnEmptyString: true, // an empty translation is a translation again cleanCode: false, // keep codes without a region as they are ('EN' stays 'EN') }); </code></pre> <pre lang="ts"><code>declare module 'i18next' { interface CustomTypeOptions { strictInterpolationChecks: false; returnEmptyString: true; } } </code></pre> <h3>Changed defaults</h3> <ul> <li><code>fallbackLng</code> defaults to <code>false</code> instead of <code>['dev']</code>. Without a <code>fallbackLng</code>, i18next no longer requests <code>dev</code> from the backend (<code>/locales/dev/translation.json</code> with i18next-http-backend), and <code>saveMissing</code> sends missing keys for the current language instead of <code>dev</code>. With <code>supportedLngs</code> and no <code>fallbackLng</code>, an unsupported language leaves <code>language</code> and <code>languages</code> unset, as <code>fallbackLng: false</code> already did. Set <code>fallbackLng</code> to your main language, or to <code>'dev'</code> for the previous behavior.</li> <li><code>returnEmptyString</code> defaults to <code>false</code>: an empty translation falls back like a missing value (to the fallback language, the default value or the key), as <code>null</code> already does. i18next-cli writes <code>''</code> for untranslated keys in the other languages, which now fall back instead of rendering blank. An explicit <code>''</code> default from code still counts: <code>t('key', '')</code> and <code>t('key', { defaultValue: '' })</code> return <code>''</code>. Set <code>returnEmptyString: true</code> (in <code>init()</code> and in <code>CustomTypeOptions</code>) if an empty translation is meant to render nothing, for example for a Locize project with "preserve empty strings" on.</li> <li>Language codes without a region get their canonical casing, as codes with one already did: <code>'EN'</code> becomes <code>'en'</code>. Only the casing changes: aliases like <code>tl</code>, <code>iw</code> or <code>eng</code> stay as they are (<code>'TL'</code> becomes <code>'tl'</code>), and so do codes that are not BCP 47 (<code>en_US</code>, <code>my_custom</code>). i18next 26.7.0 and 26.7.1 warned that v27 turns <code>iw</code> into <code>he</code> or <code>tl</code> into <code>fil</code>; that was wrong and 26.7.2 corrects it. <code>iw</code>, <code>tl</code> and the like stay as they are. Set <code>cleanCode: false</code> to keep codes without a region exactly as they are. <code>cleanCode</code> is deprecated.</li> <li>types: <code>strictInterpolationChecks</code> defaults to <code>true</code>: <code>t()</code> needs the options for a string with variables, so a <code>{{name}}</code> cannot be left out of a call. Type a wrapper around <code>t()</code> with <code>ParseKeysWithoutVariables</code>, declare the variables <code>interpolation.defaultVariables</code> fills in with <code>defaultVariables</code> in <code>CustomTypeOptions</code>, or set <code>strictInterpolationChecks: false</code> to keep the v26 types (also for ICU and MF2 messages, whose arguments are required either way). The fixes below close the gap plural keys left.</li> <li>types: <code>returnEmptyString</code> defaults to <code>false</code> in <code>TypeOptions</code> too, so a key whose value is <code>''</code> is typed as the key.</li> </ul> <h3>Changed behavior</h3> <ul> <li>The logger and the post-processors belong to the instance. <code>use()</code> of a logger or a post-processor on one instance no longer changes the others, and the <code>init()</code> of one instance no longer rewires the logging of all of them. An instance from <code>createInstance()</code> does not see what the default <code>i18next</code> instance (or any other) registered: call <code>use()</code> on each instance. A clone (<code>cloneInstance()</code>) keeps its parent's logger and post-processors, also those its parent registers later, and what it registers itself stays its own. A plugin that calls <code>use()</code> from its own <code>init()</code> (the Locize InContext editor) registers right away, as before. <code>services.logger</code> stays the instance's logger, with <code>forward()</code>. In debug mode, a <code>postProcess</code> name that is not registered on the instance logs a warning.</li> <li>An object or an array without <code>returnObjects</code> is handled like a missing key: <code>t()</code> returns the default value if one is passed, else the key (with <code>appendNamespaceToMissingKey</code>, <code>parseMissingKeyHandler</code> and the post-processors applied), instead of the sentence <code>key '... (en)' returned an object instead of string.</code>, which ended up in the UI. It is not saved as missing, since the key exists. The debug warning stays, and <code>returnedObjectHandler</code> still decides what is returned when it is set (<code>returnedObjectHandler: (key) => `key '${key}' returned an object instead of string.`</code> brings a sentence back).</li> <li><code>addResources()</code> keeps every value: numbers, booleans and objects were dropped silently, only strings and arrays were added.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/i18next/commit/d5839befc21d6022d950d5903a1d195a101d59f3"><code>d5839be</code></a> 27.1.2</li> <li><a href="https://github.com/i18next/i18next/commit/0a55432e63a6a9c0170ef41d0569a4cca9911f75"><code>0a55432</code></a> changelog for 27.1.2</li> <li><a href="https://github.com/i18next/i18next/commit/612e6f1fca8ca15be767283f6d5861f7d7e26636"><code>612e6f1</code></a> security: bound what made-up languages and namespaces leave behind on a server</li> <li><a href="https://github.com/i18next/i18next/commit/cc3b9853828b1e1fb17d20d176ee9c161e97a348"><code>cc3b985</code></a> docs(README): copyable one-prompt setup for coding agents</li> <li><a href="https://github.com/i18next/i18next/commit/523cb611cb25c84a73c1b245d12d641b06868706"><code>523cb61</code></a> 27.1.1</li> <li><a href="https://github.com/i18next/i18next/commit/509751009bb6ceed8747e6d64903f15efaad8eab"><code>5097510</code></a> changelog for 27.1.1</li> <li><a href="https://github.com/i18next/i18next/commit/5f453fe2a508c6201098986fd5b5c4a8cf30044e"><code>5f453fe</code></a> perf: skip the interpolation and nesting regexp scans for a text without thei...</li> <li><a href="https://github.com/i18next/i18next/commit/854769014009953f4547d785810b8411f649f852"><code>8547690</code></a> 27.1.0</li> <li><a href="https://github.com/i18next/i18next/commit/56e4aa02b8443f2feb206ee1a43c83fbcbd1e91e"><code>56e4aa0</code></a> changelog for 27.1.0</li> <li><a href="https://github.com/i18next/i18next/commit/73f6f26e43b2d9b58d8eceb8bc8631cbc5a0bec9"><code>73f6f26</code></a> feat: a missing plural form falls back to the _other form of the same language</li> <li>Additional commits viewable in <a href="https://github.com/i18next/i18next/compare/v26.7.2...v27.1.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
