fix: CI — i18n importable en Node + mistune >=3.3.4 (BUG-128, BUG-129)
CI / lint (push) Successful in 1m18s
CI / security (push) Successful in 18s
CI / test (push) Successful in 4m7s
CI / build (push) Successful in 1m17s
CI / e2e (push) Successful in 15m11s

BUG-129 : les exports globaux de i18n.js sont protégés par typeof window pour que desktop-roots.test.mjs (Node sans JSDOM) ne casse plus. BUG-128 : mistune 3.3.3 -> >=3.3.4 (CVE-2026-97698/97699), plancher ajouté au garde-fou pip-audit.
This commit is contained in:
2026-11-20 07:42:58 -05:00
parent f77b0e6574
commit a336746d00
13 changed files with 37 additions and 19 deletions
+10 -5
View File
@@ -158,11 +158,16 @@ async function _loadLocaleStrings(locale) {
}
// ── Global exports for non-module scripts (legacy app.js) ──────────────────
window.t = t;
window.tr = tr;
window.getLocale = getLocale;
window.setLocale = setLocale;
window.initI18n = initI18n;
// Guarded so the module can also be imported in Node (JSDOM-less unit tests)
// without a browser global: desktop.js/auth.js import i18n.js and must stay
// loadable in `node tests/frontend/desktop-roots.test.mjs`.
if (typeof window !== "undefined") {
window.t = t;
window.tr = tr;
window.getLocale = getLocale;
window.setLocale = setLocale;
window.initI18n = initI18n;
}
/** Walk the DOM and update every element with a data-i18n* attribute. */
function _applyDOM() {