Core: Improve project root detection logic#20791
Core: Improve project root detection logic#20791ndelangen merged 10 commits intostorybookjs:release-8-0from
Conversation
- Support `.hg` - Support `.yarn` - Support an env var STORYBOOK_PROJECT_ROOT as an override if other detection methods are not working
|
Hey, @dobesv! Thank you for this contribution (and congratulations on your first!). Could you add some tests for this, please? |
|
Any pointers on how and where to add the tests? I'm not too familiar with the project, and I don't think there are existing tests for this function unfortunately. It seems a bit tricky to test. |
|
@dobesv thank you for contributiong! I think this change is good, but I'd like it implemented in a slightly different way, I hope you can make that happen? 🙏 |
|
Thanks for the review @ndelangen . I made changes based on your feedback. If you have any thoughts about how I could make automated tests for this without a ton of work, let me know. |
|
We could add tests that mock |
.hg.yarnIssues: #20314 #14042 #20211
What I did
Update getProjectRoot logic to cover additional use cases.
How to test
See the related issues for the cases that lead to this.
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.