post(engineering): two ways a JavaScript file stops working and looks fine (EN+ZH) + og/banner
Deploy / build (push) Successful in 23s

Backdated into the 2025-02 gap: pubDate 2025-02-20, updatedDate 2026-10-16 (lastmod honest).
No calendar dates or checkable version pins in the prose — the condition for backdating — and
no internal links, since every post it would cite is dated later and a backdated post may only
link backwards (see project-state B2n). Generators: additive entries only (5 + 17 lines, 0 deletions).
This commit is contained in:
hoelee committed 2026-10-16 13:32:06 +08:00
1 parent db1e75c3b1
commit 2394a7cbee
6 files changed
+301

No files matched your search

+17
View File
@@ -1271,6 +1271,23 @@ BANNERS['authentik-css-greater-than-bug'] = {
],
};
BANNERS['two-ways-a-javascript-file-stops-working-and-looks-fine'] = {
titlebar: "rt - app.js, silently dead",
lines: [
{ t: 'prompt', text: "$" }, { t: 'cmd', text: "rtCheckHandlers() -> []" },
{ t: 'dim', text: "page renders zh-CN exactly as before - that is the problem" }, { t: 'err', text: "TypeError: t is not a function (applyTheme(t) shadowed t())" },
{ t: 'prompt', text: "$" }, { t: 'cmd', text: "?lang=pseudo strings stretched 1.6x" },
{ t: 'ok', text: "no horizontal overflow at 1440px" }, { t: 'hl', text: "assert effects, not intent: every hook really swaps" },
{ t: 'dim', text: "second cause: let LANG declared below its first call (TDZ)" }, { t: 'dim', text: "3 packs from one table - key drift cannot merge" },
],
flow: [
{ n: '1', label: "load the page" },
{ n: '2', label: "assert typeof t" },
{ n: '3', label: "switch to pseudo" },
{ n: '4', label: "assert no overflow" },
],
};
// ---------- read frontmatter ----------
const postPath = join(ROOT, 'src', 'content', 'posts', `${slug}.md`);
let category = 'devops';
+5
View File
@@ -387,6 +387,11 @@ TERMINALS['authentik-css-greater-than-bug'] = `
<div class="line"><span class="prompt">&nbsp;</span><span class="err">selector matches, computed display: list-item</span></div>
<div class="line"><span class="prompt">$</span><span class="cmd">read the sheet back out of the CSS parser</span><span class="fix">-> u003e, not ></span></div>`;
TERMINALS['two-ways-a-javascript-file-stops-working-and-looks-fine'] = `
<div class="line"><span class="prompt">$</span><span class="cmd">node --check app.js -> valid, no output</span></div>
<div class="line"><span class="prompt">&nbsp;</span><span class="err">TypeError: t is not a function (a parameter named t)</span></div>
<div class="line"><span class="prompt">$</span><span class="cmd">typeof t === 'function' ?lang=pseudo clean</span><span class="fix">-> script reaches the end</span></div>`;
// ---------- read frontmatter ----------
const postPath = join(ROOT, 'src', 'content', 'posts', `${slug}.md`);
if (!existsSync(postPath)) {