You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on JS-509 I quickly realized that putting that into one big PR would be a mess. So this is a slice of work that can be shipped separately and removes some noise from the original purpose of that ticket.
This PR does a couple of things:
Remove testUtils from @clerk/shared. There's no need to put this into such a package, it can live inside the repo outside of a npm package. The contents of the testUtils were re-exports from @testing-library/react and an unused wrapper. So I didn't have to move it somewhere else, I just had to update the imports
Fix the Jest config @clerk/shared. Through an incorrect testRegex one test was never run. Jest's defaults are fine for our use case, so we don't even need to set it
Remove the package.json we put into dist/cjs and dist/esm. They have no benefit since the root package.json already has sideEffects defined.
The reason will be displayed to describe this comment to others. Learn more.
It's an internal package without a README only used by our Jest tests that we also don't tell people to install or use. It'd consider it purely internal.
So while technically you're correct, I wouldn't care about that :)
Remove the package.json we put into dist/cjs and dist/esm. They have no benefit since the root package.json already has sideEffects defined.
For future reference, old Vite React apps weren't picking up the root package.json's sideEffects prop. It seems that this has been fixed since then so all changes in this PR as spot on.
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
clerk
locked as resolved and limited conversation to collaborators
Oct 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While working on JS-509 I quickly realized that putting that into one big PR would be a mess. So this is a slice of work that can be shipped separately and removes some noise from the original purpose of that ticket.
This PR does a couple of things:
testUtilsfrom@clerk/shared. There's no need to put this into such a package, it can live inside the repo outside of a npm package. The contents of thetestUtilswere re-exports from@testing-library/reactand an unused wrapper. So I didn't have to move it somewhere else, I just had to update the imports@clerk/shared. Through an incorrecttestRegexone test was never run. Jest's defaults are fine for our use case, so we don't even need to set itpackage.jsonwe put intodist/cjsanddist/esm. They have no benefit since the rootpackage.jsonalready hassideEffectsdefined.peerDependenciesMetato makereactpeerDep optionalLICENSEauthorChecklist
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