-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
feat: de-proxy locale access #3189
Open
ST-DDT
wants to merge
7
commits into
feat/samfn/faker-core
Choose a base branch
from
feat/samfn/locale-access
base: feat/samfn/faker-core
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
ST-DDT
added
c: feature
Request for new feature
p: 1-normal
Nothing urgent
do NOT merge yet
Do not merge this PR into the target branch yet
labels
Oct 16, 2024
Codecov ReportAttention: 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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: feature
Request for new feature
do NOT merge yet
Do not merge this PR into the target branch yet
p: 1-normal
Nothing urgent
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.fakerCore
will get replaced with justfakerCore
.This change makes the functions independent from the main faker instance, at least locale access wise.
That makes
resolveLocaleData
the 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