Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #3189 +/- ##
==========================================
- Coverage 99.97% 99.96% -0.01%
==========================================
Files 2798 2801 +3
Lines 227375 227531 +156
Branches 956 960 +4
==========================================
+ Hits 227310 227461 +151
- Misses 65 70 +5
🚀 New features to boost your workflow:
|
|
Should I push this PR forward (as a pre-step of #3748) or should I drop it in favor of #3748 (or its parts)? TLDR: This PR intends to do:
#3748 does the same just with |
|
|
Agreed, if there are ways to chunk the more mechanical changes into seperate PRs like this that make the final PR smaller, and it doesn't break the build, then go for it. |
Second part of the standalone module function feature #2667
Fixes #3155
Requires #2838
Overview
Description
Instead of calling
this.faker.definitions.category.entry, we will now useresolveLocaleData(this.faker.fakerCore, 'category', 'entry').Please note that this will get simplified with the next PR as
this.faker.fakerCorewill get replaced with justfakerCore.This change makes the functions independent from the main faker instance, at least locale access wise.
That makes
resolveLocaleDatathe first effective "standalone module function", as it no longer needs faker, only the fakerCore is needed.As an additional benefit it also fixes #3155
Recreating the PR
this.faker\.definitions\.(\w+)\.(\w+)withresolveLocaleData(this.faker.fakerCore, '$1', '$2')insrc.faker\.definitions\.(\w+)\.(\w+)withresolveLocaleData(faker.fakerCore, '$1', '$2')insrc.faker\.definitions\.(\w+)\??\.(\w+)withresolveLocaleData(faker.fakerCore, '$1', '$2')intest.faker\.definitions\.(\w+)\[(\w+)\]withresolveLocaleData(faker.fakerCore, '$1', $2)intest.Next Steps (Future PR)
The next step after this PR is converting the other methods to standalone module functions.
Current
Future