From 7595bdb78d500753e5d8ae7b774f561761ef3e47 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Fri, 14 Jun 2024 11:09:46 -0500 Subject: [PATCH] Update content type dependencies and imports --- packages/mls-client/package.json | 1 + packages/mls-client/src/Client.ts | 12 ++++++------ packages/mls-client/src/Conversation.ts | 2 +- packages/mls-client/src/DecodedMessage.ts | 2 +- packages/mls-client/test/Conversation.test.ts | 2 +- packages/mls-client/test/Conversations.test.ts | 2 +- yarn.lock | 10 ++++++++++ 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/packages/mls-client/package.json b/packages/mls-client/package.json index e567e7ade..75a552677 100644 --- a/packages/mls-client/package.json +++ b/packages/mls-client/package.json @@ -53,6 +53,7 @@ }, "dependencies": { "@xmtp/content-type-primitives": "^1.0.1", + "@xmtp/content-type-text": "^1.0.0", "@xmtp/mls-client-bindings-node": "^0.0.4", "@xmtp/proto": "^3.61.1" }, diff --git a/packages/mls-client/src/Client.ts b/packages/mls-client/src/Client.ts index 1af536a06..fea2045b5 100644 --- a/packages/mls-client/src/Client.ts +++ b/packages/mls-client/src/Client.ts @@ -1,5 +1,11 @@ import { join } from 'node:path' import process from 'node:process' +import type { + ContentCodec, + ContentTypeId, + EncodedContent, +} from '@xmtp/content-type-primitives' +import { TextCodec } from '@xmtp/content-type-text' import { createClient, generateInboxId, @@ -8,12 +14,6 @@ import { type NapiClient, type NapiMessage, } from '@xmtp/mls-client-bindings-node' -import { - TextCodec, - type ContentCodec, - type ContentTypeId, - type EncodedContent, -} from '@xmtp/xmtp-js' import { ContentTypeGroupUpdated, GroupUpdatedCodec, diff --git a/packages/mls-client/src/Conversation.ts b/packages/mls-client/src/Conversation.ts index 8367093d9..c30ebd159 100644 --- a/packages/mls-client/src/Conversation.ts +++ b/packages/mls-client/src/Conversation.ts @@ -1,8 +1,8 @@ +import type { ContentTypeId } from '@xmtp/content-type-primitives' import type { NapiGroup, NapiListMessagesOptions, } from '@xmtp/mls-client-bindings-node' -import type { ContentTypeId } from '@xmtp/xmtp-js' import { AsyncStream, type StreamCallback } from '@/AsyncStream' import type { Client } from '@/Client' import { DecodedMessage } from '@/DecodedMessage' diff --git a/packages/mls-client/src/DecodedMessage.ts b/packages/mls-client/src/DecodedMessage.ts index cc8ee338b..aa707d2b0 100644 --- a/packages/mls-client/src/DecodedMessage.ts +++ b/packages/mls-client/src/DecodedMessage.ts @@ -1,9 +1,9 @@ +import { ContentTypeId } from '@xmtp/content-type-primitives' import { NapiDeliveryStatus, NapiGroupMessageKind, type NapiMessage, } from '@xmtp/mls-client-bindings-node' -import { ContentTypeId } from '@xmtp/xmtp-js' import type { Client } from '@/Client' import { nsToDate } from '@/helpers/date' diff --git a/packages/mls-client/test/Conversation.test.ts b/packages/mls-client/test/Conversation.test.ts index a9f462205..f2cce130e 100644 --- a/packages/mls-client/test/Conversation.test.ts +++ b/packages/mls-client/test/Conversation.test.ts @@ -1,4 +1,4 @@ -import { ContentTypeText } from '@xmtp/xmtp-js' +import { ContentTypeText } from '@xmtp/content-type-text' import { describe, expect, it } from 'vitest' import { createRegisteredClient, createUser } from '@test/helpers' diff --git a/packages/mls-client/test/Conversations.test.ts b/packages/mls-client/test/Conversations.test.ts index d569300d3..e6a1fad26 100644 --- a/packages/mls-client/test/Conversations.test.ts +++ b/packages/mls-client/test/Conversations.test.ts @@ -1,4 +1,4 @@ -import { ContentTypeText } from '@xmtp/xmtp-js' +import { ContentTypeText } from '@xmtp/content-type-text' import { describe, expect, it } from 'vitest' import { createRegisteredClient, createUser } from '@test/helpers' diff --git a/yarn.lock b/yarn.lock index 079bfe16c..b8fc044d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2872,6 +2872,15 @@ __metadata: languageName: node linkType: hard +"@xmtp/content-type-text@npm:^1.0.0": + version: 1.0.0 + resolution: "@xmtp/content-type-text@npm:1.0.0" + dependencies: + "@xmtp/content-type-primitives": "npm:^1.0.1" + checksum: 10/b195060ad5686a6ace2772d5208d535d1f5062820629764aec52cedf3f2630885b5913aea6d2f0186a49139845c20d2ded783c6bf998884f09374c07b183141f + languageName: node + linkType: hard + "@xmtp/mls-client-bindings-node@npm:^0.0.4": version: 0.0.4 resolution: "@xmtp/mls-client-bindings-node@npm:0.0.4" @@ -2891,6 +2900,7 @@ __metadata: "@typescript-eslint/parser": "npm:^7.8.0" "@vitest/coverage-v8": "npm:^1.6.0" "@xmtp/content-type-primitives": "npm:^1.0.1" + "@xmtp/content-type-text": "npm:^1.0.0" "@xmtp/mls-client-bindings-node": "npm:^0.0.4" "@xmtp/proto": "npm:^3.61.1" "@xmtp/xmtp-js": "workspace:^"