This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Add tests for lerna+yarn and restructure fixtures#395
Merged
ecraig12345 merged 3 commits intomainfrom Feb 27, 2026
Merged
Conversation
176d007 to
720318d
Compare
720318d to
82546f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This scenario was missing test coverage, which led to some bugs (the old lerna logic didn't fall back to the actual manager). I'd actually already fixed the bugs by the time they were found by a repo using an outdated version, but adding tests ensures they won't be reintroduced.
I also ended up restructuring the test fixtures:
monorepoand basicmonorepo-<manager>fixtures tomonorepo-basic-<manager>and make them use consistent dependencies and specify their manager version (also introduce areact-domdep which has a peer, which will be used in tests in a later PR)lage-yarn-*fixtures toextra-yarn-*to make the purpose somewhat clearermonorepo-lerna-*fixtures and instead update the logic insetupFixtureto add alerna.jsonto one of themonorepo-basic-*fixtures if requestedThe changes required disabling the tests for
queryLockFilefor now--introducing new manager versions got me looking at the logic ofparseLockFile, and it turns out to be incredibly broken in many scenarios. I'm not convinced thequeryLockFiletests were covering anything meaningful to begin with, so it's easier to just disable them for now and fix them as part of more comprehensive updates.