From 8aef2479a6a0f06d231a385d8cfae5c99176ac62 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 30 Jul 2020 11:05:10 +0800 Subject: [PATCH] refactor!: support wider range of jest versions by making babel-jest & ts-jest peer dependencies It is mainly because ts-jest has a hard-coded jest version requirement. And ts-jest is listed as optional, because not every project needs it. --- package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 41896762..2261cf58 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@vue/compiler-sfc": "3.0.0-alpha.10", "@vue/test-utils": "^1.0.0-beta.25", "babel-core": "^7.0.0-bridge.0", - "babel-jest": "^23.6.0", + "babel-jest": "^24.9.0", "coffeescript": "^2.3.2", "conventional-changelog": "^1.1.5", "eslint": "^5.12.0", @@ -62,9 +62,16 @@ }, "peerDependencies": { "@babel/core": "7.x", - "jest": "^24.x", + "babel-jest": ">= 24 < 27", + "jest": ">= 24 < 27 ", + "ts-jest": ">= 24 < 27 ", "vue": "^2.x" }, + "peerDependenciesMeta": { + "ts-jest": { + "optional": true + } + }, "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.2.0", "chalk": "^2.1.0",