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

refactor(helpers)!: remove v8 deprecated unique #2661

Merged
merged 16 commits into from
Feb 24, 2024

Conversation

Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 added p: 1-normal Nothing urgent breaking change Cannot be merged when next version is not a major release m: helpers Something is referring to the helpers module deprecation A deprecation was made in the PR labels Feb 11, 2024
@Shinigami92 Shinigami92 added this to the v9.0 milestone Feb 11, 2024
@Shinigami92 Shinigami92 self-assigned this Feb 11, 2024
@Shinigami92 Shinigami92 requested a review from a team as a code owner February 11, 2024 22:46
@Shinigami92 Shinigami92 removed the deprecation A deprecation was made in the PR label Feb 11, 2024
Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬇️

... and 30 files with indirect coverage changes

@ST-DDT
Copy link
Member

ST-DDT commented Feb 11, 2024

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.

@matthewmayer
Copy link
Contributor

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?

@Shinigami92
Copy link
Member Author

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.

@matthewmayer
Copy link
Contributor

Let's just make sure we have very good documentation explaining how to migrate from using the existing method to a third-party package.

@matthewmayer
Copy link
Contributor

i went ahead and added some documentation and suggested alternatives direct on this branch. Feedback welcome.

Shinigami92 and others added 3 commits February 14, 2024 09:38
format docs

fix code

simplify code

move the CJS example

remove the unique section from usage.md and reference new page
@Shinigami92
Copy link
Member Author

Thank you @matthewmayer
I rebased it, fixed a conflict and fixed some minor typos

LGTM 👍

docs/guide/unique.md Show resolved Hide resolved
docs/guide/usage.md Outdated Show resolved Hide resolved
@ST-DDT
Copy link
Member

ST-DDT commented Feb 14, 2024

Please dont rebase unless necessary as it makes reviews harder.

@matthewmayer
Copy link
Contributor

This will also need a migration guide snippet. Hopefully it can be quite short now and just link to the unique guide page.

@Shinigami92
Copy link
Member Author

This will also need a migration guide snippet. Hopefully it can be quite short now and just link to the unique guide page.

added

@Shinigami92 Shinigami92 requested review from matthewmayer and a team February 14, 2024 19:36
docs/guide/unique.md Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 marked this pull request as ready for review February 21, 2024 20:14
@Shinigami92 Shinigami92 requested a review from a team February 21, 2024 20:16
matthewmayer
matthewmayer previously approved these changes Feb 22, 2024
@MansurAliKoroglu
Copy link

I published a new version of enforce-unique. Now it supports exclude.

docs/guide/unique.md Outdated Show resolved Hide resolved
docs/guide/unique.md Outdated Show resolved Hide resolved
docs/guide/unique.md Outdated Show resolved Hide resolved
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as per old team decision so it's no longer hard blocked, but I still think it's wrong.

@Shinigami92
Copy link
Member Author

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release m: helpers Something is referring to the helpers module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants