-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
refactor(location): use postcode fake patterns #3233
base: deprecate/location/zipCode/format
Are you sure you want to change the base?
refactor(location): use postcode fake patterns #3233
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## deprecate/location/zipCode/format #3233 +/- ##
===================================================================
Coverage 99.96% 99.96%
===================================================================
Files 2805 2805
Lines 217110 217143 +33
Branches 587 969 +382
===================================================================
+ Hits 217028 217066 +38
+ Misses 82 77 -5
|
A lot of these seem very verbose compared to what they are replacing. In some cases would it make sense to just keep the fake pattern as '{{helpers.replaceSymbols(old pattern}}' Some could also be simplified by fromRegexp or arrayElement If we are renaming all the definitions should be change it to zipcode instead of postcode? It's weird that the definition name is different to method name. |
I can switch back to replaceSymbol syntax no problem. One reason for the change is, I don't like that method/it's format because it isn't obvious what the symbol represents. In the future, I'd like to deprecate the replaceSymbol methods in favor of regex based methods. |
I'm not sure about the renaming myself yet either. |
Second part of #2390
Blocked by #3223
Replaces the zipcode symbol patterns with fake patterns similar to when using the state parameter.
Locale Data Transformation Script
The locale data have been transformed using the following script:
pnpm tsx rename.ts
followed bypnpm run generate:locales && pnpm run format