Skip to content

fix(clerk-react): ESM support#2216

Merged
dimkl merged 1 commit into
mainfrom
sdk-480-react-mjs-imports
Nov 29, 2023
Merged

fix(clerk-react): ESM support#2216
dimkl merged 1 commit into
mainfrom
sdk-480-react-mjs-imports

Conversation

@dimkl

@dimkl dimkl commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

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
@changeset-bot

changeset-bot Bot commented Nov 27, 2023

Copy link
Copy Markdown

🦋 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

dimkl commented Nov 28, 2023

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/backend@1.0.1-snapshot.v1e91d3d --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.1-snapshot.v1e91d3d --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.0.1-snapshot.v1e91d3d --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.0.1-snapshot.v1e91d3d --save-exact

@clerk/fastify

npm i @clerk/fastify@1.0.1-snapshot.v1e91d3d --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.1-snapshot.v1e91d3d --save-exact

@clerk/localizations

npm i @clerk/localizations@2.0.1-snapshot.v1e91d3d --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.0.1-snapshot.v1e91d3d --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.0.1-snapshot.v1e91d3d --save-exact

@clerk/remix

npm i @clerk/remix@4.0.1-snapshot.v1e91d3d --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.1-snapshot.v1e91d3d --save-exact

@clerk/shared

npm i @clerk/shared@2.0.1-snapshot.v1e91d3d --save-exact

@clerk/themes

npm i @clerk/themes@2.0.1-snapshot.v1e91d3d --save-exact

@clerk/types

npm i @clerk/types@4.0.1-snapshot.v1e91d3d --save-exact

Comment thread packages/react/package.json Outdated
@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

dimkl commented Nov 28, 2023

Copy link
Copy Markdown
Contributor Author

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

dimkl commented Nov 29, 2023

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/backend@1.0.1-snapshot.v0afc479 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.1-snapshot.v0afc479 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.0.1-snapshot.v0afc479 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.0.1-snapshot.v0afc479 --save-exact

@clerk/fastify

npm i @clerk/fastify@1.0.1-snapshot.v0afc479 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.1-snapshot.v0afc479 --save-exact

@clerk/localizations

npm i @clerk/localizations@2.0.1-snapshot.v0afc479 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.0.1-snapshot.v0afc479 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.0.1-snapshot.v0afc479 --save-exact

@clerk/remix

npm i @clerk/remix@4.0.1-snapshot.v0afc479 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.1-snapshot.v0afc479 --save-exact

@clerk/shared

npm i @clerk/shared@2.0.1-snapshot.v0afc479 --save-exact

@clerk/themes

npm i @clerk/themes@2.0.1-snapshot.v0afc479 --save-exact

@clerk/types

npm i @clerk/types@4.0.1-snapshot.v0afc479 --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

dimkl commented Nov 29, 2023

Copy link
Copy Markdown
Contributor Author

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
@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