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

Upgrade execa to v4 and require Node.js 10 #42

Merged
merged 1 commit into from Mar 22, 2020

Conversation

artursvonda
Copy link
Contributor

Since Node v8 is being sunset at the end of the year, used this opportunity to jump on latest execa.

@sindresorhus
Copy link
Owner

I don’t personally like execa.command. I prefer the explicitly of an array of arguments. How is it easier to mock?

@artursvonda
Copy link
Contributor Author

It was easier to mock property of execa instead of execa itself based on the code that already was there. I actually didn't try mocking execa.default to see if that would work. I think if we want mock the whole import (instead of just property like we do now), it requires different approach.
I'm open to suggests if you have any. When I have a moment to spare, I could also look into proper mocking of imports if you think the current solution will not work.

@sindresorhus
Copy link
Owner

When I have a moment to spare, I could also look into proper mocking of imports if you think the current solution will not work.

Yes, I would prefer that. Could use sinon or proxyquire.

@artursvonda
Copy link
Contributor Author

Rebased and now it's a lot cleaner.

@sindresorhus sindresorhus changed the title Upgrade execa to v4 and minimal node version to v10 Upgrade execa to v4 and require Node.js 10 Mar 22, 2020
@sindresorhus sindresorhus merged commit 283e5ad into sindresorhus:master Mar 22, 2020
@sindresorhus
Copy link
Owner

Great. Thanks :)

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.

None yet

2 participants