Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore node_modules #70

Closed
wants to merge 1 commit into from
Closed

fix: ignore node_modules #70

wants to merge 1 commit into from

Conversation

tom-fletcher
Copy link
Contributor

Description (What)

This PR fixes #68

Justification (Why)

Monorepos with yarn and pnpm workspaces allow package locations to be defined using a glob pattern such as packages/** to allow for a deep package tree.

Syncpack uses these patterns to search for any package.json files. However, some of these packages may have their own node_modules folder and currently Syncpack will discover package.json files within these:

.
├── ...
├── packages                   
│   └── tools
│       ├── firsttool 
│       │   ├── node_modules
│       │   │    └──  some_dependency
│       │   │         ├── ...
│       │   │         └──  package.json  <--- will be picked up by Syncpack
│       │   ├── ...
│       │   └── package.json
│       ├── second tool
│       │   └── ...
│       └── ...
└── ...

This results in version mismatches due to vendor dependencies deep within the tree.

This PR adds an ignore pattern to glob, which simply excludes any node_modules folders.

@JamieMason
Copy link
Owner

Released in 6.2.1, thanks a lot @tom-fletcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn workspaces: packages found in node_modules are not excluded when using list/fix-mismatches
2 participants