Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/samfn/faker-core #3189 +/- ##
=========================================================
- Coverage 99.97% 99.96% -0.01%
=========================================================
Files 2800 2801 +1
Lines 227385 227531 +146
Branches 580 960 +380
=========================================================
+ Hits 227319 227461 +142
- Misses 66 70 +4
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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