v9.0.0
9.0.0 (2023-05-09) release notes
This release refactored the build process for xmtp-js
, reducing the web bundle size by 10x:
- Before: 962 KB
- After: 95 KB
Upgrade from v8.x.x to v9.0.0
Use these instructions to upgrade from xmtp-js
v8.x.x to v9.0.0.
Important: If your app is still using xmtp-js
v7.x.x, you can upgrade directly to v9.0.0. However, be sure to also perform any relevant v7.x.x to v8.0.0 upgrade tasks covered in the xmtp-js
v8.0.0 release notes, which include details about breaking changes.
Breaking changes
xmtp-js
v9.0.0 introduces the following breaking change for apps upgrading from v8.x.x:
- The
xmtp-js
npm package no longer includes the entire/src
directory. Therefore, any consumers of this package that rely on importing from the/dist
folder will break.
Upgrade tasks
Update any import
s from the /dist
folder to point to @xmtp/xmtp-js
instead.
For example, if you have this import
:
import type { InvitationContext } from “@xmtp/xmtp-js/dist/types/src/Invitation”;
Update it as follows:
import type { InvitationContext } from “@xmtp/xmtp-js”;
If you find that you aren’t able to import what you need, open a PR to the xmtp-js
repo to add the export to index.ts
. Alternatively, open an issue in the repo to request that the export be added.