fix(clerk-js): Bundle the `zxcvbn` library inside the headless variant
Description
Currently, the zxcvbn is lazy loaded on clerk-js due to its size. However, using import() is not working in non-browser environments, including Expo.
Considering the assumption that the clerk.headless.js variant is only used on native environments, this PR bundles the whole zxcvbn inside the headless clerk-js.
This PR will fix the usage of the validatePassword on Expo.
Checklist
- [ ]
npm testruns as expected. - [ ]
npm run buildruns 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:
🦋 Changeset detected
Latest commit: b3e55f890211388d34017f8f25499906829d80f4
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 3 packages
| Name | Type |
|---|---|
| @clerk/clerk-js | Patch |
| @clerk/chrome-extension | Patch |
| @clerk/clerk-expo | 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
@anagstef Let's add an e2e here that uses the headless entry and calls validatePassword() 👀
@anagstef I think we should also mention the increase in the bundle size as it is significant.
@anagstef Let's add an e2e here that uses the headless entry and calls validatePassword() 👀
@BRKalow we should find a way to mimic the non-browser environment. We should give a shot to https://wix.github.io/Detox/
@anagstef I think we should also mention the increase in the bundle size as it is significant.
@panteliselef you mean on the changeset?
@anagstef do we have any updates on this one?
This looks like a stale PR. Closing for now, lets reopen if we need to.