-
Notifications
You must be signed in to change notification settings - Fork 227
chore(settings): replace fxa-common-password-list npm package with vendor version #20297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,11 +289,12 @@ export const FormPasswordWithInlineCriteria = ({ | |
| ); | ||
| }, | ||
| uncommon: async (value: string) => { | ||
| // @ts-ignore | ||
| const list = await import('fxa-common-password-list'); | ||
| const { test: isCommon } = await import( | ||
| '@fxa/vendored/common-password-list' | ||
| ); | ||
|
Comment on lines
+292
to
+294
|
||
| const input = value.toLowerCase(); | ||
| return ( | ||
| !list.test(input) && !passwordValidator.isBanned(input) | ||
| !isCommon(input) && !passwordValidator.isBanned(input) | ||
| ); | ||
| }, | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as in FormPasswordWithInlineCriteria: this
import('@fxa/vendored/common-password-list')will fail under Jest/Node module resolution unless@fxa/vendored/*is mapped (workspaces arepackages/*, so the vendored lib won’t exist innode_modules). Please ensure Jest can resolve@fxa/vendored/common-password-list(and@fxa/vendored/incremental-encoder) viamoduleNameMapperor equivalent tsconfig-paths resolver setup.