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

Remove support for CommonJS #749

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Remove support for CommonJS #749

merged 2 commits into from
Dec 10, 2024

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Dec 10, 2024

Summary

This PR removes CommonJS exports from all packages (except the legacy JS SDK) and cleans up some package.json files.

@rygine rygine requested a review from a team as a code owner December 10, 2024 18:10
Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2024

Deploying xmtp-js-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 09ba022
Status: ✅  Deploy successful!
Preview URL: https://29396220.xmtp-js.pages.dev
Branch Preview URL: https://rygine-remove-cjs-support.xmtp-js.pages.dev

View logs

@rygine rygine requested a review from a team as a code owner December 10, 2024 19:07
Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: 09ba022

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@xmtp/content-type-transaction-reference Major
@xmtp/content-type-remote-attachment Major
@xmtp/content-type-group-updated Major
@xmtp/content-type-read-receipt Major
@xmtp/content-type-primitives Major
@xmtp/content-type-reaction Major
@xmtp/content-type-reply Major
@xmtp/consent-proof-signature Major
@xmtp/content-type-text Major
@xmtp/frames-validator Major
@xmtp/frames-client Patch
@xmtp/browser-sdk Patch
@xmtp/node-sdk Patch
@xmtp/xmtp-js Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rygine rygine merged commit 1777a23 into main Dec 10, 2024
20 checks passed
@rygine rygine deleted the rygine/remove-cjs-support branch December 10, 2024 19:49
@malaDev
Copy link

malaDev commented Dec 23, 2024

is there any specific reason for this removal?

@rygine
Copy link
Collaborator Author

rygine commented Jan 2, 2025

is there any specific reason for this removal?

this change is intended to simplify and streamline our build process for all of our SDKs. it also resolves an import issue with our node bindings, which are generated in ESM and not available in CJS.

since require() now supports loading (synchronous) ES modules in node 20 (experimental flag), 22 (latest), and 23, this shouldn't be a problem for developers moving forward.

if you're having a specific issue, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants