-
Notifications
You must be signed in to change notification settings - Fork 251
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(testing): Use .mjs for esm exports #3270
Conversation
🦋 Changeset detectedLatest commit: 2b27f0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Thank you for your contribution and detailed PR description. 🙏 |
!snapshot |
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.1.0-snapshot.v4c5edbc --save-exact
npm i @clerk/chrome-extension@1.0.2-snapshot.v4c5edbc --save-exact
npm i @clerk/clerk-js@5.1.1-snapshot.v4c5edbc --save-exact
npm i @clerk/clerk-expo@1.0.2-snapshot.v4c5edbc --save-exact
npm i @clerk/express@0.0.3-snapshot.v4c5edbc --save-exact
npm i @clerk/fastify@1.0.2-snapshot.v4c5edbc --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.0.3-snapshot.v4c5edbc --save-exact
npm i @clerk/remix@4.0.2-snapshot.v4c5edbc --save-exact
npm i @clerk/clerk-sdk-node@5.0.2-snapshot.v4c5edbc --save-exact
npm i @clerk/testing@1.0.1-snapshot.v4c5edbc --save-exact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 💯 Thank you! 🙏
Description
ESM imports from the testing package currently fail with e.g.
SyntaxError: The requested module '@clerk/testing/playwright' does not provide an export named 'clerkSetup'
A reproduction can be found here which is a clone of the official clerk example changed to
type: "module"
.This PR removes the
legacyOutput
flag from the tsup config and instead exports ESM modules with the.mjs
extension.Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change