Skip to content

Adopt mdbase 0.3.0-rc.8 and install packs with upgrade_from - #57

Merged
callumalpass merged 1 commit into
mainfrom
chore/mdbase-rc8
Oct 2, 2026
Merged

callumalpass merged 1 commit into
mainfrom
chore/mdbase-rc8

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

Why

@callumalpass/mdbase 0.3.0-rc.5 rejected type packs whose seed type resources carry upgrade_from ("must NOT have additional properties"), so #53 added referenceInstallerProvision() to strip it before local verification. rc.5 also rejected create({ type }) when the type's match rule did not hold under an explicit type key (match_failed), so #55's test wrote the view record by hand. rc.8 supports upgrade_from for seed types with the Rust engine's semantics, and explicit creates skip match (fixed in rc.6).

What

  • Bump @callumalpass/mdbase to 0.3.0-rc.8 (root package.json, the only dependent); lockfile updated.
  • Remove referenceInstallerProvision(). verify-manifest.mjs and reader-type-pack.test.mjs pass the real provisions, upgrade_from included, to assessTypePack/applyTypePack. verify-manifest also asserts that each pack plans install into an empty collection.
  • Digest pins come from the installer's desired.digest again, as they did before Stop Reader's starter types pinning the type key #53. This includes the beta.3 pack rebuilt from the baselines and the mdbase.view 1.0.1 pack. The pinned values are unchanged and match the canonical-JSON pins and mdbase packs assess.
  • New tests:
    • beta.3 → beta.4 over an unedited seed: both seeds plan update and are written as the exact version-2 bytes. The collection is current afterwards.
    • beta.3 → beta.4 over an edited seed: the three-way merge plans update, and the result is version 2, keeps the collection's edit and no longer declares or requires type.
  • The beta.1 → beta.4 test changes for original-beta.1. Its seeds are edited version-1 starters, so they are now merged (update) rather than preserved, and the merge keeps the appended customisation. changed-beta.1 still preserves.
  • The view-record test calls V03Operations.create({ type: "view", ... }) under [type] and [mdbase_type] instead of writing the file by hand. It checks the type key written and that type: article-journal stays ordinary data.
  • rc.7 resolves wikilinks by ID only when id_field is configured. The annotation in the type-key test now links its source by path ([[sources/example|Example source]]), the same way Reader's sourceLink does.

No manifest or generated file changes.

Verification

  • pnpm check (no MDBASE_ENV): lint, typecheck and all tests pass. Reader: 390 vitest and 20 node tests. Extension: 169.
  • MDBASE_ENV=production pnpm build passes (it includes manifest:validate), and the generated manifests are unchanged.
  • manifest:verify passes with the real provisions.

@callumalpass/mdbase 0.3.0-rc.5 rejected type packs whose seed type
resources carry upgrade_from, and rejected creates of a type whose match
rule did not hold even when an explicit type key was configured. rc.8
plans seed upgrades like the Rust engine (unedited seed -> exact desired
bytes, edited seed -> three-way merge) and rc.6 fixed explicit creates.

Drop referenceInstallerProvision: verify-manifest and the pack tests hand
the real provisions, upgrade_from included, to the JS installer, and
verify-manifest asserts each pack plans an install. Pack digest pins come
from the installer's desired digest again (they match the canonical-JSON
pins and `mdbase packs assess`), including the beta.3 reconstruction.

New tests upgrade an unedited beta.3 starter to beta.4 (seeds plan
update and are written as the exact version-2 bytes) and an edited one
(three-way merge keeps the edit). The beta.1 upgrade test now expects
original-beta.1's edited version-1 seeds to be merged rather than
preserved, keeping the customisation. The view test creates the view
record with create({ type: "view" }) under [type] and [mdbase_type]
instead of writing it by hand.

rc.7 resolves wikilinks by ID only when id_field is configured, so the
annotation in the type-key test links its source by path, as Reader's
sourceLink does.
@callumalpass
callumalpass merged commit 1269232 into main Oct 2, 2026
2 checks passed
@callumalpass
callumalpass deleted the chore/mdbase-rc8 branch October 2, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant