Skip to content

Commit

Permalink
Upgrade jest and related packages from 26.6.0 to 27.1.0 (#11338)
Browse files Browse the repository at this point in the history
* Upgrade jest and related packages from 26.6.0 to 27.1.0

* adds the latest yarn.lock.cached file

* runs yarn compile:lockfile

* resolve conflicts with the main branch

* adds the package-lock : npm ci with npm7

* adds the package-lock : npm ci with npm7

* Revert yarn.lock.cached

* update postcss-normalize to 10.0.1 to resolve smoke test failures

Co-authored-by: reetkr <[email protected]>
  • Loading branch information
krreet and reetkr authored Sep 22, 2021
1 parent 960b21e commit 63bba07
Show file tree
Hide file tree
Showing 13 changed files with 6,006 additions and 5,407 deletions.
11,377 changes: 5,987 additions & 5,390 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"
}
}
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
*/

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);
11 changes: 5 additions & 6 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,15 +50,14 @@
"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",
"postcss-loader": "6.1.1",
"postcss-normalize": "10.0.0",
"postcss-normalize": "10.0.1",
"postcss-preset-env": "6.7.0",
"prompts": "2.4.1",
"react-app-polyfill": "^2.0.0",
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'),
transform: {
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': resolve(
'config/jest/babelTransform.js'
Expand Down

0 comments on commit 63bba07

Please sign in to comment.