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

chore: remove unused function mergeArrays #2989

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Jul 1, 2024

The mergeArrays function was needed as a workaround to create the generic files for first and last names.
Those have become obsolete now and thus we don't need this internal utility function anymore.

Ref:

@ST-DDT ST-DDT added c: chore PR that doesn't affect the runtime behavior p: 1-normal Nothing urgent labels Jul 1, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Jul 1, 2024
@ST-DDT ST-DDT requested review from a team July 1, 2024 11:12
@ST-DDT ST-DDT self-assigned this Jul 1, 2024
Copy link

netlify bot commented Jul 1, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 59b894a
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/66828f0c38d4e800084379e9
😎 Deploy Preview https://deploy-preview-2989.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (0679d99) to head (59b894a).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2989   +/-   ##
=======================================
  Coverage   99.96%   99.97%           
=======================================
  Files        2748     2747    -1     
  Lines      239091   239079   -12     
  Branches      946      947    +1     
=======================================
+ Hits       239003   239009    +6     
+ Misses         88       70   -18     

see 3 files with indirect coverage changes

Copy link
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

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

Not sure wether we might need it again in the future. I'll still approve, since we have the git history.

@xDivisionByZerox
Copy link
Member

xDivisionByZerox commented Jul 1, 2024

For future refactor: Is there a TS config option to notify about dead code when resolving the main entry point? Should we look into that?

@Shinigami92
Copy link
Member

For future refactor: Is there a TS config option to notify about dead code when resolving the main entry point? Should we look into that?

I don't think there is.
It would need to traverse every .ts (tsx, dts, mts and their js and even Vue equivalents, and those I forgot)

e.g. a project could contain 1000 src files and there is a .vue file that imports a .ts file. You would need the whole dependency graph.

And even then, your project could have multiple entry points.
Feels like an impossible task 😅

Maybe tsup, esbuild or eslint could tackle such tasks. But bundlers won't affect the src code. And the scope for eslint is also questionable.

@ST-DDT
Copy link
Member Author

ST-DDT commented Jul 1, 2024

Code coverage ftw.

@ST-DDT ST-DDT merged commit e7c9cb9 into next Jul 1, 2024
27 checks passed
@ST-DDT ST-DDT deleted the chore/remove-unused/mergeArrays branch July 1, 2024 13:03
@Shinigami92
Copy link
Member

Shinigami92 commented Jul 1, 2024

Code coverage ftw.

#yes

however, when you have covered code with tests, it does not tell you if it is already used by the source 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants