Skip to content

Commit

Permalink
Merge pull request #139 from xmtp/rygine/upgrade-js-sdk-beta
Browse files Browse the repository at this point in the history
Upgrade to latest JS SDK beta
  • Loading branch information
rygine authored Dec 19, 2023
2 parents ab0b4bf + b8c207a commit 74a5c07
Show file tree
Hide file tree
Showing 11 changed files with 426 additions and 446 deletions.
6 changes: 6 additions & 0 deletions .changeset/afraid-singers-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@xmtp/react-sdk": patch
---

- Upgraded to latest JS SDK beta
- Switched to `happy-dom` for testing
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
3 changes: 1 addition & 2 deletions examples/react-quickstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"postcss": "^8.4.30",
"postcss-preset-env": "^9.1.4",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-plugin-wasm": "^3.2.2"
"vite": "^4.4.9"
}
}
6 changes: 4 additions & 2 deletions examples/react-quickstart/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import wasm from "vite-plugin-wasm";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), wasm()],
plugins: [react()],
optimizeDeps: {
exclude: ["@xmtp/user-preferences-bindings-wasm"],
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@changesets/cli": "^2.26.2"
},
"resolutions": {
"@xmtp/xmtp-js": "^11.3.0-beta.11",
"@xmtp/xmtp-js": "^11.3.0-beta.18",
"vite": "^4.4.9"
}
}
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"eslint": "^8.50.0",
"eslint-config-xmtp-web": "workspace:*",
"eslint-plugin-storybook": "^0.6.14",
"jsdom": "^22.1.0",
"happy-dom": "^12.10.3",
"postcss": "^8.4.30",
"postcss-modules": "^6.0.0",
"postcss-preset-env": "^9.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
environment: "jsdom",
environment: "happy-dom",
},
});
6 changes: 3 additions & 3 deletions packages/react-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@xmtp/content-type-read-receipt": "^1.1.5",
"@xmtp/content-type-remote-attachment": "^1.1.4",
"@xmtp/content-type-reply": "^1.1.5",
"@xmtp/xmtp-js": "^11.3.0-beta.11",
"@xmtp/xmtp-js": "^11.3.0-beta.18",
"async-mutex": "^0.4.0",
"date-fns": "^2.30.0",
"dexie": "^3.2.4",
Expand All @@ -98,7 +98,7 @@
"eslint": "^8.50.0",
"eslint-config-xmtp-web": "workspace:*",
"fake-indexeddb": "^4.0.2",
"jsdom": "^22.1.0",
"happy-dom": "^12.10.3",
"prettier": "^3.0.3",
"react-dom": "^18.2.0",
"tsup": "^7.2.0",
Expand All @@ -109,7 +109,7 @@
"vitest": "^0.34.2"
},
"peerDependencies": {
"@xmtp/xmtp-js": "^11.3.0-beta.11",
"@xmtp/xmtp-js": "^11.3.0-beta.18",
"react": ">=16.14"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
globals: true,
environment: "jsdom",
environment: "happy-dom",
setupFiles: "./vitest.setup.ts",
},
});
5 changes: 0 additions & 5 deletions packages/react-sdk/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import "fake-indexeddb/auto";
import "@testing-library/jest-dom/vitest";
import { Buffer } from "buffer";
import { webcrypto } from "crypto";

globalThis.Buffer = Buffer;
globalThis.crypto = webcrypto as unknown as Crypto;
Loading

0 comments on commit 74a5c07

Please sign in to comment.