Skip to content

Migrate to monorepo to split Vue 2 and Vue 3 packages #355

Closed
@nogic1008

Description

@nogic1008

Related #343

Currently, the structure of this repository is as follows:

Branch Version Vue Jest
master 4.x 2.x <27
next 5.x(alpha) 3.x <27

In Jest 27, breaking changes have came. (#344, #348, #351)
To accommodate it, this package also requires breaking changes. (and need to increment semver)

But, vue-jest@4 cannot increment because of 5.x exists.
So we should split it to another package.

If you want to keep the package name different, I don't think it is necessary to divide the version by branch. (ex. CI/CD)

@lmiller1990
Could you tell us your thoughts on the items in the "Consideration" section?

Details

Package naming & Support version

Package Ver. Vue ver. Jest ver. Description
vue-jest 4.x 2.x <27 alias for vue2-jest@26
vue-jest 5.x(alpha) 3.x <27 deprecate (use vue3-jest@26 instead)
vue-jest 27.x latest (=2.x now) 27.x alias for vue2-jest@27 now
vue2-jest 26.x 2.x 26.x equals to vue-jest@4
vue3-jest 26.x 3.x 26.x equals to vue-jest@5
vue2-jest 27.x 2.x 27.x
vue3-jest 27.x 3.x 27.x

Versioning

Like ts-jest, We DOES NOT use Semantic Versioning.

vue2-jest@xx.yy.zz
vue3-jest@xx.yy.zz
  • xx: Equals supported Jest major version
  • yy: Compliant with semVer major & patch version (ie included BREAKING CHANGE)
  • zz: Compliant with semVer patch version

It is recommended for users to pin version as below:

"devDependencies": {
  "vue2-jest": "^27.1.1", // Not recommended. It means 27.1.1 <= x < 28.0.0
  "vue2-jest": "27.1.x", // 27.1.0 <= x < 27.2.0
  "vue2-jest": "~27.1", // 27.1.0 <= x < 27.2.0
  "vue2-jest": "~27.1.1" // 27.1.1 <= x < 27.2.0
}

Repository Structures

Tasks

  1. Add missing dependencies in /e2e projects
  2. Setup monorepo in master branch (build: migrate to monorepo (for vue-jest@4) #360)
    • move vue-jest@4 library to /packages/vue2-jest
    • rename package to vue2-jest
    • move end-to-end tests to /e2e/2.x
  3. Setup monorepo in next branch (build: migrate to monorepo (for vue-jest@5) #361)
    • move vue-jest@5 library to /packages/vue3-jest
    • rename package to vue3-jest
    • move end-to-end tests to /e2e/3.x
  4. Merge next branch into master (build: merge 'next' (Vue 3) branch into 'master' (Vue 2) for monorepo #363)
  5. (Optional) Split duplicated code in another package (like /packages/vue-jest-core)
  6. Create vue-jest package that wraps vue2-jest@latest
  7. Add or update README
    • vue-jest
    • vue2-jest
    • vue3-jest
    • root
  8. Release vue2-jest, vue3-jest, and vue-jest-core

Consideration (Resolved)

Package name

  • vue2-jest, vue-jest
  • vue2-jest, vue3-jest
  • vue2-jest, vue3-jest, vue-jest(alias of vue3-jest)
  • Other

Use semver or not

  • Yes, we will release new packages as version 1.x. Major version does not match Jest version.
  • No, like ts-jest, we will release new packages as version 27.x. Major version matches Jest version.

Deprecates vue-jest or not

  • **Yes.
  • No. use vue-jest as alias of latest Vue + Jest package (currently vue3-jest@latest)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions