Skip to content
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
lerna-test
Feb 27, 2026
Merged

Add tests for lerna+yarn and restructure fixtures#395
ecraig12345 merged 3 commits intomainfrom
lerna-test

Conversation

@ecraig12345
Copy link
Copy Markdown
Member

@ecraig12345 ecraig12345 commented Feb 20, 2026

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:

  • Rename the monorepo and basic monorepo-<manager> fixtures to monorepo-basic-<manager> and make them use consistent dependencies and specify their manager version (also introduce a react-dom dep which has a peer, which will be used in tests in a later PR)
  • Rename the lage-yarn-* fixtures to extra-yarn-* to make the purpose somewhat clearer
  • Delete the dedicated monorepo-lerna-* fixtures and instead update the logic in setupFixture to add a lerna.json to one of the monorepo-basic-* fixtures if requested

The changes required disabling the tests for queryLockFile for now--introducing new manager versions got me looking at the logic of parseLockFile, and it turns out to be incredibly broken in many scenarios. I'm not convinced the queryLockFile tests 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.

@ecraig12345 ecraig12345 changed the title Add tests for lerna+yarn Add tests for lerna+yarn and restructure fixtures Feb 27, 2026
@ecraig12345 ecraig12345 merged commit 5098f7d into main Feb 27, 2026
6 checks passed
@ecraig12345 ecraig12345 deleted the lerna-test branch February 27, 2026 01:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant