Uh oh!
There was an error while loading. Please reload this page.
fix(clerk-js): Re-initialize Client singleton instance on Client destroy - #1913
Conversation
🦋 Changeset detectedLatest commit: f78a0be The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
6e01dd3 to
9aa3dedCompare9aa3ded to
fa5e12eCompareUh oh!
There was an error while loading. Please reload this page.
dimkl
left a comment
There was a problem hiding this comment.
🔧 Could you add a unit test to assert this?
6a662f4 to
9e2970eCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2ed1ff5 to
cf5fad2Comparecf5fad2 to
5375d0eComparenikosdouvlis
commented
Oct 31, 2023
@octoper Can you please rebase on top of main so the new CICD changes are reflected on this PR? |
octoper
commented
Oct 31, 2023
@nikosdouvlis Do you mean the |
LekoArts
left a comment
There was a problem hiding this comment.
Let's add a E2E test for this 👍
f3af7aa to
cbe1981CompareUh oh!
There was an error while loading. Please reload this page.
| // @ts-expect-error This is a private method that we are mocking | ||
| BaseResource._fetch = jest.fn().mockReturnValue( | ||
| Promise.resolve({ | ||
| response: clientObjectJSON, |
There was a problem hiding this comment.
❓ is this what the DELETE /client returns? Isn't a DeletedObject type returned?
There was a problem hiding this comment.
No the DELETE /client returns a response with the following format
{
client: null,
response: { ... } // this is a ClientObject
}
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
7e10332 to
420ed28Compare921309c to
260f04dCompare260f04d to
f78a0beCompare…roy (#1913) * fix(clerk-js): Re-initialize Client singleton on Client destroy * fix(clerk-js): Assign default values instead of re-initializing Client class * chore(repo): Adds changeset * chore(repo): Adds changeset * chore(clerk-js): Fix typo in test * test(clerk-js): Added test for Client singleton destroy * test(clerk-js): Update tests for Client singleton * test(clerk-js): Update tests for Client singleton & created new fixtures (cherry picked from commit 93a6115)
…roy (#1913) * fix(clerk-js): Re-initialize Client singleton on Client destroy * fix(clerk-js): Assign default values instead of re-initializing Client class * chore(repo): Adds changeset * chore(repo): Adds changeset * chore(clerk-js): Fix typo in test * test(clerk-js): Added test for Client singleton destroy * test(clerk-js): Update tests for Client singleton * test(clerk-js): Update tests for Client singleton & created new fixtures (cherry picked from commit 93a6115)
…roy (#1913) (#2016) * fix(clerk-js): Re-initialize Client singleton on Client destroy * fix(clerk-js): Assign default values instead of re-initializing Client class * chore(repo): Adds changeset * chore(repo): Adds changeset * chore(clerk-js): Fix typo in test * test(clerk-js): Added test for Client singleton destroy * test(clerk-js): Update tests for Client singleton * test(clerk-js): Update tests for Client singleton & created new fixtures (cherry picked from commit 93a6115) Co-authored-by: Vaggelis Yfantis <vaggelisyfantis@gmail.com>
Description
This PR will assign the Client properties to the default values on destroy.
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore