Skip to content
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: resettable unique store #800

Merged
merged 6 commits into from
Apr 22, 2022
Merged

Conversation

Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 commented Apr 7, 2022

#810 should be merged first

@Shinigami92 Shinigami92 added c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Apr 7, 2022
@Shinigami92 Shinigami92 added this to the v6.2 - New small features milestone Apr 7, 2022
@Shinigami92 Shinigami92 self-assigned this Apr 7, 2022
@Shinigami92 Shinigami92 linked an issue Apr 7, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 7, 2022

Codecov Report

Merging #800 (0f937e0) into main (606efc5) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head 0f937e0 differs from pull request most recent head ff78e69. Consider uploading reports for the commit ff78e69 to get more accurate results

@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
- Coverage   99.42%   99.34%   -0.08%     
==========================================
  Files        1958     1922      -36     
  Lines      210773   183072   -27701     
  Branches      904      902       -2     
==========================================
- Hits       209557   181875   -27682     
+ Misses       1159     1141      -18     
+ Partials       57       56       -1     
Impacted Files Coverage Δ
src/unique.ts 62.58% <100.00%> (+0.54%) ⬆️
src/utils/unique.ts 98.73% <100.00%> (+0.11%) ⬆️
src/locales/index.ts 100.00% <0.00%> (ø)
src/locales/hu/finance/transaction_type.ts
src/locales/hu/internet/domain_suffix.ts
src/locales/hu/name/male_first_name.ts
src/locales/hu/name/last_name.ts
src/locales/hu/internet/free_email.ts
src/locales/hu/date/index.ts
src/locales/hu/animal/dog.ts
... and 29 more

src/utils/unique.ts Outdated Show resolved Hide resolved
@Shinigami92
Copy link
Member Author

I'm not yet sure how to allow user to reset props inside GLOBAL_UNIQUE_STORE.

I'm also unsure why it is a key-value store, where the values are equals to their key 🤔
I assume I oversee something.

test/unique.spec.ts Outdated Show resolved Hide resolved
@ST-DDT
Copy link
Member

ST-DDT commented Apr 7, 2022

I'm not yet sure how to allow user to reset props inside GLOBAL_UNIQUE_STORE.

Don't think too much.
Either move it inside the unique class (effectively removing it global state) or leave it there until we can remove it in v7.

test/unique.spec.ts Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 requested a review from ST-DDT April 7, 2022 14:59
@Shinigami92 Shinigami92 added the s: on hold Blocked by something or frozen to avoid conflicts label Apr 8, 2022
@Shinigami92 Shinigami92 force-pushed the 371-provide-function-to-reset-unique branch from 1297a6c to 59edce3 Compare April 19, 2022 18:05
@Shinigami92 Shinigami92 removed the s: on hold Blocked by something or frozen to avoid conflicts label Apr 20, 2022
@Shinigami92 Shinigami92 marked this pull request as ready for review April 20, 2022 12:56
@Shinigami92 Shinigami92 requested a review from a team as a code owner April 20, 2022 12:56
@Shinigami92 Shinigami92 requested a review from a team April 20, 2022 12:56
@ST-DDT ST-DDT requested a review from a team April 21, 2022 20:34
@Shinigami92 Shinigami92 enabled auto-merge (squash) April 22, 2022 12:41
@Shinigami92 Shinigami92 merged commit 29bba7b into main Apr 22, 2022
@ST-DDT ST-DDT deleted the 371-provide-function-to-reset-unique branch April 22, 2022 13:14
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 p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a function to reset faker.unique()
3 participants