Skip to content

Commit

Permalink
Upgrade node bindings (#808)
Browse files Browse the repository at this point in the history
* Upgrade node bindings

* Update tests

* Create lazy-ravens-try.md
  • Loading branch information
rygine authored Jan 31, 2025
1 parent 207614f commit 931c4a4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-ravens-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@xmtp/node-sdk": patch
---

Upgrade node bindings
2 changes: 1 addition & 1 deletion sdks/node-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@xmtp/content-type-group-updated": "^2.0.0",
"@xmtp/content-type-primitives": "^2.0.0",
"@xmtp/content-type-text": "^2.0.0",
"@xmtp/node-bindings": "^0.0.34",
"@xmtp/node-bindings": "^0.0.35",
"@xmtp/proto": "^3.72.3"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions sdks/node-sdk/test/Conversation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ describe.concurrent("Conversation", () => {
updateGroupDescriptionPolicy: 0,
updateGroupImageUrlSquarePolicy: 0,
updateGroupPinnedFrameUrlPolicy: 0,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
});

await conversation.updatePermission(
Expand Down Expand Up @@ -507,7 +507,7 @@ describe.concurrent("Conversation", () => {
updateGroupDescriptionPolicy: 2,
updateGroupImageUrlSquarePolicy: 2,
updateGroupPinnedFrameUrlPolicy: 2,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
});
});
});
14 changes: 9 additions & 5 deletions sdks/node-sdk/test/Conversations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe.concurrent("Conversations", () => {
updateGroupDescriptionPolicy: 0,
updateGroupImageUrlSquarePolicy: 0,
updateGroupPinnedFrameUrlPolicy: 0,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
});
expect(conversation.addedByInboxId).toBe(client1.inboxId);
expect((await conversation.messages()).length).toBe(1);
Expand Down Expand Up @@ -97,7 +97,7 @@ describe.concurrent("Conversations", () => {
updateGroupImageUrlSquarePolicy: 0,
updateGroupNamePolicy: 0,
updateGroupPinnedFrameUrlPolicy: 0,
updateMessageExpirationMsPolicy: 0,
updateMessageDisappearingPolicy: 0,
});
expect(group.addedByInboxId).toBe(client1.inboxId);
expect((await group.messages()).length).toBe(0);
Expand Down Expand Up @@ -138,6 +138,10 @@ describe.concurrent("Conversations", () => {
const dm2 = client2.conversations.getDmByInboxId(client1.inboxId);
expect(dm2).toBeDefined();
expect(dm2!.id).toBe(group.id);

const group3 = await client1.conversations.newDm(user2.account.address);
expect(group3).toBeDefined();
expect(group3.id).toBe(group.id);
});

it("should get a group by ID", async () => {
Expand Down Expand Up @@ -231,7 +235,7 @@ describe.concurrent("Conversations", () => {
updateGroupDescriptionPolicy: 2,
updateGroupImageUrlSquarePolicy: 2,
updateGroupPinnedFrameUrlPolicy: 2,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
});

const groupWithDescription = await client1.conversations.newGroup(
Expand Down Expand Up @@ -276,7 +280,7 @@ describe.concurrent("Conversations", () => {
updateGroupDescriptionPolicy: 1,
updateGroupImageUrlSquarePolicy: 1,
updateGroupPinnedFrameUrlPolicy: 1,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
},
},
);
Expand All @@ -293,7 +297,7 @@ describe.concurrent("Conversations", () => {
updateGroupDescriptionPolicy: 1,
updateGroupImageUrlSquarePolicy: 1,
updateGroupPinnedFrameUrlPolicy: 1,
updateMessageExpirationMsPolicy: 2,
updateMessageDisappearingPolicy: 2,
});
});

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5169,10 +5169,10 @@ __metadata:
languageName: node
linkType: hard

"@xmtp/node-bindings@npm:^0.0.34":
version: 0.0.34
resolution: "@xmtp/node-bindings@npm:0.0.34"
checksum: 10/4f5314d40dc1f07e303e52a4be1d4517f1199089b4ac1677fabb11f64a6b4f57a989b25849b31036d6d228e9de494a8326d2b53386067146ee47e28691bba999
"@xmtp/node-bindings@npm:^0.0.35":
version: 0.0.35
resolution: "@xmtp/node-bindings@npm:0.0.35"
checksum: 10/c6946dd2e99ef5e3056f73590846a0f9b9be0ef3d61101ea547793801232362fa79495c2ebd97d61ee2a21e350779fe21f4ef810f590688051817beb90b0a8cb
languageName: node
linkType: hard

Expand Down Expand Up @@ -5200,7 +5200,7 @@ __metadata:
"@xmtp/content-type-group-updated": "npm:^2.0.0"
"@xmtp/content-type-primitives": "npm:^2.0.0"
"@xmtp/content-type-text": "npm:^2.0.0"
"@xmtp/node-bindings": "npm:^0.0.34"
"@xmtp/node-bindings": "npm:^0.0.35"
"@xmtp/proto": "npm:^3.72.3"
"@xmtp/xmtp-js": "workspace:^"
fast-glob: "npm:^3.3.3"
Expand Down

0 comments on commit 931c4a4

Please sign in to comment.