lerna-changelog
lerna-changelog copied to clipboard
fix: nested packages detection
Until now the library assumes that packages are located under packages/*
and tries to derive the package name from the file path (see packageFromPath
method).
This is fragile and it does not work anyway if packages are located in other directories or sub-directories.
This PR changes how package names are detected by implementing the getPackages
method in the @lerna/project
package.
I decided to copy over the important parts for a couple of reasons:
- the lerna packages are not typed
- avoid an unnecessary dependency to the lerna packages
Now the packages are properly detected, based on the glob configuration in the yarn workspaces or lerna.json
.