syncpack: feat: find mismatches in internal monorepo packages
Description
@this-monorepo/atomsand@this-monorepo/moleculesare developed in your monorepo.packages/atoms/package.jsoncontains{ "version": "1.2.3" }packages/molecules/package.jsoncontains{ "dependencies": { "@this-monorepo/atoms": "1.0.4" } }syncpackdoes not report any mismatches because nothing else in the monorepo depends on@this-monorepo/atoms.
Suggested Solution
Add --workspace to the existing list of locations to check for mismatches:
-p, --prod include dependencies
-d, --dev include devDependencies
-P, --peer include peerDependencies
-R, --resolutions include resolutions (yarn)
-o, --overrides include overrides (pnpm)
+ -w, --workspace include locally developed package versions
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 30 (27 by maintainers)
Commits related to this issue
- feat(cli): add --workspace option to include local package versions Closes #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- feat(cli): sync versions of locally developed packages Closes #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- test(core): add scenario to reproduce #66 — committed to JamieMason/syncpack by mxro 2 years ago
- test(core): add test for scenario to reproduce #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- test(core): add scenario to reproduce #66 — committed to JamieMason/syncpack by mxro 2 years ago
- test(core): add test for scenario to reproduce #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- fix(windows): normalise file paths Refs #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- fix(workspace): find missed mismatches against workspace versions Closes #66 — committed to JamieMason/syncpack by JamieMason 2 years ago
- Use workspace versions when checking dependency mismatches See: https://github.com/JamieMason/syncpack/issues/66 — committed to api3dao/airnode by Siegrift 2 years ago
- Update Update devDependencies (non-major) (#1288) * Update Update devDependencies (non-major) * Use workspace versions when checking dependency mismatches See: https://github.com/JamieMason/syn... — committed to api3dao/airnode by renovate[bot] 2 years ago
Yep you are right! Let me add that. Just for future releases, as a consumer, it would be better if minors didn’t have potentially breaking changes is all. Thanks so much! Looking forward to actually using this feature!
You’re welcome. A lot of nice ideas and improvements have come off the back of your feedback and repros, so thanks a lot for that.
Excellent, thanks for looking into this! Sorry I think I tried it initially with quotes but then forget to do that for the new version. Maybe the Yarn shell interferes here so it could be that nothing needs to change for syncpack.
Works perfectly now and helped me do a good clean up of the repository. Also could configure it to support multiple versions of the same package I needed using version groups.
And could use the list-mismatches in the CI workflow, since it will return
1exit code when there are mismatches which makes for a great test ❤️https://github.com/goldstack/goldstack/blob/master/.github/workflows/branch.yml#L65
Running this on Windows - maybe let me try running it in Linux env and see what the result is!
On mobile now but that seems right, I will take a look at that branch soon and try to reproduce and fix, thanks.
Released in 7.0.0