Skip to content

Commit

Permalink
Merge #1844
Browse files Browse the repository at this point in the history
1844: feat: update Jest to version 27 r=herschel666 a=herschel666

The Canarist tests aren't helpful here, because the dependency tree of the Canarist test monorepo contains both Jest v26 & Jest v27 packages. This won't work.

closes #1760 #1761 #1831 #1832 #1838 #1839

<details>
<summary>Bors merge bot cheat sheet</summary>

We are using [bors-ng](https://github.com/bors-ng/bors-ng) to automate merging of our pull requests. The following table provides a summary of commands that are available to reviewers (members of this repository with push access) and delegates (in case of `bors delegate+` or `bors delegate=[list]`).

| Syntax | Description |
| --- | --- |
| bors merge | Run the test suite and push to master if it passes. Short for "reviewed: looks good." |
| bors merge- | Cancel an r+, r=, merge, or merge= |
| bors try | Run the test suite without pushing to master. |
| bors try- | Cancel a try |
| bors delegate+ | Allow the pull request author to merge their changes. |
| bors delegate=[list] | Allow the listed users to r+ this pull request's changes. |
| bors retry | Run the previous command a second time. |

This is a short collection of opinionated commands. For a full list of the commands read the [bors reference](https://bors.tech/documentation/).

</details>


Co-authored-by: Emanuel Kluge <emanuel.kluge@new-work.se>
  • Loading branch information
bors[bot] and Emanuel Kluge committed Jun 8, 2021
2 parents 0d58f0a + 30dbf6a commit 5a95149
Show file tree
Hide file tree
Showing 9 changed files with 600 additions and 481 deletions.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
],
"rootManifest": {
"resolutions": {
"graphql-tag": "^2.12"
"graphql-tag": "^2.12",
"babel-jest": "^26.0.0",
"jest": "^26.0.0",
"ts-jest": "^26.0.0"
}
}
},
Expand All @@ -83,7 +86,14 @@
"url": "enc:r6BTklZr+axySHpOBj0JyiGPh/P525a+dfwfWHQq5kkrY1Wruq8QaSL2vCfb0cWp",
"branch": "hops-15.x"
}
]
],
"rootManifest": {
"resolutions": {
"babel-jest": "^26.0.0",
"jest": "^26.0.0",
"ts-jest": "^26.0.0"
}
}
}
]
},
Expand Down Expand Up @@ -226,11 +236,11 @@
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"husky": "^4.3.8",
"jest": "^26.0.0",
"jest": "^27.0.0",
"jest-runner-eslint": "0.10.0",
"jest-runner-prettier": "0.3.6",
"jest-watch-select-projects": "2.0.0",
"jest-watch-typeahead": "0.6.2",
"jest-watch-typeahead": "0.6.4",
"lerna": "^4.0.0",
"lint-staged": "^11.0.0",
"prettier": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"url-join": "^4.0.1"
},
"peerDependencies": {
"jest": "^26.0.0"
"jest": "^26.0.0 || ^27.0.0"
},
"homepage": "https://github.com/xing/hops/tree/master/packages/jest-environment#readme"
}
1 change: 1 addition & 0 deletions packages/jest-preset/jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
: {
'ts-jest': {
babelConfig: require('./transforms/babel.js').babelConfig,
useESM: true,
},
},
moduleNameMapper: {
Expand Down
12 changes: 6 additions & 6 deletions packages/jest-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@
"regenerator-runtime": "^0.13.3"
},
"peerDependencies": {
"babel-jest": "^26.0.0",
"jest": "^26.0.0",
"babel-jest": "^26.0.0 || ^27.0.0",
"jest": "^26.0.0 || ^27.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"react-helmet-async": "^1.0.4",
"react-router-dom": "^5.1.0",
"ts-jest": "^26.0.0"
"ts-jest": "^26.0.0 || ^27.0.3"
},
"devDependencies": {
"babel-jest": "^26.0.0",
"jest": "^26.0.0",
"babel-jest": "^27.0.0",
"jest": "^27.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet-async": "^1.0.9",
"react-router-dom": "^5.2.0",
"ts-jest": "^26.0.0"
"ts-jest": "^27.0.3"
},
"homepage": "https://github.com/xing/hops/tree/master/packages/jest-preset#readme"
}
4 changes: 3 additions & 1 deletion packages/jest-preset/transforms/babel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const babelJest = require('babel-jest');
const babelJest = ((mod) => {
return mod.default || mod;
})(require('babel-jest'));

const babelConfig = {
presets: [
Expand Down
2 changes: 1 addition & 1 deletion packages/template-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-router-dom": "^5.1.2"
},
"devDependencies": {
"jest": "^26.0.0",
"jest": "^27.0.0",
"jest-preset-hops": "15.0.0-nightly.1",
"react-test-renderer": "^17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-router-dom": "^5.1.2"
},
"devDependencies": {
"jest": "^26.0.0",
"jest": "^27.0.0",
"jest-preset-hops": "15.0.0-nightly.1",
"react-test-renderer": "^17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/template-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"jest": "^26.0.0",
"jest": "^27.0.0",
"jest-preset-hops": "15.0.0-nightly.1",
"react-test-renderer": "^17.0.2"
},
Expand Down
Loading

0 comments on commit 5a95149

Please sign in to comment.