Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example Vite config, misc cleanup #724

Merged
merged 6 commits into from
Nov 19, 2024
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
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",
rygine marked this conversation as resolved.
Show resolved Hide resolved
"!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
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"
rygine marked this conversation as resolved.
Show resolved Hide resolved
],
"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]);
rygine marked this conversation as resolved.
Show resolved Hide resolved

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