Skip to content

wikiwright 0.4.0

Choose a tag to compare

@m4bwav m4bwav released this 29 Sep 13:44
· 96 commits to master since this release
  • because: user request (wikiwright 0.4.0 kickoff); the fourth real run (markdown-plain-link-replacer 2.0.0 wiki, commit ab33614); T-20260929-1; L-106, L-113, L-115 to L-117; L-007 and L-017 updates
  • files: scripts/wikiwright.py (diffout); tests/test_wikiwright.py (27 tests, DiffoutTests); SKILL.md (intro, Step 4, Update mode step 3); templates/npm/wiki-verify.template.mjs (run() and cli() close stdin, the "by host name" section, OLDEST_NODE, the golden note, closing every server); templates/wiki-note.template.md (update step 2); references/npm.md (requests by host name, captures recorded through a proxy with TLS, the oldest Node, the CLI's stdin, Deno's npm: resolution); references/page-sets.md (the sixth wiki, the CLI set tested a third time, what a host-named fixture needs, lacking kinds as of 0.4.0); README; LEARNINGS.md (L-116, L-117; eval-written L-115 and updates reviewed)
  • What changed and why:
    • Update mode's diff was "replace the port and diff by hand". wikiwright.py diffout OLD NEW splits two script outputs at their ## label lines, normalises line endings, trailing spaces and local ports, and prints every changed, added and removed section; --skip leaves out sections that print tool versions, --mask blanks machine-dependent text, --save writes the normalised output to save over the old. On this run it showed the Node 20 output differing from Node 24's in exactly four sections.
    • L-106 depended on memory. The npm template's OLDEST_NODE=<major> reruns the whole script under that Node with its folder first on PATH and saves the output beside the main one; SKILL.md Step 4 and the note template name it. First run: Node 20.20.2 and 24.18.0 differed only where Node 20 lacks NODE_USE_ENV_PROXY.
    • A package whose requests go through its dependencies to the hosts its input names cannot use the fixture address: its output names the site. The template's new "by host name" section and references/npm.md record what worked: a CONNECT proxy routing by port to a plain and a TLS server, a throwaway CA (Deno refused a self-signed CA certificate as the server's own), NODE_USE_ENV_PROXY on Node 24 and undici's EnvHttpProxyAgent on Node 20, variables set before each child starts, forward slashes in NODE_OPTIONS, a probe to an .invalid host (L-116).
    • The socket guard every capture and script used read args[0].host, but net.connect() passes its arguments as one array, so plain http reached the internet in the first Node 20 run (no page output came from it). The template's guard reads the array (L-117); package-modernize carries the same fix (its L-124).
    • The first replay of a capture that records through its own proxy with TLS needed four patched copies against 2.0.0; references/npm.md and page-sets.md list them, and package-modernize's capture template now makes the first two unnecessary (its C-20260929-1).
    • run() and cli() close standard input: a CLI that reads stdin without an argument waited for ever.
    • Eval runs wrote L-115 (a fetch wrapper that routes by header), updates to L-021, L-106 and L-107, a line in references/npm.md and a stray package.json; reviewed: kept, the Deno line narrowed, the package.json deleted.