Repository navigation
Adopt mdbase 0.3.0-rc.8 and install packs with upgrade_from - #57
Merged
Merged
Conversation
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
@callumalpass/mdbase0.3.0-rc.5 rejected type packs whose seed type resources carryupgrade_from("must NOT have additional properties"), so #53 addedreferenceInstallerProvision()to strip it before local verification. rc.5 also rejectedcreate({ type })when the type'smatchrule did not hold under an explicit type key (match_failed), so #55's test wrote the view record by hand. rc.8 supportsupgrade_fromfor seed types with the Rust engine's semantics, and explicit creates skipmatch(fixed in rc.6).What
@callumalpass/mdbaseto0.3.0-rc.8(rootpackage.json, the only dependent); lockfile updated.referenceInstallerProvision().verify-manifest.mjsandreader-type-pack.test.mjspass the real provisions,upgrade_fromincluded, toassessTypePack/applyTypePack.verify-manifestalso asserts that each pack plansinstallinto an empty collection.desired.digestagain, 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 andmdbase packs assess.updateand are written as the exact version-2 bytes. The collection iscurrentafterwards.update, and the result is version 2, keeps the collection's edit and no longer declares or requirestype.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.1stillpreserves.V03Operations.create({ type: "view", ... })under[type]and[mdbase_type]instead of writing the file by hand. It checks the type key written and thattype: article-journalstays ordinary data.id_fieldis configured. The annotation in the type-key test now links its source by path ([[sources/example|Example source]]), the same way Reader'ssourceLinkdoes.No manifest or generated file changes.
Verification
pnpm check(noMDBASE_ENV): lint, typecheck and all tests pass. Reader: 390 vitest and 20 node tests. Extension: 169.MDBASE_ENV=production pnpm buildpasses (it includesmanifest:validate), and the generated manifests are unchanged.manifest:verifypasses with the real provisions.