nypm icon indicating copy to clipboard operation
nypm copied to clipboard

refactor!: replace execa with tinyexec

Open pralkarz opened this issue 1 year ago • 3 comments

Resolves #150.

This PR is a suggestion to replace heavier execa with a lighter tinyexec to reduce the dependency count and the bundle size.

pralkarz avatar Sep 18 '24 16:09 pralkarz

Actually, since there are only two usages, we could just use node:child_process directly. What do you think?

pralkarz avatar Sep 19 '24 10:09 pralkarz

Thanks for PR. I think so we might directly use node:child_process.

Nypm was doing this before. We moved to execa to support cross-platform search path of corepack mainly (https://github.com/unjs/nypm/pull/54). However with Node.js not going to ship corepack by default.. i think we might change strategy altogether.

Since this change might introduce regression, i am thinking more about options we have.

pi0 avatar Sep 25 '24 22:09 pi0

Thanks for PR. I think so we might directly use node:child_process.

Nypm was doing this before. We moved to execa to support cross-platform search path of corepack mainly (#54). However with Node.js not going to ship corepack by default.. i think we might change strategy altogether.

Since this change might introduce regression, i am thinking more about options we have.

No rush! No matter which solution you decide on, I'm happy to help driving this replacement forward.

pralkarz avatar Sep 25 '24 23:09 pralkarz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.40%. Comparing base (660392f) to head (f14a467). Report is 56 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #151       +/-   ##
===========================================
- Coverage   82.17%   63.40%   -18.77%     
===========================================
  Files           6        5        -1     
  Lines         516      470       -46     
  Branches       71       84       +13     
===========================================
- Hits          424      298      -126     
- Misses         91      169       +78     
- Partials        1        3        +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 26 '24 21:11 codecov[bot]