8000 breaking: Support Jest 30 (#570) · vuejs/vue-jest@f0953b7 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit f0953b7

Browse files
committed
breaking: Support Jest 30 (#570)
* chore(deps): update jest package to v30 * test: update snapshot * ci(gh-action): remove versions of node no longer supported by jest; add modern versions chore(deps): update dependencies for compatibility
1 parent de5af78 commit f0953b7

File tree

23 files changed

+2649
-399
lines changed

23 files changed

+2649
-399
lines changed

.github/workflows/node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
test:
2121
strategy:
2222
matrix:
23-
node: [14, 16, 18]
23+
node: [18, 20, 22, 24]
2424
runs-on: ubuntu-latest
2525

2626
steps:

e2e/2.x/babel-in-package/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
"vue-template-compiler": "^2.7.7"
1313
},
1414
"devDependencies": {
15-
"@babel/core": "^7.9.0",
16-
"@babel/preset-env": "^7.9.0",
17-
"@vue/babel-preset-jsx": "^1.2.4",
15+
"@babel/core": "^7.22.0",
16+
"@babel/preset-env": "^7.22.0",
17+
"@vue/babel-preset-jsx": "^1.4.0",
1818
"@vue/test-utils": "^1.1.0",
19-
"@vue/vue2-jest": "^29.0.0",
19+
"@vue/vue2-jest": "^30.0.0",
2020
"coffeescript": "^2.3.2",
21-
"jest": "29.x",
22-
"jest-environment-jsdom": "29.x",
23-
"typescript": "^4.6.4"
21+
"jest": "30.x",
22+
"jest-environment-jsdom": "30.x",
23+
"typescript": "^5.4.5"
2424
},
2525
"jest": {
2626
"testEnvironment": "jsdom",

e2e/2.x/basic/__snapshots__/test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`generates source maps for .vue files 1`] = `
44
{
55
"file": "./components/Basic.vue",
6-
"mappings": ";;;;;;eAuBe;AACb,MAAI,EAAE,OADO;AAEb,UAAQ,EAAE;AACR,kBAAc,EAAE,SAAS,cAAT,GAA0B;AACxC,aAAO;AACL,WAAG,EAAE,KAAK,OADL;AAEL,YAAI,EAAE,CAAC,KAAK,OAFP;AAGL,cAAM,EAAE,KAAK;AAHR,OAAP;AAKD;AAPO,GAFG;AAWb,MAAI,EAAE,SAAS,IAAT,GAAgB;AACpB,WAAO;AACL,SAAG,EAAE,4BADA;AAEL,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBb,SAAO,EAAE;AACP,eAAW,EAAE,SAAS,WAAT,GAAuB;AAClC,WAAK,OAAL,GAAe,CAAC,KAAK,OAArB;AACD;AAHM;AAjBI",
6+
"mappings": ";;;;;;eAuBe;EACb,IAAI,EAAE,OAAO;EACb,QAAQ,EAAE;IACR,cAAc,EAAE,SAAS,cAAc,GAAG;MACxC,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,OAAO;QACjB,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO;QACnB,MAAM,EAAE,IAAI,CAAC;MACf,CAAC;IACH;EACF,CAAC;EACD,IAAI,EAAE,SAAS,IAAI,GAAG;IACpB,OAAO;MACL,GAAG,EAAE,4BAA4B;MACjC,OAAO,EAAE;IACX,CAAC;EACH,CAAC;EACD,OAAO,EAAE;IACP,WAAW,EAAE,SAAS,WAAW,GAAG;MAClC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO;IAC9B;EACF;AACF,CAAC;AAAA",
77
"names": [],
88
"sources": [
99
"components/Basic.vue",
@@ -65,7 +65,7 @@ export default {
6565
exports[`generates source maps using src attributes 1`] = `
6666
{
6767
"file": "./components/SourceMapsSrc.vue",
68-
"mappings": ";;;;;;eAAe;AACbA,MAAI,EAAE,OADO;AAEbC,UAAQ,EAAE;AACRC,kBAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,aAAO;AACLC,WAAG,EAAE,KAAKC,OADL;AAELC,YAAI,EAAE,CAAC,KAAKD,OAFP;AAGLE,cAAM,EAAE,KAAKF;AAHR,OAAP;AAKD;AAPO,GAFG;AAWbG,MAAI,EAAE,SAASA,IAAT,GAAgB;AACpB,WAAO;AACLC,SAAG,EAAE,4BADA;AAELJ,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBbK,SAAO,EAAE;AACPC,eAAW,EAAE,SAASA,WAAT,GAAuB;AAClC,WAAKN,OAAL,GAAe,CAAC,KAAKA,OAArB;AACD;AAHM;AAjBI,C",
68+
"mappings": ";;;;;;eAAe;EACbA,IAAI,EAAE,OAAO;EACbC,QAAQ,EAAE;IACRC,cAAc,EAAE,SAASA,cAAcA,CAAA,EAAG;MACxC,OAAO;QACLC,GAAG,EAAE,IAAI,CAACC,OAAO;QACjBC,IAAI,EAAE,CAAC,IAAI,CAACD,OAAO;QACnBE,MAAM,EAAE,IAAI,CAACF;MACf,CAAC;IACH;EACF,CAAC;EACDG,IAAI,EAAE,SAASA,IAAIA,CAAA,EAAG;IACpB,OAAO;MACLC,GAAG,EAAE,4BAA4B;MACjCJ,OAAO,EAAE;IACX,CAAC;EACH,CAAC;EACDK,OAAO,EAAE;IACPC,WAAW,EAAE,SAASA,WAAWA,CAAA,EAAG;MAClC,IAAI,CAACN,OAAO,GAAG,CAAC,IAAI,CAACA,OAAO;IAC9B;EACF;AACF,CAAC;AAAAO,OAAA,cAAAC,QAAA",
6969
"names": [
7070
"name",
7171
"computed",
@@ -78,6 +78,8 @@ exports[`generates source maps using src attributes 1`] = `
7878
"msg",
7979
"methods",
8080
"toggleClass",
81+
"exports",
82+
"_default",
8183
],
8284
"sources": [
8385
"SourceMapsSrc.vue",

e2e/2.x/basic/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"@babel/core": "^7.9.0",
1515
"@babel/preset-env": "^7.9.0",
1616
"@vue/test-utils": "^1.1.0",
17-
"@vue/vue2-jest": "^29.0.0",
17+
"@vue/vue2-jest": "^30.0.0",
1818
"babel-helper-vue-jsx-merge-props": "^2.0.3",
1919
"babel-plugin-syntax-jsx": "^6.18.0",
2020
"babel-plugin-transform-vue-jsx": "^3.7.0",
2121
"coffeescript": "^2.3.2",
2222
"jade": "^1.11.0",
2323
"jest": "29.x",
24-
"jest-environment-jsdom": "29.x",
24+
"jest-environment-jsdom": "30.x",
2525
"pug": "^3.0.1",
2626
"sass": "^1.23.7",
27-
"typescript": "^4.6.4"
27+
"typescript": "^5.4.5"
2828
},
2929
"jest": {
3030
"testEnvironment": "jsdom",

e2e/2.x/custom-block/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"vue-template-compiler": "^2.7.7"
1212
},
1313
"devDependencies": {
14-
"@babel/core": "^7.9.0",
15-
"@babel/preset-env": "^7.9.0",
16-
"@vue/vue2-jest": "^29.0.0",
17-
"jest": "29.x",
18-
"jest-environment-jsdom": "29.x"
14+
"@babel/core": "^7.22.0",
15+
"@babel/preset-env": "^7.22.0",
16+
"@vue/vue2-jest": "^30.0.0",
17+
"jest": "30.x",
18+
"jest-environment-jsdom": "30.x"
1919
},
2020
"jest": {
2121
"moduleFileExtensions": [

e2e/2.x/custom-transformers/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"@babel/core": "^7.9.0",
1515
"@babel/preset-env": "^7.9.0",
1616
"@vue/test-utils": "^1.1.0",
17-
"@vue/vue2-jest": "^29.0.0",
18-
"babel-jest": "29.x",
19-
"jest": "29.x",
20-
"jest-environment-jsdom": "29.x",
17+
"@vue/vue2-jest": "^30.0.0",
18+
"babel-jest": "30.x",
19+
"jest": "30.x",
20+
"jest-environment-jsdom": "30.x",
2121
"postcss": "^7.0.13",
2222
"postcss-color-function": "^4.0.1",
2323
"sass": "^1.23.7"

e2e/2.x/sass-importer/entry/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"devDependencies": {
1616
"@babel/core": "^7.9.0",
1717
"@babel/preset-env": "^7.9.0",
18-
"@vue/vue2-jest": "^29.0.0",
18+
"@vue/vue2-jest": "^30.0.0",
1919
"@vue/test-utils": "^1.1.0",
20-
"babel-jest": "29.x",
21-
"jest": "29.x",
22-
"jest-environment-jsdom": "29.x",
20+
"babel-jest": "30.x",
21+
"jest": "30.x",
22+
"jest-environment-jsdom": "30.x",
2323
"postcss": "^7.0.13",
2424
"postcss-color-function": "^4.0.1",
2525
"sass": "^1.23.7"

e2e/2.x/style/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"@babel/core": "^7.9.0",
1515
"@babel/preset-env": "^7.9.0",
1616
"@vue/test-utils": "^1.1.0",
17-
"@vue/vue2-jest": "^29.0.0",
18-
"jest": "29.x",
19-
"jest-environment-jsdom": "29.x",
17+
"@vue/vue2-jest": "^30.0.0",
18+
"jest": "30.x",
19+
"jest-environment-jsdom": "30.x",
2020
"less": "^3.9.0",
2121
"postcss": "^7.0.13",
2222
"sass": "^1.23.7",

e2e/3.x/babel-in-package/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
1515
"@vue/babel-plugin-jsx": "^1.1.5",
16-
"@vue/vue3-jest": "^29.0.0",
16+
"@vue/vue3-jest": "^30.0.0",
1717
"coffeescript": "^2.3.2",
18-
"jest": "29.x",
19-
"jest-environment-jsdom": "29.x",
20-
"ts-jest": "^29.0.0-next.0",
21-
"typescript": "^4.6.4"
18+
"jest": "30.x",
19+
"jest-environment-jsdom": "30.x",
20+
"ts-jest": "^29.4.0",
21+
"typescript": "^5.4.5"
2222
},
2323
"jest": {
2424
"testEnvironment": "jsdom",

e2e/3.x/basic/__snapshots__/test.js.snap

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,14 @@ Object.defineProperty(exports, "__esModule", {
3737
value: true
3838
});
3939
exports.render = render;
40-
4140
var _vue = require("vue");
42-
4341
var _hoisted_1 = {
4442
"class": "hello"
4543
};
46-
4744
function render(_ctx, _cache) {
4845
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("h1", {
4946
"class": (0, _vue.normalizeClass)(_ctx.headingClasses)
50-
}, (0, _vue.toDisplayString)(_ctx.msg), 3
51-
/* TEXT, CLASS */
52-
)]);
47+
}, (0, _vue.toDisplayString)(_ctx.msg), 3 /* TEXT, CLASS */)]);
5348
};exports.default = {...exports.default, render};;exports.default = {...exports.default, __cssModules: {"css":{"testA":"testA"},"$style":{"testB":"testB"}}}"
5449
`;
5550

@@ -90,18 +85,13 @@ Object.defineProperty(exports, "__esModule", {
9085
value: true
9186
});
9287
exports.render = render;
93-
9488
var _vue = require("vue");
95-
9689
var _hoisted_1 = {
9790
"class": "hello"
9891
};
99-
10092
function render(_ctx, _cache) {
10193
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("h1", {
10294
"class": (0, _vue.normalizeClass)(_ctx.headingClasses)
103-
}, (0, _vue.toDisplayString)(_ctx.msg), 3
104-
/* TEXT, CLASS */
105-
)]);
95+
}, (0, _vue.toDisplayString)(_ctx.msg), 3 /* TEXT, CLASS */)]);
10696
};exports.default = {...exports.default, render};"
10797
`;

e2e/3.x/basic/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
"devDependencies": {
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
15-
"@vue/vue3-jest": "^29.0.0",
15+
"@vue/vue3-jest": "^30.0.0",
1616
"babel-helper-vue-jsx-merge-props": "^2.0.3",
1717
"babel-plugin-syntax-jsx": "^6.18.0",
1818
"babel-plugin-transform-vue-jsx": "^3.7.0",
1919
"coffeescript": "^2.3.2",
2020
"jade": "^1.11.0",
21-
"jest": "29.x",
22-
"jest-environment-jsdom": "29.x",
21+
"jest": "30.x",
22+
"jest-environment-jsdom": "30.x",
2323
"pug": "^2.0.3",
24-
"ts-jest": "^29.0.0-next.0",
25-
"typescript": "^4.6.4",
24+
"ts-jest": "^29.4.0",
25+
"typescript": "^5.4.5",
2626
"vue-class-component": "^8.0.0-beta.4",
2727
"vue-property-decorator": "^10.0.0-rc.3"
2828
}

e2e/3.x/custom-block/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
1515
"@vue/compiler-sfc": "^3.0.3",
16-
"@vue/vue3-jest": "^29.0.0",
17-
"jest": "29.x",
18-
"jest-environment-jsdom": "29.x"
16+
"@vue/vue3-jest": "^30.0.0",
17+
"jest": "30.x",
18+
"jest-environment-jsdom": "30.x"
1919
},
2020
"jest": {
2121
"moduleFileExtensions": [

e2e/3.x/custom-transformers/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
1515
"@vue/test-utils": "^2.0.0-rc.10",
16-
"@vue/vue3-jest": "^29.0.0",
17-
"babel-jest": "29.x",
16+
"@vue/vue3-jest": "^30.0.0",
17+
"babel-jest": "30.x",
1818
"css-tree": "^2.0.1",
19-
"jest": "29.x",
20-
"jest-environment-jsdom": "29.x",
19+
"jest": "30.x",
20+
"jest-environment-jsdom": "30.x",
2121
"postcss": "^7.0.13",
2222
"postcss-color-function": "^4.0.1",
2323
"sass": "^1.23.7"

e2e/3.x/javascript/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"devDependencies": {
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
15-
"@vue/vue3-jest": "^29.0.0",
15+
"@vue/vue3-jest": "^30.0.0",
1616
"coffeescript": "^2.3.2",
17-
"jest": "29.x",
18-
"jest-environment-jsdom": "29.x"
17+
"jest": "30.x",
18+
"jest-environment-jsdom": "30.x"
1919
},
2020
"jest": {
2121
"testEnvironment": "jsdom",

e2e/3.x/sass-importer/entry/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"@babel/core": "^7.9.0",
1616
"@babel/preset-env": "^7.9.0",
1717
"@vue/test-utils": "^2.0.0-rc.10",
18-
"@vue/vue3-jest": "^29.0.0",
19-
"babel-jest": "29.x",
20-
"jest": "29.x",
21-
"jest-environment-jsdom": "29.x",
18+ 97AE
"@vue/vue3-jest": "^30.0.0",
19+
"babel-jest": "30.x",
20+
"jest": "30.x",
21+
"jest-environment-jsdom": "30.x",
2222
"postcss": "^7.0.13",
2323
"postcss-color-function": "^4.0.1",
2424
"sass": "^1.23.7"

e2e/3.x/style/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
1515
"@vue/test-utils": "^2.0.0-rc.10",
16-
"@vue/vue3-jest": "^29.0.0",
17-
"jest": "29.x",
18-
"jest-environment-jsdom": "29.x",
16+
"@vue/vue3-jest": "^30.0.0",
17+
"jest": "30.x",
18+
"jest-environment-jsdom": "30.x",
1919
"less": "^3.9.0",
2020
"postcss": "^7.0.13",
2121
"sass": "^1.23.7",

e2e/3.x/typescript-with-babel/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"devDependencies": {
1313
"@babel/core": "^7.9.0",
1414
"@babel/preset-env": "^7.9.0",
15-
"@vue/vue3-jest": "^29.0.0",
16-
"jest": "29.x",
17-
"jest-environment-jsdom": "29.x",
18-
"typescript": "^4.6.4"
15+
"@vue/vue3-jest": "^30.0.0",
16+
"jest": "30.x",
17+
"jest-environment-jsdom": "30.x",
18+
"typescript": "^5.4.5"
1919
},
2020
"jest": {
2121
"testEnvironment": "jsdom",

e2e/3.x/typescript-with-compiler-options/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
"test": "jest --no-cache ./src/test.ts"
88
},
99
"dependencies": {
10+
"tslib": "^2.8.1",
11+
"typescript": "^5.8.3",
1012
"vue": "^3.2.22"
1113
},
1214
"devDependencies": {
1315
"@types/jest": "16.0.10",
14-
"@vue/vue3-jest": "^29.0.0",
15-
"jest": "29.x",
16-
"jest-environment-jsdom": "29.x",
17-
"ts-jest": "^29.0.0-next.0",
18-
"typescript": "^4.6.4"
16+
"@vue/vue3-jest": "^30.0.0",
17+
"jest": "30.x",
18+
"jest-environment-jsdom": "30.x",
19+
"ts-jest": "^29.4.0",
20+
"typescript": "^5.4.5"
1921
},
2022
"jest": {
2123
"testEnvironment": "jsdom",

e2e/3.x/typescript/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
},
1212
"devDependencies": {
1313
"@types/jest": "16.0.10",
14-
"@vue/vue3-jest": "^29.0.0",
15-
"jest": "29.x",
16-
"jest-environment-jsdom": "29.x",
17-
"ts-jest": "^29.0.0-next.0",
18-
"typescript": "^4.6.4"
14+
"@vue/vue3-jest": "^30.0.0",
15+
"jest": "30.x",
16+
"jest-environment-jsdom": "30.x",
17+
"ts-jest": "^29.4.0",
18+
"typescript": "^5.4.5"
1919
},
2020
"jest": {
2121
"testEnvironment": "jsdom",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue-jest-monorepo",
33
"private": true,
44
"engines": {
5-
"node": ">=10",
5+
"node": ">=18",
66
"yarn": "^1.17.3"
77
},
88
"workspaces": {

packages/vue2-jest/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/vue2-jest",
3-
"version": "29.2.6",
3+
"version": "30.0.0",
44
"description": "Jest transformer for Vue 2",
55
"main": "lib/index.js",
66
"files": [
@@ -24,23 +24,23 @@
2424
"author": "Edd Yerburgh",
2525
"license": "MIT",
2626
"devDependencies": {
27-
"@babel/core": "^7.9.0",
28-
"@babel/preset-env": "^7.9.0",
27+
"@babel/core": "^7.22.0",
28+
"@babel/preset-env": "^7.22.0",
2929
"@vue/test-utils": "^1.1.0",
3030
"babel-core": "^7.0.0-bridge.0",
31-
"babel-jest": "29.x",
31+
"babel-jest": "30.x",
3232
"conventional-changelog": "^1.1.5",
33-
"jest": "29.x",
33+
"jest": "30.x",
3434
"semantic-release": "^15.13.2",
35-
"typescript": "^4.6.4",
35+
"typescript": "^5.4.5",
3636
"vue": "^2.7.7",
3737
"vue-template-compiler": "^2.7.7"
3838
},
3939
"peerDependencies": {
4040
"@babel/core": "7.x",
41-
"babel-jest": "29.x",
42-
"jest": "29.x",
43-
"typescript": ">= 4.3",
41+
"babel-jest": "30.x",
42+
"jest": "30.x",
43+
"typescript": ">= 5.4",
4444
"vue": "^2.x",
4545
"vue-template-compiler": "^2.x"
4646
},

0 commit comments

Comments
 (0)
0