fix: correctly fetch changesets (nested changeset directory from git root)#1636
fix: correctly fetch changesets (nested changeset directory from git root)#1636Andarist merged 4 commits intochangesets:mainfrom Netail:fix/nested-changeset-dir
Conversation
🦋 Changeset detectedLatest commit: 26eff58 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1636 +/- ##
=======================================
Coverage 80.66% 80.66%
=======================================
Files 54 54
Lines 2255 2255
Branches 680 676 -4
=======================================
Hits 1819 1819
Misses 431 431
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Could we add a test case for this? While at it, it would be great to add a test case for #1620 too |
|
Thanks so much for this @Netail! I mentioned it in another thread, but I think I have wrestled against this issue multiple times when trying to integrate changesets with big monorepos, and its silent failures always eluded me - it will be good to know this particular bug is dead |
|
No problemo! Happy to help :) |
|
Thank you! ❤️ |
You're welcome! 😄 Let's hope this resolves it for you @Aubron :) |
Brought up by @Aubron in #1620 (comment) (but seperate from the issue fixed in that PR)
When the
.changesetdirectory is located lower than the git root it wrongly parses the changeset filenames from the changeset paths. It always tries to get the second item in the array, which is the case for repos where the.changesetdir is located in the git root, but not when nested. It's safer to pop off the last item, as it's a file name (Which is filtered bygetChangedChangesetFilesSinceRefalready)