Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jest and related packages from 26.6.0 to 27.1.0 #11338

Merged
merged 9 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11,361 changes: 5,979 additions & 5,382 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"get-port": "^5.1.1",
"globby": "^11.0.1",
"husky": "^4.3.0",
"jest": "26.6.0",
"jest": "27.1.0",
"lerna": "3.22.1",
"lerna-changelog": "~0.8.2",
"lint-staged": "^10.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-named-asset-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"babel-plugin-tester": "^8.0.1",
"jest": "26.6.0"
"jest": "27.1.0"
},
"scripts": {
"test": "jest"
Expand Down
2 changes: 1 addition & 1 deletion packages/confusing-browser-globals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"index.js"
],
"devDependencies": {
"jest": "26.6.0"
"jest": "27.1.0"
}
}
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"jest": "26.6.0"
"jest": "27.1.0"
}
}
1,339 changes: 515 additions & 824 deletions packages/create-react-app/yarn.lock.cached

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"jest": "26.6.0"
"jest": "27.1.0"
},
"scripts": {
"test": "cross-env FORCE_COLOR=true jest"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-error-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@babel/code-frame": "7.12.13",
"@babel/core": "7.14.2",
"anser": "1.4.10",
"babel-jest": "^26.6.0",
"babel-jest": "^27.1.0",
"babel-loader": "8.2.2",
"babel-preset-react-app": "^10.0.0",
"chalk": "2.4.2",
Expand All @@ -48,7 +48,7 @@
"eslint-config-react-app": "^6.0.0",
"flow-bin": "^0.116.0",
"html-entities": "1.3.1",
"jest": "26.6.0",
"jest": "27.1.0",
"jest-fetch-mock": "2.1.2",
"object-assign": "4.1.1",
"promise": "8.1.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/react-error-overlay/src/__tests__/get-source-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @jest-environment jsdom
krreet marked this conversation as resolved.
Show resolved Hide resolved
*/

import { getSourceMap } from '../utils/getSourceMap';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @remove-on-eject-end
'use strict';

const babelJest = require('babel-jest');
const babelJest = require('babel-jest').default;

const hasJsxRuntime = (() => {
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/fixtures/kitchensink/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"package": {
"dependencies": {
"bootstrap": "4.3.1",
"jest": "26.6.0",
"jest": "27.1.0",
"node-sass": "6.x",
"normalize.css": "7.0.0",
"prop-types": "15.7.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const babelOptions = { presets: ['react-app'] };

module.exports = require('babel-jest').createTransformer(babelOptions);
const babelJest = require('babel-jest').default;

module.exports = babelJest.createTransformer(babelOptions);
9 changes: 4 additions & 5 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/core": "7.14.2",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.3",
"@svgr/webpack": "5.5.0",
"babel-jest": "^26.6.0",
"babel-jest": "^27.1.0",
"babel-loader": "8.2.2",
"babel-plugin-named-asset-import": "^0.3.7",
"babel-preset-react-app": "^10.0.0",
Expand All @@ -50,10 +50,9 @@
"fs-extra": "^10.0.0",
"html-webpack-plugin": "5.3.2",
"identity-obj-proxy": "3.0.0",
"jest": "26.6.0",
"jest-circus": "26.6.0",
"jest-resolve": "26.6.0",
"jest-watch-typeahead": "0.6.1",
"jest": "27.1.0",
"jest-resolve": "27.1.0",
"jest-watch-typeahead": "0.6.4",
"mini-css-extract-plugin": "2.1.0",
"postcss": "8.3.5",
"postcss-flexbugs-fixes": "5.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module.exports = (resolve, rootDir, isEjecting) => {
'<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
testEnvironment: 'jsdom',
testRunner: require.resolve('jest-circus/runner'),
krreet marked this conversation as resolved.
Show resolved Hide resolved
transform: {
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': resolve(
'config/jest/babelTransform.js'
Expand Down