Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Conversation

afontcu
Copy link

@afontcu afontcu commented Oct 21, 2021

Partially closes #38

Right now, vue-jest offers two packages to work with Vue 2:

  • vue-jest@4, that supports Jest 26.
  • @vue/vue2-jest@27, that supports Jest 27.

Since these are different packages, I'm not sure there's a smart way to define the proper peerDep definition (it would be great if it could depend on the installed Jest version).

With npm 7, having the wrong peerDeps means the installation phase will fail.

Thus, I believe not defining any peerDeps is the simplest fix for this problem.


Another solution is to mark these packages and optional peerDeps, but I'm not sure this is any better:

"peerDependencies": { 
  "vue-jest": "^4"
},
"peerDependenciesMeta": {
  "vue-jest": {
    "optional": true
  }
}

@afontcu afontcu changed the title fix: Allow vue-jest 4.0.1 as peerDeps fix: Remove definition of vue-jest as peerDeps Oct 21, 2021
@afontcu afontcu changed the base branch from master to maintain-v1 October 21, 2021 11:38
@afontcu
Copy link
Author

afontcu commented Oct 21, 2021

(Also – I believe v1-maintain is the right branch to merge commits into because master is aimed to vue 3, right?)

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! :)

(Also – I believe v1-maintain is the right branch to merge commits into because master is aimed to vue 3, right?)

Exactry! v1-maintain branch is for Vue2, so your PR is correct.
master branch is for Vue3

@kazupon kazupon added the Type: Improvement Includes backwards-compatible fixes label Oct 21, 2021
@kazupon kazupon merged commit 7eb9f3f into intlify:maintain-v1 Oct 21, 2021
@afontcu
Copy link
Author

afontcu commented Oct 21, 2021

Thank you @kazupon! And thank you for your hard work

@afontcu afontcu deleted the patch-3 branch October 21, 2021 14:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Improvement Includes backwards-compatible fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept new versions of vue-jest for vue 2
2 participants