square / find-yarn-workspace-root

Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com
Apache License 2.0
49 stars 8 forks source link

feat: make initial path optional #11

Closed sbekrin closed 6 years ago

sbekrin commented 6 years ago

Hey there 👋

What do you think about proposed changes? Using current working directory as a default initial path aligns with what yarn does.

eventualbuddha commented 6 years ago

Hi @sergeybekrin, thanks for the suggestion. I think this would be fairly reasonable, but we should include tests for it. Can you add a test or two to cover calling without an argument? Thanks!

sbekrin commented 6 years ago

@eventualbuddha yep sure, will do somewhere this week. Do you have plans on dropping Node 4 support by any chance?

eventualbuddha commented 6 years ago

Once the current dependencies for this library drop node 4, then we will too.

sbekrin commented 6 years ago

@eventualbuddha I've updated PR with a new test. I've created dummy module cwd-find-root.js to be able execute it against different cwd, not sure if there's better way.

eventualbuddha commented 6 years ago

This seems fine to me. @lennyburdette and @thetimothyp, what do you think?

sbekrin commented 6 years ago

@eventualbuddha @lennyburdette hey folks, any update on this one?

eventualbuddha commented 6 years ago

Sorry, tragedy of the commons. Merging!

eventualbuddha commented 6 years ago

Published in v1.2.0.