mirror of
https://github.com/maputnik/editor.git
synced 2026-11-30 13:54:20 +00:00
chore(deps-dev): Bump i18next-cli from 1.94.1 to 1.95.1 (#2373)
Bumps [i18next-cli](https://github.com/i18next/i18next-cli) from 1.94.1 to 1.95.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/i18next/i18next-cli/blob/main/CHANGELOG.md">i18next-cli's changelog</a>.</em></p> <blockquote> <h2>1.95.1</h2> <ul> <li>fix(extract): a type read through a renaming import (<code>import { components as api }</code>, <code>import type</code>, <code>import * as</code>, re-exports) resolves the names inside it (<code>Omit<components['schemas']['Foo'], 'type'></code>) in the file that declares it; they were looked up in the importing file, which took another file's <code>components</code> and extracted its keys (<a href="https://redirect.github.com/i18next/i18next-cli/issues/330">#330</a>)</li> </ul> <h2>1.95.0</h2> <p>From a second run of <code>instrument</code> on the dashboard of the first one, this time all seven of its packages (about 1,200 files), its texts in the code; every rewrite read:</p> <ul> <li>fix(instrument): a variable that holds JSX (<code>const link = <Link …></code>) and <code>children</code> are never interpolated into a <code>t()</code> value, where they showed as <code>[object Object]</code>; the text stops at them.</li> <li>fix(instrument): the init file is generated when <code>i18next</code> shows up only in a string (a setup guide's snippet), not in an import or re-export statement; none is written at the root of a workspace without <code>src</code>, which no app imports from (a <code>pnpm-workspace.yaml</code> with settings only is no workspace).</li> <li>fix(instrument): a string in a TypeScript type is never wrapped (<code>useState<{ title: 'Hello there' }>()</code>), and no placeholder is named after an option of <code>t()</code> (<code>count</code>, <code>context</code>, …).</li> <li>fix(instrument): selectors of an optional call (<code>el?.querySelector('h1, h2')</code>) and everything under a <code>className</code>, <code>classNames</code>, <code>classes</code> or <code>style</code> property (<code>classNames: { container: () => 'btn btn-secondary' }</code>) stay as they are; so do strings pushed into an <code>ignore</code> list and a region code with acronyms (<code>EU VAT</code>, <code>CA GST/HST</code>).</li> <li>feat(instrument): a component's prop is text when its name is or ends in <code>label</code>, <code>title</code> or <code>message</code> (<code>saveLabel</code>), names a button's label (<code>labelConfirm</code>) or is the <code>text</code> of a component named for text (<code><FieldLabel text=…></code>), or when its value reads as a sentence; an icon's <code>aria-label</code> and <code>data-tip</code> are text; so are either branch of a choice in a text attribute (<code>data-tip={open ? 'Collapse' : 'Expand'}</code>), a single word under a text property (<code>{ label: 'has' }</code>) and what a title setter gets (<code>useDocumentTitle('Projects')</code>).</li> <li>feat(instrument): module-scope texts are translated when they are used instead of being skipped: JSX text there becomes a <code><Trans></code> (it translates when it renders; not in a Suspense <code>fallback</code>), and an object property's plain text value is read by a getter (<code>label: 'Projects'</code> becomes <code>get label () { return i18next.t('projects', 'Projects') }</code>). Left, and named with their lines: constants, entries of an array of strings, values computed on every read, properties of an object passed to a module-level call or kept to a type with <code>satisfies</code>, objects the file changes, and what code running at import reads, in any instrumented file (also through a function or class called at module scope). Review the getters (<code>--dry-run</code> marks them): a map of data that is sent or stored must stay as it was.</li> <li>fix(instrument): a property named for a format, a style or an event (<code>format: 'MMM D, YYYY'</code>, <code>transition</code>, <code>event</code>, <code>font</code>, <code>shortcut</code>) and a literal kept as its type (<code>'on' as const</code>) are no text; a one-line function component (<code>function App () { return <h1>…</h1> }</code>) gets its <code>useTranslation()</code> on a line of its own instead of a syntax error.</li> <li>fix(instrument): <code>writeExtractedKeys</code> also writes the keys of a split text and of the words in a placeholder's value.</li> <li>fix(instrument): the callback of a <code>.map()</code> (or another array method) at module scope, and an IIFE, run at import: their texts no longer get an <code>i18next.t()</code> that returned an empty string before i18next was initialized.</li> <li>feat(instrument): the words in a placeholder's value are texts of their own (<code>name || t('items', 'items')</code>), and a template literal with one optional part becomes two texts (<code>left ? t(…, 'uses AI tokens, {{left}} left') : t(…, 'uses AI tokens')</code>) instead of English words in a placeholder.</li> <li>feat(instrument): texts that only build data stay: a <code>mailto:</code> body or another URL part (<code>encodeURIComponent</code>), a file's content (<code>new Blob()</code>, <code>new File()</code>, <code>saveAs()</code>, <code>fs.writeFile()</code>, a zip's <code>.file(name, data)</code>), also through variables, as for <code>console</code> calls before.</li> <li>feat(instrument): in an object of strings, the sibling phrases of a text are texts too (<code>{ ht: 'by human', tm: 'by translation memory' }</code>).</li> <li>feat(instrument): the run names what to look at by hand, with lines: the module-scope texts left, and the parts of a sentence (<code>' (via CLI)'</code>, <code>', which needs {{name}}'</code>); <code>--dry-run</code> marks getters and two-text rewrites.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/i18next-cli/commit/32a3c32d8e7e60e3d936bba751fccdf9f56f68e7"><code>32a3c32</code></a> 1.95.1</li> <li><a href="https://github.com/i18next/i18next-cli/commit/74dd9c816f367e37ab745961bfe904dc76ad6d32"><code>74dd9c8</code></a> changelog for 1.95.1</li> <li><a href="https://github.com/i18next/i18next-cli/commit/7c48c1eb2296b60ff140ff565fb92583c78d181e"><code>7c48c1e</code></a> changelog: <a href="https://redirect.github.com/i18next/i18next-cli/issues/330">#330</a> follow-up under Unreleased</li> <li><a href="https://github.com/i18next/i18next-cli/commit/6d0961ed2ef8f8cea76900011190cbe3ef312190"><code>6d0961e</code></a> fix: a type read through a renaming import resolves the names inside it in th...</li> <li><a href="https://github.com/i18next/i18next-cli/commit/489d846eb041f525fd9d0b1821df5d84f0c7c2d9"><code>489d846</code></a> 1.95.0</li> <li><a href="https://github.com/i18next/i18next-cli/commit/27bd4fd098cc824db0b88448aa3798afc6a842d6"><code>27bd4fd</code></a> changelog for 1.95.0</li> <li><a href="https://github.com/i18next/i18next-cli/commit/dcf8414b224e6687ab77f8183c13f797694a0426"><code>dcf8414</code></a> instrument: translate module-scope texts when used, keep data texts, fixes fr...</li> <li><a href="https://github.com/i18next/i18next-cli/commit/020e3b20d9a3277569921aa594d856e49894b912"><code>020e3b2</code></a> 1.94.3</li> <li><a href="https://github.com/i18next/i18next-cli/commit/3d41e4cec37d5172f0dfec3936f85a4075c28210"><code>3d41e4c</code></a> changelog for 1.94.3</li> <li><a href="https://github.com/i18next/i18next-cli/commit/4b7954f901cf5699a915ae77a18a107a6bc813e9"><code>4b7954f</code></a> fix: keys from a t() call with context and no count, or with count under disa...</li> <li>Additional commits viewable in <a href="https://github.com/i18next/i18next-cli/compare/v1.94.1...v1.95.1">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> 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:
1 parent
6a987e9164
commit
6ba7271a57
2 files changed
+5
-5
No files matched your search
Generated
+4
-4
@@ -96,7 +96,7 @@
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.8",
|
||||
"i18next-cli": "^1.94.1",
|
||||
"i18next-cli": "^1.95.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"istanbul-lib-coverage": "^3.2.2",
|
||||
"nyc": "^18.0.0",
|
||||
@@ -5857,9 +5857,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/i18next-cli": {
|
||||
"version": "1.94.1",
|
||||
"resolved": "https://registry.npmjs.org/i18next-cli/-/i18next-cli-1.94.1.tgz",
|
||||
"integrity": "sha512-29ywlzRMJDYTewnHfJ5ORQXZlY8dy0J+7Zg5wb1v76zrV4hWxvK2O5TrOT/VO449RvQtTpK/2AEVz+hi5yhIzQ==",
|
||||
"version": "1.95.1",
|
||||
"resolved": "https://registry.npmjs.org/i18next-cli/-/i18next-cli-1.95.1.tgz",
|
||||
"integrity": "sha512-B7BNaukqAd3HtQzQ0zWyslSfwvOZGySd6zhOmT2U7xAhCS8+MqBN1h7wDIhrXwy0goqhNv+Qo8ToZdtN+JeAcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.8",
|
||||
"i18next-cli": "^1.94.1",
|
||||
"i18next-cli": "^1.95.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"istanbul-lib-coverage": "^3.2.2",
|
||||
"nyc": "^18.0.0",
|
||||
|
||||
Reference in new issue
Block a user