azz / get-monorepo-packages

Get a list of packages from a monorepo
MIT License
19 stars 7 forks source link

Exclude external deps when getting packages #6

Closed tobilen closed 3 years ago

tobilen commented 3 years ago

When using yarn workspaces, it is possible that due to version mismatches, a workspaces has its own node_modules folder next to its package.json with mismatching dependencies. While yarn accounts for those when evaluating the globs in the workspaces key, this package currently does not.

The proposed change simply excludes all matches that have `node_modules' in their path, which should fix the issue.

joshuajaco commented 3 years ago

This has a bug where any package with a name containing the string node_modules will also be ignored. I created an alternative PR: https://github.com/azz/get-monorepo-packages/pull/7

tobilen commented 3 years ago

yes, i thought about that possibility but decided that anybody including that string in his package name deserves his pipeline to break :laughing:

anyway, your PR is obviously better. closing this one