Skip to content

v1.12.1

Choose a tag to compare

@euoia euoia released this 05 Nov 09:54
· 4 commits to main since this release

Publish check speed, unsaved edits on leaving the page, and large entry saves.

Fixes

  • The publish check keeps Astro's image cache between checks. Each check builds in a fresh worktree without the live checkout's node_modules/.astro, so every check re-optimised every image on the site, and check time grew with the image library until a publish could pass the time limit and not be pushed. The check now keeps its own copy of the image cache in the repository's git directory (.git/astroadmin/check-image-cache/), kept whether the build passed, failed or timed out. The live checkout's cache is still never read or written. On a 238-image site: 31 s cold, 3.3 s on the next check.
  • An edit made within a second of closing or reloading the tab is saved (#103). The page sends any unsaved edit as it goes away. Every save carries its order, and the server skips a save older than one the same page has already written, so a late save never overwrites a newer one. Logout waits for saves first; a save that cannot be sent says so, naming the entry.
  • Entry saves up to 5 MB. The 100 KB default refused long posts outright. The /api/content body is now parsed after sign-in with a 5 MB limit; every other route keeps 100 KB, and an anonymous request still cannot make the server parse a large body.
  • A malformed or refused JSON body is a 4xx with fixed text, not a 500 (#104).

Tests

New: a publish-check test that the image cache carries across checks (including after a timeout and a failure) and never reaches the checkout, save-order, and autosave-leave-browser; additions to api-basics. Each new check was seen red first.