Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"matchPackageNames": ["@xmtp/node-sdk", "@xmtp/node-bindings"],
"followTag": "nightly",
"allowedVersions": "/-(?:pre\\.\\d{14}\\.(?:dev|nightly)\\.[0-9a-f]+|nightly\\.\\d{8}\\.[0-9a-f]+)$/",
"ignoreUnstable": false,
"respectLatest": false
}
Expand Down
16 changes: 11 additions & 5 deletions test/xmtpLockstep.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ import { describe, expect, it } from "vitest";
*
* Nightlies of both packages are published together from a single libxmtp
* commit, and dev releases likewise publish both from one libxmtp run — so
* the pins are in lockstep exactly when they share the same
* `nightly.<date>.<hash>` or `dev.<hash>` suffix. Renovate bumps nightlies
* as one grouped PR (see .github/renovate.json) and libxmtp's dev-release
* the pins are in lockstep exactly when they share the same suffix: the
* unified `pre.<YYYYMMDDHHMMSS>.<channel>.<hash>` shape that main-cut dev and
* nightly releases now share (one release run stamps one timestamp, so both
* packages carry an identical suffix), or the legacy
* `nightly.<date>.<hash>` / `dev.<hash>` shapes, which are kept because
* branch-cut dev releases still use them. Renovate bumps nightlies as one
* grouped PR (see .github/renovate.json) and libxmtp's dev-release
* automation opens dev bumps the same way; this test fails if anything
* desyncs them.
*/
const PRERELEASE_SUFFIX = /-(nightly\.\d{8}\.[0-9a-f]+|dev\.[0-9a-f]+)$/;
const PRERELEASE_SUFFIX =
/-(pre\.\d{14}\.(?:dev|nightly)\.[0-9a-f]+|nightly\.\d{8}\.[0-9a-f]+|dev\.[0-9a-f]+)$/;

describe("xmtp node-sdk / node-bindings lockstep", () => {
const pkg = JSON.parse(
Expand All @@ -46,7 +51,8 @@ describe("xmtp node-sdk / node-bindings lockstep", () => {
bindingsSuffix,
`@xmtp/node-sdk ${nodeSdk} and @xmtp/node-bindings ${nodeBindings} ` +
"must come from the same libxmtp commit (matching " +
"nightly.<date>.<hash> or dev.<hash> suffix); a skewed pair breaks inbox-id " +
"pre.<ts>.<channel>.<hash>, nightly.<date>.<hash>, or dev.<hash> " +
"suffix); a skewed pair breaks inbox-id " +
'derivation with "Inbox ID doesn\'t match nonce & address"',
).toBe(sdkSuffix);
});
Expand Down
Loading