faker
faker copied to clipboard
refactor(helpers)!: remove v8 deprecated unique
extracted from #2608
- #2608
referencing #1785
- #1785
should be merged before starting #2335
- #2335
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.55%. Comparing base (
fd05126
) to head (ef40320
).
Additional details and impacted files
@@ Coverage Diff @@
## next #2661 +/- ##
==========================================
- Coverage 99.55% 99.55% -0.01%
==========================================
Files 2817 2816 -1
Lines 251188 250918 -270
Branches 1117 707 -410
==========================================
- Hits 250074 249805 -269
+ Misses 1114 1084 -30
- Partials 0 29 +29
Files | Coverage Ξ | |
---|---|---|
src/modules/helpers/index.ts | 98.82% <ΓΈ> (-0.10%) |
:arrow_down: |
As mentioned earlier. I don't think we should remove unique from faker as it is a very useful feature when generating test data. I would like to check with the rest of the team and to a certain extend the community, whether we should remove it or replace it.
EDIT: Reason: #2667 in combination with #2664 will likely invalidate the circumstances that the initial decision was made upon.
Please vote this comment with
- π for removal of unique and
- π for retaining unique, although with a different implementation and interface.
What about the possibility of taking an external replacement like https://www.npmjs.com/package/enforce-unique and moving it within the faker-js org, but as a separate package/repo?
As mentioned earlier. I don't think we should remove unique from faker as it is a very useful feature when generating test data.
I would like to check with the rest of the team and to a certain extend the community, whether we should remove it or replace it.
Please vote this comment with
π for removal of unique and
π for retaining unique, although with a different implementation and interface.
I need to say that I 100% dislike to bring up a long discussion we already had and even written down in our internal notes. As Matthew already wrote: there is another package that does the same if not better. And for all the reasons: please lock back in history notes. Period.
Let's just make sure we have very good documentation explaining how to migrate from using the existing method to a third-party package.
i went ahead and added some documentation and suggested alternatives direct on this branch. Feedback welcome.
Thank you @matthewmayer I rebased it, fixed a conflict and fixed some minor typos
LGTM π
Please dont rebase unless necessary as it makes reviews harder.
This will also need a migration guide snippet. Hopefully it can be quite short now and just link to the unique guide page.
This will also need a migration guide snippet. Hopefully it can be quite short now and just link to the unique guide page.
added
I published a new version of enforce-unique
. Now it supports exclude.
Approved as per old team decision so it's no longer hard blocked, but I still think it's wrong.
I owe you a favor π