lerna-changelog icon indicating copy to clipboard operation
lerna-changelog copied to clipboard

fix: nested packages detection

Open emmenko opened this issue 4 years ago • 0 comments

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.

emmenko avatar Apr 14 '20 20:04 emmenko