refactor(location): use postcode fake patterns#3233
refactor(location): use postcode fake patterns#3233ST-DDT wants to merge 3 commits intodeprecate/location/zipCode/formatfrom
Conversation
Codecov Report✅ All 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
🚀 New features to boost your workflow:
|
|
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.tsfollowed bypnpm run generate:locales && pnpm run format