-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: migrate to smaller exec package #17
base: main
Are you sure you want to change the base?
Conversation
Migrates from `execa` to `tinyexec`, a much lighter alternative. Also changes two of the async functions to use async/await instead of then chaining.
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
I don't think that either
|
happy to change it to that if we can get agreement from @egoist seems to make sense to me if they all set that var |
export async function getNpmVersion(pm: PM) { | ||
const res = await x(pm || "npm", ["--version"]); | ||
|
||
return res.stdout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we settle on using tinyexec
instead of the solution proposed by Ben, we should consider calling .trim()
here, as I think execa
trims the trailing whitespace by default (found this out when some tests in other projects broke when I changed from execa
to tinyexec
and didn't call .trim()
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! It's probably worth us opening an issue in the tinyexec repo to at least document this too (if you don't get chance, I'll open it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened tinylibs/tinyexec#36. 🙂
Migrates from
execa
totinyexec
, a much lighter alternative.Also changes two of the async functions to use async/await instead of then chaining.