Repository navigation
Move to SDK 0.1.0-beta.188 and its new API - #96
Merged
Merged
Conversation
Builds against the one-entry, plain-value SDK with no compatibility layer: - reads take one trailing options object (include/signal inside it, watchChanges callback first, awaitReceipt timeoutMs in options) - record, receipt, catalogue and contract values are plain JSON, so the toPlain/Object.fromEntries unwrapping goes, issue details are read as an object (a Map check would have silently stopped marking broken types) - mdbase.application.reauthorize becomes mdbase.reauthorize - the connection notice reads sync.writes and sync.connection in place of snapshot.writes and the removed StatusSummary kind - tests connect through MemoryReplica.client() (connect left the root), use settle in place of save and plain catalogue/frontmatter shapes
The ready fixture already declares Writer's contracts on the test app's collection, and the SDK testing kit now answers describe from them, so the hand-written catalog stub is no longer needed.
The old offline status maps to connection "offline"; a replica that is still connecting, or an auth failure, did not raise the notice.
The migrated code does not build against beta.157. Both archives are the sdk-v0.1.0-beta.188 release assets, unchanged, with their sigstore bundles (signed by publish-sdk-npm.yml at refs/tags/v0.1.0-beta.188, source e8ffb806).
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.
What
Moves Writer to
@mdbase-dev/sdk@0.1.0-beta.188, whose API changed (mdbase-connect #1486). The first commit is the automation's production repin from #95, unchanged; the rest moves the code. #95 cannot pass by itself.Changes
createMdbaseis the only entry; reads take one options object;submitresolves oneWrite; record values are plain JSON; status comes fromsnapshot.sync.describe.sdk-v0.1.0-beta.188release assets, unchanged. I verified their sigstore bundles withgh attestation verify: signed bypublish-sdk-npm.ymlatrefs/tags/v0.1.0-beta.188, sourcee8ffb806. The beta.157 archives, pins and bundles are removed.Checks
pnpm check: i18n, typecheck, 55 + 369 unit tests pass; node tests 159 pass. Two publisher tests need thesigstoremodule of CI's npm, which my machine's npm lacks; CI runs them.pnpm build:production,build:stagingandbuild:labpass.Not done
Writer keeps its own write settlement; the SDK's
settlehas different retry and outcome rules. The legacy@mdbase-dev/connectuse is untouched.