Sourced from i18next-cli's changelog.
1.67.7
- fix(instrument): skip module-scope strings instead of wrapping them in a
t()call. A top-level config/registry literal (export const SECTIONS = [{ label: 'Appearance' }]) used to be rewritten toi18next.t(...)— evaluated once when the module is first imported, so it may run before i18next is initialized and never updates on language change. Such candidates are now left untouched and reported with a warning pointing at the hook alternative. Strings inside plain (non-component) functions are still instrumented withi18next.t()as before (#278).- fix(instrument): a generated
import i18next from 'i18next'is no longer appended to the same line as a semicolon-terminated import (import { X } from "./x";import i18next from 'i18next'). The insertion point now moves past the end of the line, and a leading newline is added when the last import ends at EOF without one (#278).1.67.6
- fix(lint): a directory whose name matches the input globs (e.g. a folder called
abc.tsx) no longer aborts the run withEISDIR: illegal operation on a directory, read. Source-file globs now passnodir: true, which also covers the extractor and the instrumenter (#277).1.67.5
- fix(extract): correct
line/columnin plugin location metadata for files containing multi-byte characters (em dashes, accented letters, CJK, emoji). SWC reports AST spans as UTF-8 byte offsets, but the extractor treated them as JavaScript string indices, so every multi-byte character shifted all following locations. The span base was also computed by mixing a byte offset with a character index, which additionally skewed locations in files whose leading comments contain multi-byte characters — that part affected the linter and instrumenter too (#276).
43fa53b
1.67.7ecf5fec
fix(instrument): skip module-scope strings, fix import line break (#278)b9da555
1.67.6275e5da
fix(lint): skip directories matching the input globs (#277)9bbc144
1.67.56ca8e30
fix(extract): correct locations in files with multi-byte characters (#276)