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

build: migrate to monorepo (for vue-jest@5) #361

Merged
merged 9 commits into from Jun 21, 2021

Conversation

nogic1008
Copy link
Collaborator

⚠️ DO NOT merge this PR with "Squash & Merge" method!! ⚠️
It breaks package.json histories.

This PR is a part of #355.
Similar to #360, but targeted at next(vue-jest@5) branch.

Changes

  • setup monorepo (use yarn workspace)
  • move e2e/__projects__/* projects to e2e/3.x/*
  • move package.json and lib/ to packages/vue3-jest/
  • change package to vue3-jest@26.0.0-alpha.10
  • fix e2e test for monorepo

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments.

I have a question that we did not think about. We will need to support multiple versions of Jest at the same time for a while - in this case, we need to maintain v26 and v27 support.

Should we have two packages? vue3-jest26 and vue3-jest27? What do you think is the best way to handle this?

"peerDependencies": {
"@babel/core": "7.x",
"babel-jest": ">= 24 < 27",
"jest": ">= 24 < 27 ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should only support Jest 26 now, right, since we specify "version":" "26.0.0"`.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to 26.x.

@nogic1008
Copy link
Collaborator Author

nogic1008 commented Jun 20, 2021

@lmiller1990
I think it's appropriate to separate the branches depending on supported Jest version.

  • master branch
    • vue2-jest@latest (27.x)
    • vue3-jest@latest (27.x)
  • 26.x branch
    • vue2-jest@26
    • vue3-jest@26

@lmiller1990
Copy link
Member

@nogic1008 I see. I wonder if there will be any complexity in having both Vue 2 and Vue 3 in the same monorepo? Are we able to do this (I guess we need to do nohoist?)

Is there anything else you'd like to do before merging this? Otherwise, I'll merge and do a release to make sure everything is 👌 . Then we can work on getting Jest 27 support merged.

@nogic1008
Copy link
Collaborator Author

I believe that the complexity of including different Vue version in node_modules is less than the complexity of having to separate the same issues on different branches. (ex. security update by dependabot)
I copied /packages and /e2e from next branch to master branch locally, but it seems that nohoist settings are not needed at this time.

We need to merge next branch into master branch to complete the monorepo.
README also needs to be added and updated. (in root and each packages)

@lmiller1990
Copy link
Member

lmiller1990 commented Jun 21, 2021

Ok, let's try your idea.

I think we can update the README later, next goal should be Jest 27.

So we won't need next anymore - we will just have master for both Vue 2 and Vue 3.

@lmiller1990 lmiller1990 merged commit f10563a into vuejs:next Jun 21, 2021
@nogic1008 nogic1008 deleted the build/monorepo-vue3 branch June 21, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants