Skip to content

Mallok 0.1.0-rc.9 — fixes from building a real site

Pre-release
Pre-release

Choose a tag to compare

@JasonYv JasonYv released this 05 Oct 06:50
· 31 commits to main since this release

Defects found building a real site on rc.7 and rc.8, fixed.

Fixed

  • mallok publish puts every language of a bundle into one translation group. A bundle without mallok.json was saved one language at a time and each got a group of its own, so the pages had no hreflang and no language switcher, while mallok build grouped the same files correctly.
  • The home page receives recent.<kind> for every kind the theme lists, not article alone. A theme's product section never appeared on a served site. The Worker and mallok build now use one rule: the kinds the site enables and the theme gives a list layout, the ten newest of each.
  • A generated site type-checks its text imports. The package declares *.liquid, *.css, *.sql and *.md modules, so a site with its own theme or a plugin migration passes npm run typecheck.
  • .dev.vars.example carries MALLOK_SETUP_KEY, without which the wizard refuses to create the administrator of a local site.
  • mallok publish . --with-settings works from a project root. Only content/ is read, so the package's own template content in node_modules is no longer published as a page of the site, and site.json is applied before the site's kinds are read.
  • A publish dry run no longer applies site.json.
  • The admin shows a revoked API token as revoked; revoking used to look like a button that did nothing.
  • Reloading an admin route no longer answers 503 when the browser sends cache validators (seen under wrangler dev).

Added

  • escapeHtml and renderTextTemplate are exported from mallok/worker, so a plugin that lives in a site can build its own HTML and email. A rendered text template is not HTML-escaped; see docs/PLUGIN_API.md §7.6.
  • POST /content returns translationGroup, and GET /content accepts a slug filter.

Upgrade notes

  • Bundles already split into several translation groups are not merged by publishing again: an existing item keeps its group. Delete the extra languages and publish the bundle again.
  • A static build's home page lists ten items per kind, not twelve, and a kind without a list layout gets no recent group. A served site always showed ten.
  • A site with its own text-modules.d.ts should delete it. With skipLibCheck: false the two copies are reported as duplicate identifiers; with the template's skipLibCheck: true nothing is reported.
  • Deploy after upgrading, before you publish. A newer CLI against a site still running an older release falls back to one group per language.

Upgrade with npx mallok upgrade --to 0.1.0-rc.9.

Candidate provenance

  • Source: 8772a77e812336082416bdda9f0e4f393eb4234f
  • Artifact: mallok-0.1.0-rc.9.tgz
  • SHA-256: ab2f2993d769cb8f16be30b923501507e3ae790b3a206d19626fae8715891b0a
  • Local release gate: lint, typecheck, 1,097 unit/integration tests, 6 real-upgrade tests, build and bundle budgets, static build, coverage floor, 31 browser/accessibility checks and a whole-history secret scan passed; 29 exact-artifact consumer checks passed against this tarball.
  • GitHub CI and the complete release gate passed. The Linux CI tarball is byte-for-byte identical to the local one, and a clean-clone rebuild reproduced it exactly.
  • The isolated test site was upgraded from rc.8 with mallok upgrade and deployed. Checked on the deployed site: the home pages in both languages show the product section with its three products; a two-language bundle without mallok.json, published with the real CLI, landed in one translation group with hreflang on both pages, and publishing it again reported both unchanged; reloading an admin route with cache validators answered 200. Pages, SEO endpoints, cache HIT/MISS/HEAD behaviour, credential bypass and admin boundaries behaved as intended.

Known limitations

This is not stable 0.1. No new CPU sample was taken; the rc.5 measurements remain historical, and the home page now runs one statement per listed kind. Real inquiry email delivery, the seven-day media cleanup check, full second-site restore and production upgrade/rollback acceptance remain open. See docs/RELEASE_STATUS.md.

npm is published: mallok@0.1.0-rc.9; next and latest point to it.


修复在 rc.7、rc.8 上搭建真实站点时发现的问题:多语言文章包发布后归入同一个翻译组、首页为主题列出的每种内容类型提供最近内容、生成的站点能通过类型检查并在本地认领、可以从项目根目录发布、dry run 不再写入设置,以及两个后台修复。升级前请看上面的四条升级说明。仍不是 0.1 稳定版;GitHub 和 npm 均已发布。