Skip to content

Commit

Permalink
Merge pull request #724 from xmtp/rygine/fixes
Browse files Browse the repository at this point in the history
Fix example Vite config, misc cleanup
  • Loading branch information
rygine authored Nov 19, 2024
2 parents 3eed1fe + 931ce82 commit d30b40c
Show file tree
Hide file tree
Showing 20 changed files with 107 additions and 87 deletions.
7 changes: 5 additions & 2 deletions content-types/content-type-group-updated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-primitives/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-reaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-read-receipt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-remote-attachment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-reply/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions content-types/content-type-transaction-reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@
"browser": "./dist/browser/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/browser/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
3 changes: 2 additions & 1 deletion examples/react-vite-browser-sdk/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
optimizeDeps: {
exclude: ["@xmtp/wasm-bindings"],
exclude: ["@xmtp/browser-sdk"],
include: ["@xmtp/proto"],
},
server: {
headers: {
Expand Down
6 changes: 3 additions & 3 deletions packages/consent-proof-signature/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand All @@ -38,8 +39,7 @@
"files": [
"dist",
"src",
"!src/**/*.test.*",
"tsconfig.json"
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
6 changes: 3 additions & 3 deletions packages/frames-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"module": "dist/index.js",
"browser": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"src",
"!src/**/*.test.*",
"tsconfig.json"
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
7 changes: 5 additions & 2 deletions packages/frames-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"src",
"!src/**/*.test.*"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
5 changes: 3 additions & 2 deletions sdks/browser-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default nextConfig;

### Bundlers

This SDK uses a WebAssembly (WASM) module and some bundlers must be configured properly to handle it.
This SDK and some of its dependencies use `import.meta.url`. Some bundlers must be configured to account for this during development.

#### Vite

Expand All @@ -79,7 +79,8 @@ import { defineConfig } from "vite";

export default defineConfig({
optimizeDeps: {
exclude: ["@xmtp/wasm-bindings"],
exclude: ["@xmtp/browser-sdk"],
include: ["@xmtp/proto"],
},
});
```
Expand Down
6 changes: 3 additions & 3 deletions sdks/browser-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"module": "dist/index.js",
"browser": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"src",
"tsconfig.json"
"src"
],
"scripts": {
"build": "yarn clean:dist && yarn rollup -c",
Expand Down
3 changes: 1 addition & 2 deletions sdks/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"types": "dist/index.d.ts",
"files": [
"dist",
"src",
"tsconfig.json"
"src"
],
"scripts": {
"bench": "yarn build:bench && node dist/bench/index.cjs",
Expand Down
3 changes: 2 additions & 1 deletion sdks/node-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand Down
5 changes: 1 addition & 4 deletions sdks/node-sdk/src/Conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ export class Conversations {
}
}

async newConversation(
accountAddresses: string[],
options?: CreateGroupOptions,
) {
async newGroup(accountAddresses: string[], options?: CreateGroupOptions) {
const group = await this.#conversations.createGroup(
accountAddresses,
options,
Expand Down
4 changes: 1 addition & 3 deletions sdks/node-sdk/test/Client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ describe("Client", () => {
const user2 = createUser();
const client1 = await createRegisteredClient(user1);
const client2 = await createRegisteredClient(user2);
const group = await client1.conversations.newConversation([
user2.account.address,
]);
const group = await client1.conversations.newGroup([user2.account.address]);

await client2.conversations.sync();
const group2 = client2.conversations.getConversationById(group.id);
Expand Down
Loading

0 comments on commit d30b40c

Please sign in to comment.