Skip to content

Integrated with Yarn workspaces#3906

Merged
bestander merged 6 commits intojestjs:masterfrom
bestander:workspaces
Jul 7, 2017
Merged

Integrated with Yarn workspaces#3906
bestander merged 6 commits intojestjs:masterfrom
bestander:workspaces

Conversation

@bestander
Copy link
Copy Markdown
Contributor

@bestander bestander commented Jun 25, 2017

Summary

Yarn 0.27 has workspaces feature that should be a better alternative to Lerna boostrapping.
Yarn workspaces still don't replace Lerna (and probably won't do it completely for a long time), so Lerna publishing is still used for Jest.

This PR replaces Lerna bootstrap phase with Yarn workspaces.

Things to discuss:

  1. Unlike Lerna Yarn hoists workspaces to the root node_modules.

It means that integration/examples test don't run in isolation from the workspace root so I removed symlinking to babel-jest et al. at the tests boostrapping.
One test integration_tests/__tests__/transform.test.js required to be running in isolation, so I changed the test bootstrap to execute on a copy on a temp folder.

  1. As of Yarn 0.27.2 workspaces are still fresh, I am working on making it snappy.
    Known issues:
  • changes in workspaces (non root) package.json are not automatically invalidating integrity check
  • logs may have confusing lines when working with workspaces
  • yarn add/upgrade/remove is not fully tested from within workspaces
  1. PR to support Yarn workspaces as first class citizen in Lerna Support Yarn workspaces to replace bootstrap command lerna/lerna#899

Test plan

  • yarn test-ci
  • lint/flow/build tasks work per workspaces correctly
  • ran yarn run publish and lerna seems to handle version bumping and npm publishing correctly

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants