Skip to content

[SDK-805] Use the errorThrower shared util when throwing errors - #1999

Merged
anagstef merged 3 commits into
mainfrom
stefanos/sdk-805-refactor-the-react-errors-to-use-the-shared-errorthrower
Nov 9, 2023
Merged

[SDK-805] Use the errorThrower shared util when throwing errors#1999
anagstef merged 3 commits into
mainfrom
stefanos/sdk-805-refactor-the-react-errors-to-use-the-shared-errorthrower

Conversation

@anagstef

Copy link
Copy Markdown
Contributor

Description

This PR includes the following:

  • Adds a new function to the shared errorThrower utility with the simple name throw that accepts a string with the message to be thrown.
  • Fix the React package name passed to the errorThrower.
  • Use the errorThrower to throw all errors in the @clerk/clerk-react package.

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

@changeset-bot

changeset-botBot commented Nov 1, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a493ffc

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

This PR includes changesets to release 11 packages
NameType
@clerk/sharedPatch
@clerk/clerk-reactPatch
@clerk/backendPatch
@clerk/clerk-jsPatch
@clerk/clerk-expoPatch
@clerk/fastifyPatch
@clerk/nextjsPatch
@clerk/remixPatch
@clerk/clerk-sdk-nodePatch
@clerk/chrome-extensionPatch
gatsby-plugin-clerkPatch

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

@panteliselefpanteliselef left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹🧹

Comment threadpackages/react/src/utils/errorThrower.ts
Comment threadpackages/react/src/utils/useMaxAllowedInstancesGuard.tsx Outdated

@dimkldimkl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@anagstef
anagstef enabled auto-merge November 6, 2023 15:02
@anagstef
anagstef requested a review from a team as a code ownerNovember 6, 2023 15:12
@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

5 similar comments
@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@clerk-cookie

Copy link
Copy Markdown
Collaborator

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

PackageVersion
@clerk/backend1.0.1-snapshot.v11d57a5
@clerk/chrome-extension1.0.1-snapshot.v11d57a5
@clerk/clerk-js5.0.1-snapshot.v11d57a5
@clerk/clerk-expo1.0.1-snapshot.v11d57a5
@clerk/fastify1.0.1-snapshot.v11d57a5
gatsby-plugin-clerk5.0.1-snapshot.v11d57a5
@clerk/localizations1.26.9-snapshot.v11d57a5
@clerk/nextjs5.0.1-snapshot.v11d57a5
@clerk/clerk-react5.0.1-snapshot.v11d57a5
@clerk/remix4.0.1-snapshot.v11d57a5
@clerk/clerk-sdk-node5.0.1-snapshot.v11d57a5
@clerk/shared2.0.1-snapshot.v11d57a5
@clerk/themes2.0.1-snapshot.v11d57a5
@clerk/types4.0.1-snapshot.v11d57a5

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

npm i @clerk/backend@1.0.1-snapshot.v11d57a5 --save-exact

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/clerk-expo

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

@clerk/fastify

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

gatsby-plugin-clerk

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

@clerk/localizations

npm i @clerk/localizations@1.26.9-snapshot.v11d57a5 --save-exact

@clerk/nextjs

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

@clerk/clerk-react

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

@clerk/remix

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

@clerk/clerk-sdk-node

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

@clerk/shared

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

@clerk/themes

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

@clerk/types

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

@nikosdouvlis

Copy link
Copy Markdown
Member

!snapshot

@clerk-cookie

Copy link
Copy Markdown
Collaborator

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

PackageVersion
@clerk/backend1.0.1-snapshot.v11d57a5
@clerk/chrome-extension1.0.1-snapshot.v11d57a5
@clerk/clerk-js5.0.1-snapshot.v11d57a5
@clerk/clerk-expo1.0.1-snapshot.v11d57a5
@clerk/fastify1.0.1-snapshot.v11d57a5
gatsby-plugin-clerk5.0.1-snapshot.v11d57a5
@clerk/localizations1.26.9-snapshot.v11d57a5
@clerk/nextjs5.0.1-snapshot.v11d57a5
@clerk/clerk-react5.0.1-snapshot.v11d57a5
@clerk/remix4.0.1-snapshot.v11d57a5
@clerk/clerk-sdk-node5.0.1-snapshot.v11d57a5
@clerk/shared2.0.1-snapshot.v11d57a5
@clerk/themes2.0.1-snapshot.v11d57a5
@clerk/types4.0.1-snapshot.v11d57a5

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

npm i @clerk/backend@1.0.1-snapshot.v11d57a5 --save-exact

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/clerk-expo

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

@clerk/fastify

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

gatsby-plugin-clerk

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

@clerk/localizations

npm i @clerk/localizations@1.26.9-snapshot.v11d57a5 --save-exact

@clerk/nextjs

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

@clerk/clerk-react

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

@clerk/remix

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

@clerk/clerk-sdk-node

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

@clerk/shared

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

@clerk/themes

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

@clerk/types

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

@anagstef
anagstefforce-pushed the stefanos/sdk-805-refactor-the-react-errors-to-use-the-shared-errorthrower branch from d923448 to a493ffcCompareNovember 9, 2023 09:55
@anagstef
anagstef added this pull request to the merge queue Nov 9, 2023
Merged via the queue into main with commit e0e79b4Nov 9, 2023
@anagstef
anagstef deleted the stefanos/sdk-805-refactor-the-react-errors-to-use-the-shared-errorthrower branch November 9, 2023 10:08
Sign up for freeto 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.

5 participants

@anagstef@nikosdouvlis@clerk-cookie@dimkl@panteliselef