Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ GEM
pg (1.4.5)
pg_query (2.2.0)
google-protobuf (>= 3.19.2)
phonelib (0.6.54)
phonelib (0.8.2)
pkcs11 (0.3.4)
premailer (1.21.0)
addressable
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/packages/phone-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "1.0.0",
"dependencies": {
"intl-tel-input": "^17.0.19",
"libphonenumber-js": "^1.10.11"
"libphonenumber-js": "^1.10.39"
}
}
4 changes: 2 additions & 2 deletions spec/forms/idv/phone_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
let(:optional_params) { { delivery_methods: [:sms] } }

it 'uses the user phone number as the initial phone value' do
expect(subject.phone).to eq('+1 787 234 5678')
expect(subject.phone).to eq('+1 787-234-5678')
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.

Interested by the formatting changes; this won't cause any downstream issues will it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This occurred to me too, and I didn't think it would. Phone fingerprints should be using a standard format (e164) and any comparisons format it prior to evaluating like here

end
it 'infers the country code from the user phone number' do
expect(subject.international_code).to eq('PR')
Expand Down Expand Up @@ -125,7 +125,7 @@
}
end
it 'uses the previously submitted phone + and infers country' do
expect(subject.phone).to eq('+1 787 234 5678')
expect(subject.phone).to eq('+1 787-234-5678')
expect(subject.international_code).to eq('PR')
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/services/phone_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
phone = '+13065550100'
formatted_phone = PhoneFormatter.format(phone)

expect(formatted_phone).to eq('+1 306 555 0100')
expect(formatted_phone).to eq('+1 306-555-0100')
end

it 'uses +1 as the default international code' do
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4457,10 +4457,10 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"

libphonenumber-js@^1.10.11:
version "1.10.11"
resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.11.tgz#0078756857bcc5c9dfe097123c6e04ea930e309b"
integrity sha512-ehoihx4HpRXO6FH/uJ0EnaEV4dVU+FDny+jv0S6k9JPyPsAIr0eXDAFvGRMBKE1daCtyHAaFSKCiuCxrOjVAzQ==
libphonenumber-js@^1.10.39:
version "1.10.39"
resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.39.tgz#12dd512621c9ebb13402a694ac81dc78511cd982"
integrity sha512-iPMM/NbSNIrdwbr94rAOos6krB7snhfzEptmk/DJUtTPs+P9gOhZ1YXVPcRgjpp3jJByclfm/Igvz45spfJK7g==

lightningcss-darwin-arm64@1.16.1:
version "1.16.1"
Expand Down