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

perf!: replace execa with tinyexec #151

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

pralkarz
Copy link
Contributor

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
Copy link
Contributor Author

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

@pi0 pi0 changed the title cleanup: replace execa with tinyexec refactor!: replace execa with tinyexec Sep 25, 2024
@pi0
Copy link
Member

pi0 commented Sep 25, 2024

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.

@pralkarz
Copy link
Contributor Author

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.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Let's do it for nypm 0.4.x in meantime!

@pi0 pi0 changed the title refactor!: replace execa with tinyexec perf!: replace execa with tinyexec Nov 26, 2024
@pi0 pi0 merged commit 73193d6 into unjs:main Nov 26, 2024
5 of 6 checks passed
@pralkarz pralkarz deleted the execa-to-tinyexec branch November 27, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace execa with tinyexec
2 participants