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: return seed value from seed() #853

Merged
merged 10 commits into from
May 1, 2022
Merged

Conversation

Shinigami92
Copy link
Member

Via #851 we found out that it is not possible to access the initial seed ⚠️
This is a huge bug in my opinion as that way it's not possible to rerun a script with that seed

@Shinigami92 Shinigami92 added c: bug Something isn't working p: 2-high Fix main branch labels Apr 20, 2022
@Shinigami92 Shinigami92 added this to the v6.2 - New small features milestone Apr 20, 2022
@Shinigami92 Shinigami92 self-assigned this Apr 20, 2022
@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #853 (d4e3d80) into main (af5606a) will decrease coverage by 0.00%.
The diff coverage is 81.11%.

@@            Coverage Diff             @@
##             main     #853      +/-   ##
==========================================
- Coverage   99.41%   99.40%   -0.01%     
==========================================
  Files        1959     1959              
  Lines      210917   211004      +87     
  Branches      907      908       +1     
==========================================
+ Hits       209687   209756      +69     
- Misses       1172     1190      +18     
  Partials       58       58              
Impacted Files Coverage Δ
src/faker.ts 92.96% <81.11%> (-7.04%) ⬇️

@Shinigami92
Copy link
Member Author

It was already documented that setting the seed resets the sequence: https://github.com/faker-js/faker#setting-a-randomness-seed

@ST-DDT ST-DDT added the s: needs decision Needs team/maintainer decision label Apr 20, 2022
@ST-DDT
Copy link
Member

ST-DDT commented Apr 20, 2022

@Shinigami92 have agreed to not agree on whether the initialSeed should be accessible.
I don't think it shouldn't be because of the unknown n iterations on the seed value between setting it and using it.
I will abstain from further comments/actions on this PR. And will let the remaining team decide.

The other PR: #851

@Shinigami92 Shinigami92 marked this pull request as ready for review April 20, 2022 15:40
@Shinigami92 Shinigami92 requested a review from a team as a code owner April 20, 2022 15:40
@Shinigami92 Shinigami92 requested review from pkuczynski and a team April 20, 2022 15:40
src/faker.ts Outdated Show resolved Hide resolved
src/faker.ts Outdated Show resolved Hide resolved
src/faker.ts Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 added s: needs decision Needs team/maintainer decision s: accepted Accepted feature / Confirmed bug and removed s: needs decision Needs team/maintainer decision labels Apr 22, 2022
@Shinigami92 Shinigami92 requested a review from ST-DDT April 22, 2022 10:06
@Shinigami92 Shinigami92 removed the s: needs decision Needs team/maintainer decision label Apr 22, 2022
@Shinigami92 Shinigami92 requested a review from a team April 22, 2022 10:06
@Shinigami92 Shinigami92 changed the title fix: access initial seed feat: return seed value from seed() Apr 22, 2022
@Shinigami92 Shinigami92 removed c: bug Something isn't working p: 2-high Fix main branch labels Apr 22, 2022
src/faker.ts Outdated Show resolved Hide resolved
src/faker.ts Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 requested review from ST-DDT and a team April 22, 2022 18:52
ST-DDT
ST-DDT previously approved these changes Apr 22, 2022
@ST-DDT ST-DDT requested a review from a team April 22, 2022 19:44
@ST-DDT
Copy link
Member

ST-DDT commented Apr 30, 2022

This needs a rebase. Could you please update it?

@ST-DDT ST-DDT added the needs rebase There is a merge conflict label Apr 30, 2022
@Shinigami92 Shinigami92 requested a review from ST-DDT May 1, 2022 10:16
@Shinigami92 Shinigami92 removed the needs rebase There is a merge conflict label May 1, 2022
@ST-DDT ST-DDT requested a review from a team May 1, 2022 11:08
@import-brain import-brain requested review from a team and removed request for a team May 1, 2022 12:40
@Shinigami92 Shinigami92 enabled auto-merge (squash) May 1, 2022 13:18
@Shinigami92 Shinigami92 merged commit 1851eca into main May 1, 2022
@prisis prisis deleted the fix-access-initial-seed branch May 3, 2022 07:15
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.

None yet

4 participants