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(clerk-react): ESM support #2216

Merged
merged 1 commit into from
Nov 29, 2023
Merged

fix(clerk-react): ESM support #2216

merged 1 commit into from
Nov 29, 2023

Conversation

dimkl
Copy link
Contributor

@dimkl dimkl commented Nov 27, 2023

Description

Fixes ESM bundling issue of @clerk/clerk-react package.

This code has been tested with the reproduction repository from this thread and it seems that the issue is fixed: https://discord.com/channels/856971667393609759/1128001762415087727/1128001762415087727

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

@dimkl dimkl self-assigned this Nov 27, 2023
Copy link

changeset-bot bot commented Nov 27, 2023

🦋 Changeset detected

Latest commit: d8ffa93

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

This PR includes changesets to release 6 packages
Name Type
@clerk/clerk-react Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix 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

@dimkl dimkl force-pushed the sdk-480-react-mjs-imports branch from 2edc7a4 to 1e91d3d Compare November 27, 2023 17:33
@dimkl
Copy link
Contributor Author

dimkl commented Nov 28, 2023

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @dimkl - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 1.0.1-snapshot.v1e91d3d
@clerk/chrome-extension 1.0.1-snapshot.v1e91d3d
@clerk/clerk-js 5.0.1-snapshot.v1e91d3d
@clerk/clerk-expo 1.0.1-snapshot.v1e91d3d
@clerk/fastify 1.0.1-snapshot.v1e91d3d
gatsby-plugin-clerk 5.0.1-snapshot.v1e91d3d
@clerk/localizations 2.0.1-snapshot.v1e91d3d
@clerk/nextjs 5.0.1-snapshot.v1e91d3d
@clerk/clerk-react 5.0.1-snapshot.v1e91d3d
@clerk/remix 4.0.1-snapshot.v1e91d3d
@clerk/clerk-sdk-node 5.0.1-snapshot.v1e91d3d
@clerk/shared 2.0.1-snapshot.v1e91d3d
@clerk/themes 2.0.1-snapshot.v1e91d3d
@clerk/types 4.0.1-snapshot.v1e91d3d

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

gatsby-plugin-clerk

npm i [email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

packages/react/package.json Outdated Show resolved Hide resolved
@dimkl dimkl force-pushed the sdk-480-react-mjs-imports branch from 1e91d3d to 6a434ba Compare November 28, 2023 08:00
@LekoArts LekoArts dismissed their stale review November 28, 2023 08:16

Changes applied

@dimkl
Copy link
Contributor Author

dimkl commented Nov 28, 2023

We have an issue with the expo and the bundle. We should not merge this until we resolve it!

@LekoArts LekoArts marked this pull request as draft November 28, 2023 09:21
@dimkl dimkl force-pushed the sdk-480-react-mjs-imports branch from 6a434ba to 0afc479 Compare November 29, 2023 14:37
@dimkl dimkl marked this pull request as ready for review November 29, 2023 14:37
@dimkl
Copy link
Contributor Author

dimkl commented Nov 29, 2023

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @dimkl - the snapshot version command generated the following package versions:

Package Version
@clerk/backend 1.0.1-snapshot.v0afc479
@clerk/chrome-extension 1.0.1-snapshot.v0afc479
@clerk/clerk-js 5.0.1-snapshot.v0afc479
@clerk/clerk-expo 1.0.1-snapshot.v0afc479
@clerk/fastify 1.0.1-snapshot.v0afc479
gatsby-plugin-clerk 5.0.1-snapshot.v0afc479
@clerk/localizations 2.0.1-snapshot.v0afc479
@clerk/nextjs 5.0.1-snapshot.v0afc479
@clerk/clerk-react 5.0.1-snapshot.v0afc479
@clerk/remix 4.0.1-snapshot.v0afc479
@clerk/clerk-sdk-node 5.0.1-snapshot.v0afc479
@clerk/shared 2.0.1-snapshot.v0afc479
@clerk/themes 2.0.1-snapshot.v0afc479
@clerk/types 4.0.1-snapshot.v0afc479

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

gatsby-plugin-clerk

npm i [email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@dimkl dimkl force-pushed the sdk-480-react-mjs-imports branch from 0afc479 to d8ffa93 Compare November 29, 2023 17:40
@dimkl dimkl enabled auto-merge November 29, 2023 17:40
@dimkl
Copy link
Contributor Author

dimkl commented Nov 29, 2023

Issue with expo has been resolved by removing "module" entry on package.json. This setup is the same with the one used in @clerk/shared package.

@dimkl dimkl added this pull request to the merge queue Nov 29, 2023
Merged via the queue into main with commit c9e0f68 Nov 29, 2023
7 checks passed
@dimkl dimkl deleted the sdk-480-react-mjs-imports branch November 29, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants