fix(manga): restore badgeHost, and make that class of bug a lint error #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/badgehost-restore"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
badgeHost was inside the block replaced when the badge became an element (2.1.6), so every mark pass threw ReferenceError and no badge rendered. Restored, plus biome.json enables correctness/noUndeclaredVariables as an error with browser/userscript globals declared - verified by reintroducing the typo and watching the check fail. v2.1.9.
Every badge pass was throwing `ReferenceError: badgeHost is not defined`: when the badge became an element (2.1.6) the block I replaced ran from the glyph table to the mirror-selection comment, and badgeHost sat inside it. The badge never rendered again, and nothing in the pipeline could notice - `node --check` parses, biome had no rule for it, and the failure is only visible in the page console. Two parts: * badgeHost is back where it belongs, with a comment saying what happened and what the card-based positioning is for; * biome.json enables `correctness/noUndeclaredVariables` as an error, with the browser/userscript globals declared. Verified by reintroducing the typo: the check fails on `The badgeHost variable is undeclared` and passes once restored, so the next edit of this shape cannot ship silently. (`saveAs` in the grind-75 script is a FileSaver global, so it is declared alongside the DOM ones.) v2.1.9." && git push -q -u origin fix/badgehost-restore 2>&1|tail -1; TOK=$(sops -d /Users/rms/Documents/Repositories/homelab/hosts/minerva/secrets/secrets.yaml 2>/dev/null | grep -E '^\s+forgejo_api_token:' | awk '{print $2}'); N=$(curl -s -X POST -H "Authorization: token $TOK" -H "Content-Type: application/json" -d '{"head":"fix/badgehost-restore","base":"master","title":"fix(manga): restore badgeHost, and make that class of bug a lint error","body":"badgeHost was inside the block replaced when the badge became an element (2.1.6), so every mark pass threw ReferenceError and the badge never rendered again. Restored, plus biome.json enables correctness/noUndeclaredVariables as an error (with browser/userscript globals declared) - verified by reintroducing the typo and watching the check fail. v2.1.9."}' https://forgejo.home.arpa/api/v1/repos/rms/userscripts/pulls | python3 -c "import sys,json;d=json.load(sys.stdin);print(d.get('number') or d.get('message'))"); sleep 2; curl -s -o /dev/null -w "merge %{http_code}\n" -X POST -H "Authorization: token $TOK" -H "Content-Type: application/json" -d '{"Do":"rebase"}' "https://forgejo.home.arpa/api/v1/repos/rms/userscripts/pulls/$N/merge"; cd ~/Documents/Repositories/userscripts && git worktree remove ../userscripts-badge-fix --force 2>/dev/null; git push -q origin --delete fix/badgehost-restore 2>&1|tail -1; git pull --ff-only -q && git log --oneline -1; rm -f /tmp/keep.js /tmp/b.txt