From eccb0b981e15c5ece454b780d4ae980346698a8b Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Fri, 10 Dec 2021 22:07:47 +0100 Subject: [PATCH 01/15] Swap out babel with swc --- package-lock.json | 432 +++++++++++++++++- .../react-scripts/config/createSwcConfig.js | 53 +++ .../babelTransform.js => hasJsxRuntime.js} | 18 +- .../react-scripts/config/webpack.config.js | 133 +----- .../fixtures/kitchensink/template/README.md | 2 +- .../template/jest.integration.config.js | 2 +- .../kitchensink/template/jest.transform.js | 5 - packages/react-scripts/package.json | 9 +- packages/react-scripts/scripts/build.js | 1 - packages/react-scripts/scripts/eject.js | 15 +- packages/react-scripts/scripts/start.js | 1 - packages/react-scripts/scripts/test.js | 1 - .../scripts/utils/createJestConfig.js | 13 +- 13 files changed, 518 insertions(+), 167 deletions(-) create mode 100644 packages/react-scripts/config/createSwcConfig.js rename packages/react-scripts/config/{jest/babelTransform.js => hasJsxRuntime.js} (57%) delete mode 100644 packages/react-scripts/fixtures/kitchensink/template/jest.transform.js diff --git a/package-lock.json b/package-lock.json index a4a11c214a5..448bffb0492 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2117,6 +2117,17 @@ } } }, + "node_modules/@jest/create-cache-key-function": { + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.4.2.tgz", + "integrity": "sha512-aSSCAJwUNX4R1hJQoyimsND5l+2EsFgzlepS8NuOJJHjXij/UdxYFngac44tmv9IYdI+kglAyORg0plt4/aFMQ==", + "dependencies": { + "@jest/types": "^27.4.2" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, "node_modules/@jest/environment": { "version": "27.4.2", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", @@ -3707,6 +3718,19 @@ "rimraf": "bin.js" } }, + "node_modules/@napi-rs/triples": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@napi-rs/triples/-/triples-1.1.0.tgz", + "integrity": "sha512-XQr74QaLeMiqhStEhLn1im9EOMnkypp7MZOwQhGzqp2Weu5eQJbpPxWxixxlYRKWPOmJjsk6qYfYH9kq43yc2w==" + }, + "node_modules/@node-rs/helper": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz", + "integrity": "sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==", + "dependencies": { + "@napi-rs/triples": "^1.0.3" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4534,6 +4558,234 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/core": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.119.tgz", + "integrity": "sha512-hNelzQ5ShAaaf2SHy4oZQ0dB8VCI4AaVchWEe5bZtirW3sY0gOqVL5V7x0b5Zzo0FyjlMnGIbX1k5IuX5uyn8A==", + "dependencies": { + "@node-rs/helper": "^1.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-android-arm64": "^1.2.119", + "@swc/core-darwin-arm64": "^1.2.119", + "@swc/core-darwin-x64": "^1.2.119", + "@swc/core-freebsd-x64": "^1.2.119", + "@swc/core-linux-arm-gnueabihf": "^1.2.119", + "@swc/core-linux-arm64-gnu": "^1.2.119", + "@swc/core-linux-arm64-musl": "^1.2.119", + "@swc/core-linux-x64-gnu": "^1.2.119", + "@swc/core-linux-x64-musl": "^1.2.119", + "@swc/core-win32-arm64-msvc": "^1.2.119", + "@swc/core-win32-ia32-msvc": "^1.2.119", + "@swc/core-win32-x64-msvc": "^1.2.119" + } + }, + "node_modules/@swc/core-android-arm64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.119.tgz", + "integrity": "sha512-ck0qdBvqk3DFi9siDr80N/2i2AcW5vQzWu1cKbptZwJl5yneMX05zphBV3Z+dCVNaUlCraJ5b58u39pps4Isqw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.119.tgz", + "integrity": "sha512-btfsTdQeki6njDKfVfQBtfQVmJt1xOaXGHno/l4wWpoyL+9pfKRXvFw35agAnGZ8JcTItG4s3lM8Dn/AV8nYOg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.119.tgz", + "integrity": "sha512-8Zxg3T5Y4sA3oHUDsu9pZ6AK7p41gNNFyUDs5kD/ep+pWlJKKfvf7nqRfeHcQqVm4HnTyQF7urAVDxfPsxJ+UA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-freebsd-x64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.119.tgz", + "integrity": "sha512-tBq0sUht+4GnqQuPwLz4c0rFQhmCrr8g588asUleGbX5/XNssn1i9pSOWU66JsL9A73x2PyK1Rxpja3C3gvkBA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.119.tgz", + "integrity": "sha512-cPP0L2Q1QLO/Hk2tgsEgCjzvpc2NIcgnD2h7vk05XovuyCAavwGetavjkHM9MQ/2VW8TzS1mO+QFG2zafs1+Cw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.119.tgz", + "integrity": "sha512-V/os4gQD3EQM1bNLZH5zC+df9T7X4+o1H8EzmrKr9EIUVH8FbvvCKqYwkSbemoUIiOw3axV8HDHAcVGdzlpesw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.119.tgz", + "integrity": "sha512-6k9/EaszC3N3DVD6AdjcTGc8KLPLlrlk4HYS7ExSedWY3bCnWIRZNxPuvUYDILYhWD6Kppp2qJ55wEFL2fbGHA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.119.tgz", + "integrity": "sha512-2sVyOPhWOdhMqybXH9kun1eRHPop2MFNe2vl7TEW0/p3s3MJ6avynscLt4Ym47NNsSxfnnam/R5i/PcOLIQa9g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.119.tgz", + "integrity": "sha512-a7WoEN5LDhKPT+KYdrRAg561V92Tvi+4cpwdd9rf8ma4oexiYVMuAxj6ls6GvlTo1XgFvqgAxl0/uIv8CvC3MA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.119.tgz", + "integrity": "sha512-z2SZeqsv/tsTj5lmosca4mgynbkHhWDfsVjq678Dp2/xaWdnwUQzomXYb8/LmyUZqWH2zMz6d9tAhUqyfOrBMw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.119.tgz", + "integrity": "sha512-JdxOFihRT8wzoqGBW9/KflMYLqCZLEZZujNQBvdnuqey/xQNcwwk5hLkRD9T0duj96OzI/N00ebcKt/xX9pZVA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.119.tgz", + "integrity": "sha512-agvB2ADLUrxcqwPtxFGJ3tndCgydYg6fkYYWBB3EcQ2c6/Ay3XwvIWUJL1wUxNCBIuB12VXJCmdeuxHzFpEiGg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/helpers": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.3.2.tgz", + "integrity": "sha512-qEru2uaH1vKZNCZR4rFCUZaflsBP7IWiGcIoQe22qi5tm+HEG/yPdhSba+ZCNTWk2xyYpx/nEFkncDY3orEx3w==" + }, + "node_modules/@swc/jest": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.12.tgz", + "integrity": "sha512-L/fr97Tbpv64O1rqIR1IzmhLYvhlMMBj9z/GEDlSOb9/xWsQCAufDsEXqs6JtQeSriPV8ABRltYBIp4qi7IQhw==", + "dependencies": { + "@jest/create-cache-key-function": "^27.3.1" + }, + "engines": { + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" + } + }, "node_modules/@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -6157,6 +6409,7 @@ "version": "8.2.3", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", + "dev": true, "dependencies": { "find-cache-dir": "^3.3.1", "loader-utils": "^1.4.0", @@ -6175,6 +6428,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, "dependencies": { "minimist": "^1.2.0" }, @@ -6186,6 +6440,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -6199,6 +6454,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, "dependencies": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", @@ -7691,7 +7947,8 @@ "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "node_modules/compare-func": { "version": "2.0.0", @@ -11214,6 +11471,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -22670,6 +22928,18 @@ "node": ">=4" } }, + "node_modules/swc-loader": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.1.15.tgz", + "integrity": "sha512-cn1WPIeQJvXM4bbo3OwdEIapsQ4uUGOfyFj0h2+2+brT0k76DCGnZXDE2KmcqTd2JSQ+b61z2NPMib7eEwMYYw==", + "dependencies": { + "loader-utils": "^2.0.0" + }, + "peerDependencies": { + "@swc/core": "^1.2.52", + "webpack": ">=2" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -25865,13 +26135,11 @@ "version": "4.0.3", "license": "MIT", "dependencies": { - "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", - "babel-jest": "^27.4.2", - "babel-loader": "^8.2.3", - "babel-plugin-named-asset-import": "^0.3.7", - "babel-preset-react-app": "^10.0.0", + "@swc/core": "^1.2.119", + "@swc/helpers": "^0.3.2", + "@swc/jest": "^0.2.12", "bfj": "^7.0.2", "browserslist": "^4.18.1", "camelcase": "^6.2.1", @@ -25906,6 +26174,7 @@ "semver": "^7.3.5", "source-map-loader": "^3.0.0", "style-loader": "^3.3.1", + "swc-loader": "^0.1.15", "terser-webpack-plugin": "^5.2.5", "webpack": "^5.64.4", "webpack-dev-server": "^4.6.0", @@ -27373,6 +27642,14 @@ "strip-ansi": "^6.0.0" } }, + "@jest/create-cache-key-function": { + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.4.2.tgz", + "integrity": "sha512-aSSCAJwUNX4R1hJQoyimsND5l+2EsFgzlepS8NuOJJHjXij/UdxYFngac44tmv9IYdI+kglAyORg0plt4/aFMQ==", + "requires": { + "@jest/types": "^27.4.2" + } + }, "@jest/environment": { "version": "27.4.2", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", @@ -28672,6 +28949,19 @@ } } }, + "@napi-rs/triples": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@napi-rs/triples/-/triples-1.1.0.tgz", + "integrity": "sha512-XQr74QaLeMiqhStEhLn1im9EOMnkypp7MZOwQhGzqp2Weu5eQJbpPxWxixxlYRKWPOmJjsk6qYfYH9kq43yc2w==" + }, + "@node-rs/helper": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz", + "integrity": "sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==", + "requires": { + "@napi-rs/triples": "^1.0.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -29288,6 +29578,111 @@ "loader-utils": "^2.0.0" } }, + "@swc/core": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.119.tgz", + "integrity": "sha512-hNelzQ5ShAaaf2SHy4oZQ0dB8VCI4AaVchWEe5bZtirW3sY0gOqVL5V7x0b5Zzo0FyjlMnGIbX1k5IuX5uyn8A==", + "requires": { + "@node-rs/helper": "^1.0.0", + "@swc/core-android-arm64": "^1.2.119", + "@swc/core-darwin-arm64": "^1.2.119", + "@swc/core-darwin-x64": "^1.2.119", + "@swc/core-freebsd-x64": "^1.2.119", + "@swc/core-linux-arm-gnueabihf": "^1.2.119", + "@swc/core-linux-arm64-gnu": "^1.2.119", + "@swc/core-linux-arm64-musl": "^1.2.119", + "@swc/core-linux-x64-gnu": "^1.2.119", + "@swc/core-linux-x64-musl": "^1.2.119", + "@swc/core-win32-arm64-msvc": "^1.2.119", + "@swc/core-win32-ia32-msvc": "^1.2.119", + "@swc/core-win32-x64-msvc": "^1.2.119" + } + }, + "@swc/core-android-arm64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.119.tgz", + "integrity": "sha512-ck0qdBvqk3DFi9siDr80N/2i2AcW5vQzWu1cKbptZwJl5yneMX05zphBV3Z+dCVNaUlCraJ5b58u39pps4Isqw==", + "optional": true + }, + "@swc/core-darwin-arm64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.119.tgz", + "integrity": "sha512-btfsTdQeki6njDKfVfQBtfQVmJt1xOaXGHno/l4wWpoyL+9pfKRXvFw35agAnGZ8JcTItG4s3lM8Dn/AV8nYOg==", + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.119.tgz", + "integrity": "sha512-8Zxg3T5Y4sA3oHUDsu9pZ6AK7p41gNNFyUDs5kD/ep+pWlJKKfvf7nqRfeHcQqVm4HnTyQF7urAVDxfPsxJ+UA==", + "optional": true + }, + "@swc/core-freebsd-x64": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.119.tgz", + "integrity": "sha512-tBq0sUht+4GnqQuPwLz4c0rFQhmCrr8g588asUleGbX5/XNssn1i9pSOWU66JsL9A73x2PyK1Rxpja3C3gvkBA==", + "optional": true + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.119.tgz", + "integrity": "sha512-cPP0L2Q1QLO/Hk2tgsEgCjzvpc2NIcgnD2h7vk05XovuyCAavwGetavjkHM9MQ/2VW8TzS1mO+QFG2zafs1+Cw==", + "optional": true + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.119.tgz", + "integrity": "sha512-V/os4gQD3EQM1bNLZH5zC+df9T7X4+o1H8EzmrKr9EIUVH8FbvvCKqYwkSbemoUIiOw3axV8HDHAcVGdzlpesw==", + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.119.tgz", + "integrity": "sha512-6k9/EaszC3N3DVD6AdjcTGc8KLPLlrlk4HYS7ExSedWY3bCnWIRZNxPuvUYDILYhWD6Kppp2qJ55wEFL2fbGHA==", + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.119.tgz", + "integrity": "sha512-2sVyOPhWOdhMqybXH9kun1eRHPop2MFNe2vl7TEW0/p3s3MJ6avynscLt4Ym47NNsSxfnnam/R5i/PcOLIQa9g==", + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.119.tgz", + "integrity": "sha512-a7WoEN5LDhKPT+KYdrRAg561V92Tvi+4cpwdd9rf8ma4oexiYVMuAxj6ls6GvlTo1XgFvqgAxl0/uIv8CvC3MA==", + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.119.tgz", + "integrity": "sha512-z2SZeqsv/tsTj5lmosca4mgynbkHhWDfsVjq678Dp2/xaWdnwUQzomXYb8/LmyUZqWH2zMz6d9tAhUqyfOrBMw==", + "optional": true + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.119.tgz", + "integrity": "sha512-JdxOFihRT8wzoqGBW9/KflMYLqCZLEZZujNQBvdnuqey/xQNcwwk5hLkRD9T0duj96OzI/N00ebcKt/xX9pZVA==", + "optional": true + }, + "@swc/core-win32-x64-msvc": { + "version": "1.2.119", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.119.tgz", + "integrity": "sha512-agvB2ADLUrxcqwPtxFGJ3tndCgydYg6fkYYWBB3EcQ2c6/Ay3XwvIWUJL1wUxNCBIuB12VXJCmdeuxHzFpEiGg==", + "optional": true + }, + "@swc/helpers": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.3.2.tgz", + "integrity": "sha512-qEru2uaH1vKZNCZR4rFCUZaflsBP7IWiGcIoQe22qi5tm+HEG/yPdhSba+ZCNTWk2xyYpx/nEFkncDY3orEx3w==" + }, + "@swc/jest": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.12.tgz", + "integrity": "sha512-L/fr97Tbpv64O1rqIR1IzmhLYvhlMMBj9z/GEDlSOb9/xWsQCAufDsEXqs6JtQeSriPV8ABRltYBIp4qi7IQhw==", + "requires": { + "@jest/create-cache-key-function": "^27.3.1" + } + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -30580,6 +30975,7 @@ "version": "8.2.3", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", + "dev": true, "requires": { "find-cache-dir": "^3.3.1", "loader-utils": "^1.4.0", @@ -30591,6 +30987,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, "requires": { "minimist": "^1.2.0" } @@ -30599,6 +30996,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -30609,6 +31007,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, "requires": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", @@ -31768,7 +32167,8 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "compare-func": { "version": "2.0.0", @@ -34476,6 +34876,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, "requires": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -40838,13 +41239,11 @@ "react-scripts": { "version": "file:packages/react-scripts", "requires": { - "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", - "babel-jest": "^27.4.2", - "babel-loader": "^8.2.3", - "babel-plugin-named-asset-import": "^0.3.7", - "babel-preset-react-app": "^10.0.0", + "@swc/core": "^1.2.119", + "@swc/helpers": "^0.3.2", + "@swc/jest": "^0.2.12", "bfj": "^7.0.2", "browserslist": "^4.18.1", "camelcase": "^6.2.1", @@ -40882,6 +41281,7 @@ "semver": "^7.3.5", "source-map-loader": "^3.0.0", "style-loader": "^3.3.1", + "swc-loader": "^0.1.15", "terser-webpack-plugin": "^5.2.5", "webpack": "^5.64.4", "webpack-dev-server": "^4.6.0", @@ -43240,6 +43640,14 @@ } } }, + "swc-loader": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.1.15.tgz", + "integrity": "sha512-cn1WPIeQJvXM4bbo3OwdEIapsQ4uUGOfyFj0h2+2+brT0k76DCGnZXDE2KmcqTd2JSQ+b61z2NPMib7eEwMYYw==", + "requires": { + "loader-utils": "^2.0.0" + } + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/packages/react-scripts/config/createSwcConfig.js b/packages/react-scripts/config/createSwcConfig.js new file mode 100644 index 00000000000..825b86888cb --- /dev/null +++ b/packages/react-scripts/config/createSwcConfig.js @@ -0,0 +1,53 @@ +// @remove-on-eject-begin +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +// @remove-on-eject-end +'use strict'; +const hasJsxRuntime = require('./hasJsxRuntime'); + +module.exports = function createSwcConfig({ + shouldUseSourceMap = true, + isEnvDevelopment = false, + shouldUseReactRefresh = false, +} = {}) { + return { + ecmascript: { + sourceMaps: shouldUseSourceMap, + jsc: { + externalHelpers: true, + parser: { + jsx: true, + syntax: 'ecmascript', + }, + transform: { + react: { + runtime: hasJsxRuntime ? 'automatic' : 'clasic', + refresh: shouldUseReactRefresh, + development: isEnvDevelopment, + }, + }, + }, + }, + typescript: { + sourceMaps: shouldUseSourceMap, + jsc: { + externalHelpers: true, + parser: { + tsx: true, + syntax: 'typescript', + development: isEnvDevelopment, + }, + transform: { + react: { + runtime: hasJsxRuntime ? 'automatic' : 'clasic', + refresh: shouldUseReactRefresh, + }, + }, + }, + }, + }; +}; diff --git a/packages/react-scripts/config/jest/babelTransform.js b/packages/react-scripts/config/hasJsxRuntime.js similarity index 57% rename from packages/react-scripts/config/jest/babelTransform.js rename to packages/react-scripts/config/hasJsxRuntime.js index 8a61365182c..a280a5f6111 100644 --- a/packages/react-scripts/config/jest/babelTransform.js +++ b/packages/react-scripts/config/hasJsxRuntime.js @@ -7,10 +7,7 @@ */ // @remove-on-eject-end 'use strict'; - -const babelJest = require('babel-jest').default; - -const hasJsxRuntime = (() => { +module.exports = (() => { if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') { return false; } @@ -22,16 +19,3 @@ const hasJsxRuntime = (() => { return false; } })(); - -module.exports = babelJest.createTransformer({ - presets: [ - [ - require.resolve('babel-preset-react-app'), - { - runtime: hasJsxRuntime ? 'automatic' : 'classic', - }, - ], - ], - babelrc: false, - configFile: false, -}); diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 7f3b2234dd2..42d9eecbd53 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -33,10 +33,9 @@ const ForkTsCheckerWebpackPlugin = ? require('react-dev-utils/ForkTsCheckerWarningWebpackPlugin') : require('react-dev-utils/ForkTsCheckerWebpackPlugin'); const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); -// @remove-on-eject-begin -const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier'); -// @remove-on-eject-end const createEnvironmentHash = require('./webpack/persistentCache/createEnvironmentHash'); +const hasJsxRuntime = require('./hasJsxRuntime'); +const createSwcConfig = require('./createSwcConfig'); // Source maps are resource heavy and can cause out of memory issue for large source files. const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; @@ -45,14 +44,6 @@ const reactRefreshRuntimeEntry = require.resolve('react-refresh/runtime'); const reactRefreshWebpackPluginRuntimeEntry = require.resolve( '@pmmmwh/react-refresh-webpack-plugin' ); -const babelRuntimeEntry = require.resolve('babel-preset-react-app'); -const babelRuntimeEntryHelpers = require.resolve( - '@babel/runtime/helpers/esm/assertThisInitialized', - { paths: [babelRuntimeEntry] } -); -const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', { - paths: [babelRuntimeEntry], -}); // Some apps do not need the benefits of saving a web request, so not inlining the chunk // makes for a smoother build process. @@ -77,19 +68,6 @@ const cssModuleRegex = /\.module\.css$/; const sassRegex = /\.(scss|sass)$/; const sassModuleRegex = /\.module\.(scss|sass)$/; -const hasJsxRuntime = (() => { - if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') { - return false; - } - - try { - require.resolve('react/jsx-runtime'); - return true; - } catch (e) { - return false; - } -})(); - // This is the production and development configuration. // It is focused on developer experience, fast rebuilds, and a minimal bundle. module.exports = function (webpackEnv) { @@ -109,6 +87,12 @@ module.exports = function (webpackEnv) { const shouldUseReactRefresh = env.raw.FAST_REFRESH; + const swcConfig = createSwcConfig({ + shouldUseSourceMap, + isEnvDevelopment, + shouldUseReactRefresh, + }); + // common function to get style loaders const getStyleLoaders = (cssOptions, preProcessor) => { const loaders = [ @@ -310,7 +294,7 @@ module.exports = function (webpackEnv) { }, plugins: [ // Prevents users from importing files from outside of src/ (or node_modules/). - // This often causes confusion because we only process files within src/ with babel. + // This often causes confusion because we only process files within src/ with swc. // To fix this, we prevent you from importing files out of src/ -- if you'd like to, // please link the files into your node_modules/ and let module-resolution kick in. // Make sure your source files are compiled, as they will not be processed in any way. @@ -318,9 +302,6 @@ module.exports = function (webpackEnv) { paths.appPackageJson, reactRefreshRuntimeEntry, reactRefreshWebpackPluginRuntimeEntry, - babelRuntimeEntry, - babelRuntimeEntryHelpers, - babelRuntimeRegenerator, ]), ], }, @@ -330,7 +311,6 @@ module.exports = function (webpackEnv) { // Handle node_modules packages that contain sourcemaps shouldUseSourceMap && { enforce: 'pre', - exclude: /@babel(?:\/|\\{1,2})runtime/, test: /\.(js|mjs|jsx|ts|tsx|css)$/, loader: require.resolve('source-map-loader'), }, @@ -389,96 +369,25 @@ module.exports = function (webpackEnv) { and: [/\.(ts|tsx|js|jsx|md|mdx)$/], }, }, - // Process application JS with Babel. + // Process application JS with swc. // The preset includes JSX, Flow, TypeScript, and some ESnext features. { - test: /\.(js|mjs|jsx|ts|tsx)$/, + test: /\.(js|mjs|jsx)$/, include: paths.appSrc, - loader: require.resolve('babel-loader'), - options: { - customize: require.resolve( - 'babel-preset-react-app/webpack-overrides' - ), - presets: [ - [ - require.resolve('babel-preset-react-app'), - { - runtime: hasJsxRuntime ? 'automatic' : 'classic', - }, - ], - ], - // @remove-on-eject-begin - babelrc: false, - configFile: false, - // Make sure we have a unique cache identifier, erring on the - // side of caution. - // We remove this when the user ejects because the default - // is sane and uses Babel options. Instead of options, we use - // the react-scripts and babel-preset-react-app versions. - cacheIdentifier: getCacheIdentifier( - isEnvProduction - ? 'production' - : isEnvDevelopment && 'development', - [ - 'babel-plugin-named-asset-import', - 'babel-preset-react-app', - 'react-dev-utils', - 'react-scripts', - ] - ), - // @remove-on-eject-end - plugins: [ - isEnvDevelopment && - shouldUseReactRefresh && - require.resolve('react-refresh/babel'), - ].filter(Boolean), - // This is a feature of `babel-loader` for webpack (not Babel itself). - // It enables caching results in ./node_modules/.cache/babel-loader/ - // directory for faster rebuilds. - cacheDirectory: true, - // See #6846 for context on why cacheCompression is disabled - cacheCompression: false, - compact: isEnvProduction, - }, + loader: require.resolve('swc-loader'), + options: swcConfig.ecmascript, + }, + { + test: /\.(ts|tsx)$/, + include: paths.appSrc, + loader: require.resolve('swc-loader'), + options: swcConfig.typescript, }, - // Process any JS outside of the app with Babel. + // Process any JS outside of the app with swc. // Unlike the application JS, we only compile the standard ES features. { test: /\.(js|mjs)$/, - exclude: /@babel(?:\/|\\{1,2})runtime/, - loader: require.resolve('babel-loader'), - options: { - babelrc: false, - configFile: false, - compact: false, - presets: [ - [ - require.resolve('babel-preset-react-app/dependencies'), - { helpers: true }, - ], - ], - cacheDirectory: true, - // See #6846 for context on why cacheCompression is disabled - cacheCompression: false, - // @remove-on-eject-begin - cacheIdentifier: getCacheIdentifier( - isEnvProduction - ? 'production' - : isEnvDevelopment && 'development', - [ - 'babel-plugin-named-asset-import', - 'babel-preset-react-app', - 'react-dev-utils', - 'react-scripts', - ] - ), - // @remove-on-eject-end - // Babel sourcemaps are needed for debugging into node_modules - // code. Without the options below, debuggers like VSCode - // show incorrect code and set breakpoints on the wrong lines. - sourceMaps: shouldUseSourceMap, - inputSourceMap: shouldUseSourceMap, - }, + loader: require.resolve('swc-loader'), }, // "postcss" loader applies autoprefixer to our CSS. // "css" loader resolves paths in CSS and adds assets as dependencies. diff --git a/packages/react-scripts/fixtures/kitchensink/template/README.md b/packages/react-scripts/fixtures/kitchensink/template/README.md index 3a197ee6aee..fa1cd7dadea 100644 --- a/packages/react-scripts/fixtures/kitchensink/template/README.md +++ b/packages/react-scripts/fixtures/kitchensink/template/README.md @@ -20,7 +20,7 @@ Features are categorized by their scope: - _env_, all those which deal with environment variables (e.g. `NODE_PATH`) -- _syntax_, all those which showcase a single EcmaScript syntax feature that is expected to be transpiled by **Babel** +- _syntax_, all those which showcase a single EcmaScript syntax feature that is expected to be transpiled by **SWC** - _webpack_, all those which make use of webpack settings, loaders or plugins diff --git a/packages/react-scripts/fixtures/kitchensink/template/jest.integration.config.js b/packages/react-scripts/fixtures/kitchensink/template/jest.integration.config.js index 01059d4d688..f7facc004a2 100644 --- a/packages/react-scripts/fixtures/kitchensink/template/jest.integration.config.js +++ b/packages/react-scripts/fixtures/kitchensink/template/jest.integration.config.js @@ -1,5 +1,5 @@ module.exports = { testEnvironment: 'node', testMatch: ['**/integration/*.test.js'], - transform: { '^.+\\.js$': './jest.transform.js' }, + transform: { '^.+\\.js$': [require.resolve('@swc/jest')] }, }; diff --git a/packages/react-scripts/fixtures/kitchensink/template/jest.transform.js b/packages/react-scripts/fixtures/kitchensink/template/jest.transform.js deleted file mode 100644 index 3b2d0c56bf2..00000000000 --- a/packages/react-scripts/fixtures/kitchensink/template/jest.transform.js +++ /dev/null @@ -1,5 +0,0 @@ -const babelOptions = { presets: ['react-app'] }; - -const babelJest = require('babel-jest').default; - -module.exports = babelJest.createTransformer(babelOptions); diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 30d070e21e7..78c3204f0be 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -28,13 +28,11 @@ }, "types": "./lib/react-app.d.ts", "dependencies": { - "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", - "babel-jest": "^27.4.2", - "babel-loader": "^8.2.3", - "babel-plugin-named-asset-import": "^0.3.7", - "babel-preset-react-app": "^10.0.0", + "@swc/core": "^1.2.119", + "@swc/helpers": "^0.3.2", + "@swc/jest": "^0.2.12", "bfj": "^7.0.2", "browserslist": "^4.18.1", "camelcase": "^6.2.1", @@ -69,6 +67,7 @@ "semver": "^7.3.5", "source-map-loader": "^3.0.0", "style-loader": "^3.3.1", + "swc-loader": "^0.1.15", "terser-webpack-plugin": "^5.2.5", "webpack": "^5.64.4", "webpack-dev-server": "^4.6.0", diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js index 7a3a635a5d3..b7c37317715 100644 --- a/packages/react-scripts/scripts/build.js +++ b/packages/react-scripts/scripts/build.js @@ -9,7 +9,6 @@ 'use strict'; // Do this as the first thing so that any code reading it knows the right env. -process.env.BABEL_ENV = 'production'; process.env.NODE_ENV = 'production'; // Makes the script crash on unhandled rejections instead of silently diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index e39907f01d7..f7fe3ef2acb 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -109,7 +109,12 @@ prompts({ } } - const folders = ['config', 'config/jest', 'scripts', 'config/webpack/persistentCache']; + const folders = [ + 'config', + 'config/jest', + 'scripts', + 'config/webpack/persistentCache', + ]; // Make shallow array of files paths const files = folders.reduce((files, folder) => { @@ -138,7 +143,7 @@ prompts({ console.log(cyan(`Copying files into ${appPath}`)); folders.forEach(folder => { - fs.mkdirSync(path.join(appPath, folder), {recursive: true}); + fs.mkdirSync(path.join(appPath, folder), { recursive: true }); }); files.forEach(file => { @@ -230,12 +235,6 @@ prompts({ console.log(` Adding ${cyan('Jest')} configuration`); appPackage.jest = jestConfig; - // Add Babel config - console.log(` Adding ${cyan('Babel')} preset`); - appPackage.babel = { - presets: ['react-app'], - }; - // Add ESlint config if (!appPackage.eslintConfig) { console.log(` Adding ${cyan('ESLint')} configuration`); diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 8b9a2c26b4d..22e883e9da7 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -9,7 +9,6 @@ 'use strict'; // Do this as the first thing so that any code reading it knows the right env. -process.env.BABEL_ENV = 'development'; process.env.NODE_ENV = 'development'; // Makes the script crash on unhandled rejections instead of silently diff --git a/packages/react-scripts/scripts/test.js b/packages/react-scripts/scripts/test.js index c91d8655ae9..1e793e58bc5 100644 --- a/packages/react-scripts/scripts/test.js +++ b/packages/react-scripts/scripts/test.js @@ -9,7 +9,6 @@ 'use strict'; // Do this as the first thing so that any code reading it knows the right env. -process.env.BABEL_ENV = 'test'; process.env.NODE_ENV = 'test'; process.env.PUBLIC_URL = ''; diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index ff1c5811025..d0fd1fceea2 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -11,6 +11,11 @@ const fs = require('fs'); const chalk = require('react-dev-utils/chalk'); const paths = require('../../config/paths'); const modules = require('../../config/modules'); +const createSwcConfig = require('../../config/createSwcConfig'); +const swcConfig = createSwcConfig({ + shouldUseSourceMap: true, + isEnvDevelopment: true, +}); module.exports = (resolve, rootDir, isEjecting) => { // Use this instead of `paths.testsSetup` to avoid putting @@ -40,9 +45,11 @@ module.exports = (resolve, rootDir, isEjecting) => { ], testEnvironment: 'jsdom', transform: { - '^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': resolve( - 'config/jest/babelTransform.js' - ), + '^.+\\.(js|jsx|mjs|cjs)$': [ + require.resolve('@swc/jest'), + swcConfig.ecmascript, + ], + '^.+\\.(ts|tsx)$': [require.resolve('@swc/jest'), swcConfig.typescript], '^.+\\.css$': resolve('config/jest/cssTransform.js'), '^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)': resolve( 'config/jest/fileTransform.js' From 8e1d6fa54388af58c4ad4ab4d9977f0d17b81e4d Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Fri, 10 Dec 2021 22:56:45 +0100 Subject: [PATCH 02/15] Cache clean no longer needed as of Npm v5 --- tasks/cra.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/cra.js b/tasks/cra.js index e246f35950d..035dee11c01 100644 --- a/tasks/cra.js +++ b/tasks/cra.js @@ -106,7 +106,6 @@ const scriptsFileName = cp const scriptsPath = path.join(packagesDir, 'react-scripts', scriptsFileName); // Now that we have packed them, call the global CLI. -cp.execSync('npm cache clean'); const args = process.argv.slice(2); From 44a7c214f5cc78a5f49e168b62646b68b039413b Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Fri, 10 Dec 2021 23:20:19 +0100 Subject: [PATCH 03/15] Fix swc browserlists support --- packages/react-scripts/config/createSwcConfig.js | 11 +++++++++++ packages/react-scripts/config/webpack.config.js | 1 + .../react-scripts/scripts/utils/createJestConfig.js | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/config/createSwcConfig.js b/packages/react-scripts/config/createSwcConfig.js index 825b86888cb..250b6049323 100644 --- a/packages/react-scripts/config/createSwcConfig.js +++ b/packages/react-scripts/config/createSwcConfig.js @@ -12,8 +12,16 @@ const hasJsxRuntime = require('./hasJsxRuntime'); module.exports = function createSwcConfig({ shouldUseSourceMap = true, isEnvDevelopment = false, + isEnvProduction = false, shouldUseReactRefresh = false, } = {}) { + const env = + isEnvDevelopment | isEnvProduction + ? { + mode: 'entry', + coreJs: 3, + } + : {}; return { ecmascript: { sourceMaps: shouldUseSourceMap, @@ -31,6 +39,7 @@ module.exports = function createSwcConfig({ }, }, }, + env, }, typescript: { sourceMaps: shouldUseSourceMap, @@ -45,9 +54,11 @@ module.exports = function createSwcConfig({ react: { runtime: hasJsxRuntime ? 'automatic' : 'clasic', refresh: shouldUseReactRefresh, + development: isEnvDevelopment, }, }, }, }, + env, }; }; diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 42d9eecbd53..2b3405873c4 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -90,6 +90,7 @@ module.exports = function (webpackEnv) { const swcConfig = createSwcConfig({ shouldUseSourceMap, isEnvDevelopment, + isEnvProduction, shouldUseReactRefresh, }); diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index d0fd1fceea2..4980c3d3b0d 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -14,7 +14,6 @@ const modules = require('../../config/modules'); const createSwcConfig = require('../../config/createSwcConfig'); const swcConfig = createSwcConfig({ shouldUseSourceMap: true, - isEnvDevelopment: true, }); module.exports = (resolve, rootDir, isEjecting) => { From 6f9083bf84c5edff5c70e86d5ec4a2073c0b098b Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Sat, 11 Dec 2021 10:01:30 +0100 Subject: [PATCH 04/15] Breaking: Remove support for Flow Currently swc doesn't support Flow they are considering it, if they do we can revert this commit https://github.com/swc-project/swc/issues/256 --- README.md | 2 +- docusaurus/docs/adding-a-sass-stylesheet.md | 12 -------- docusaurus/docs/adding-flow.md | 28 ------------------- .../proxying-api-requests-in-development.md | 6 ++-- .../docs/supported-browsers-features.md | 2 +- docusaurus/website/sidebars.json | 1 - .../react-scripts/config/webpack.config.js | 2 +- .../src/features/syntax/AsyncAwait.js | 10 ------- 8 files changed, 6 insertions(+), 57 deletions(-) delete mode 100644 docusaurus/docs/adding-flow.md diff --git a/README.md b/README.md index 71c6485a16b..3f063c8e0d1 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Please refer to the [User Guide](https://facebook.github.io/create-react-app/doc Your environment will have everything you need to build a modern single-page React app: -- React, JSX, ES6, TypeScript and Flow syntax support. +- React, JSX, ES6 and TypeScript syntax support. - Language extras beyond ES6 like the object spread operator. - Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes. - A fast interactive unit test runner with built-in support for coverage reporting. diff --git a/docusaurus/docs/adding-a-sass-stylesheet.md b/docusaurus/docs/adding-a-sass-stylesheet.md index 5a287294155..825702b6744 100644 --- a/docusaurus/docs/adding-a-sass-stylesheet.md +++ b/docusaurus/docs/adding-a-sass-stylesheet.md @@ -44,18 +44,6 @@ To use imports relative to a path you specify, you can add a [`.env` file](https > **Tip:** You can opt into using this feature with [CSS modules](adding-a-css-modules-stylesheet.md) too! -> **Note:** If you're using Flow, override the [module.file_ext](https://flow.org/en/docs/config/options/#toc-module-file-ext-string) setting in your `.flowconfig` so it'll recognize `.sass` or `.scss` files. You will also need to include the `module.file_ext` default settings for `.js`, `.jsx`, `.mjs` and `.json` files. -> -> ``` -> [options] -> module.file_ext=.js -> module.file_ext=.jsx -> module.file_ext=.mjs -> module.file_ext=.json -> module.file_ext=.sass -> module.file_ext=.scss -> ``` - > **Note:** LibSass and the packages built on top of it, including Node Sass, are [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). > If you're a user of Node Sass, you can migrate to Dart Sass by replacing `node-sass` in your `package.json` file with `sass` or by running the following commands: > diff --git a/docusaurus/docs/adding-flow.md b/docusaurus/docs/adding-flow.md deleted file mode 100644 index 321605261e9..00000000000 --- a/docusaurus/docs/adding-flow.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -id: adding-flow -title: Adding Flow ---- - -Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. - -Recent versions of [Flow](https://flow.org/) work with Create React App projects out of the box. - -To add Flow to a Create React App project, follow these steps: - -1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). -2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flow.org/en/docs/config/) in the root directory. -4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). - -Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. -You can optionally enable an extension for your IDE, such as [Flow Language Support](https://github.com/flowtype/flow-for-vscode) for Visual Studio Code, or leverage the Language Server Protocol standard (e.g. [vim LSP](https://github.com/prabirshrestha/vim-lsp/wiki/Servers-Flow)) to get hints while you type. - -If you'd like to use [absolute imports](/docs/importing-a-component#absolute-imports) with Flow, -make sure to add the following line to your `.flowconfig` to make Flow aware of it: - -```diff - [options] -+ module.name_mapper='^\([^\.].*\)$' -> '/src/\1' -``` - -To learn more about Flow, check out [its documentation](https://flow.org/). diff --git a/docusaurus/docs/proxying-api-requests-in-development.md b/docusaurus/docs/proxying-api-requests-in-development.md index 66563e25e45..8f145750b00 100644 --- a/docusaurus/docs/proxying-api-requests-in-development.md +++ b/docusaurus/docs/proxying-api-requests-in-development.md @@ -87,7 +87,7 @@ Next, create `src/setupProxy.js` and place the following contents in it: ```js const { createProxyMiddleware } = require('http-proxy-middleware'); -module.exports = function(app) { +module.exports = function (app) { // ... }; ``` @@ -97,7 +97,7 @@ You can now register proxies as you wish! Here's an example using the above `htt ```js const { createProxyMiddleware } = require('http-proxy-middleware'); -module.exports = function(app) { +module.exports = function (app) { app.use( '/api', createProxyMiddleware({ @@ -110,6 +110,6 @@ module.exports = function(app) { > **Note:** You do not need to import this file anywhere. It is automatically registered when you start the development server. -> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc). +> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for ES Modules, etc). > **Note:** Passing the path to the proxy function allows you to use globbing and/or pattern matching on the path, which is more flexible than the express route matching. diff --git a/docusaurus/docs/supported-browsers-features.md b/docusaurus/docs/supported-browsers-features.md index d104c19a0c5..dc801d38b11 100644 --- a/docusaurus/docs/supported-browsers-features.md +++ b/docusaurus/docs/supported-browsers-features.md @@ -17,7 +17,7 @@ This project supports a superset of the latest JavaScript standard. In addition - [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread) (ES2018). - [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 4 proposal) - [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). -- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html), [Flow](./adding-flow) and [TypeScript](./adding-typescript). +- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [TypeScript](./adding-typescript). Learn more about [different proposal stages](https://tc39.github.io/process-document/). diff --git a/docusaurus/website/sidebars.json b/docusaurus/website/sidebars.json index 386a29da1bf..5d5e9898949 100644 --- a/docusaurus/website/sidebars.json +++ b/docusaurus/website/sidebars.json @@ -30,7 +30,6 @@ "importing-a-component", "using-global-variables", "adding-bootstrap", - "adding-flow", "adding-typescript", "adding-relay", "adding-a-router", diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 2b3405873c4..777127f14c3 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -371,7 +371,7 @@ module.exports = function (webpackEnv) { }, }, // Process application JS with swc. - // The preset includes JSX, Flow, TypeScript, and some ESnext features. + // The preset includes JSX, TypeScript, and some ESnext features. { test: /\.(js|mjs|jsx)$/, include: paths.appSrc, diff --git a/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js b/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js index f098b3f3629..1dcac672c8c 100644 --- a/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js +++ b/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js @@ -17,16 +17,6 @@ async function load() { ]; } -/* eslint-disable */ -// Regression test for https://github.com/facebook/create-react-app/issues/3055 -const x = async ( - /* prettier-ignore */ - y: void -) => { - const z = await y; -}; -/* eslint-enable */ - export default class AsyncAwait extends Component { static propTypes = { onReady: PropTypes.func.isRequired, From 2334298106b837780a867c5ed959be4608507605 Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Sat, 11 Dec 2021 10:52:34 +0100 Subject: [PATCH 05/15] Update jest to ^27.4.4 --- package-lock.json | 510 +++++++++--------- package.json | 2 +- .../package.json | 2 +- .../confusing-browser-globals/package.json | 2 +- packages/create-react-app/package.json | 2 +- packages/react-dev-utils/package.json | 2 +- packages/react-error-overlay/package.json | 2 +- packages/react-scripts/package.json | 2 +- 8 files changed, 262 insertions(+), 262 deletions(-) diff --git a/package-lock.json b/package-lock.json index 448bffb0492..06fe20ee8a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "get-port": "^5.1.1", "globby": "^11.0.4", "husky": "^4.3.8", - "jest": "^27.4.3", + "jest": "^27.4.4", "lerna": "^4.0.0", "lerna-changelog": "^2.2.0", "lint-staged": "^12.1.2", @@ -2072,14 +2072,14 @@ } }, "node_modules/@jest/core": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz", - "integrity": "sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.4.tgz", + "integrity": "sha512-xBNPVqYAdAiAMXnb4ugx9Cdmr0S52lBsLbQMR/sGBRO0810VSPKiuSDtuup6qdkK1e9vxbv3KK3IAP1QFAp8mw==", "dependencies": { "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.2", + "@jest/reporters": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -2088,15 +2088,15 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.3", - "jest-haste-map": "^27.4.2", + "jest-config": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-resolve-dependencies": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-resolve-dependencies": "^27.4.4", + "jest-runner": "^27.4.4", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "jest-watcher": "^27.4.2", @@ -2129,9 +2129,9 @@ } }, "node_modules/@jest/environment": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", - "integrity": "sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", + "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", "dependencies": { "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", @@ -2159,11 +2159,11 @@ } }, "node_modules/@jest/globals": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz", - "integrity": "sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", + "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", "dependencies": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/types": "^27.4.2", "expect": "^27.4.2" }, @@ -2172,14 +2172,14 @@ } }, "node_modules/@jest/reporters": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz", - "integrity": "sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.4.tgz", + "integrity": "sha512-ssyJSw9B9Awb1QaxDhIPSs4de1b7SE2kv7tqFehQL13xpn5HUkMYZK/ufTOXiCAnXFOZS+XDl1GaQ/LmJAzI1A==", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^27.4.2", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -2192,10 +2192,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-haste-map": "^27.4.4", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -2256,23 +2256,23 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz", - "integrity": "sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.4.tgz", + "integrity": "sha512-mCh+d4JTGTtX7vr13d7q2GHJy33nAobEwtEJ8X3u7R8+0ImVO2eAsQzsLfX8lyvdYHBxYABhqbYuaUNo42/pQw==", "dependencies": { "@jest/test-result": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-runtime": "^27.4.2" + "jest-haste-map": "^27.4.4", + "jest-runtime": "^27.4.4" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/transform": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz", - "integrity": "sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.4.tgz", + "integrity": "sha512-7U/nDSrGsGzL7+X8ScNFV71w8u8knJQWSa9C2xsrrKLMOgb+rWuCG4VAyWke/53BU96GnT+Ka81xCAHA5gk6zA==", "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^27.4.2", @@ -2281,7 +2281,7 @@ "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-regex-util": "^27.4.0", "jest-util": "^27.4.2", "micromatch": "^4.0.4", @@ -6385,11 +6385,11 @@ "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==" }, "node_modules/babel-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz", - "integrity": "sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.4.tgz", + "integrity": "sha512-+6RVutZxOQgJkt4svgTHPFtOQlVe9dUg3wrimIAM38pY6hL/nsL8glfFSUjD9jNVjaVjzkCzj6loFFecrjr9Qw==", "dependencies": { - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.0.0", @@ -14429,13 +14429,13 @@ } }, "node_modules/jest": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz", - "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.4.tgz", + "integrity": "sha512-AXwEIFa58Uf1Jno3/KSo5HZZ0/2Xwqvfrz0/3bmTwImkFlbOvz5vARAW9nTrxRLkojjkitaZ1KNKAtw3JRFAaA==", "dependencies": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "import-local": "^3.0.2", - "jest-cli": "^27.4.3" + "jest-cli": "^27.4.4" }, "bin": { "jest": "bin/jest.js" @@ -14466,11 +14466,11 @@ } }, "node_modules/jest-circus": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz", - "integrity": "sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.4.tgz", + "integrity": "sha512-4DWhvQerDq5X4GaqhEUoZiBhuNdKDGr0geW0iJwarbDljAmGaGOErKQG+z2PBr0vgN05z7tsGSY51mdWr8E4xg==", "dependencies": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -14482,8 +14482,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "slash": "^3.0.0", @@ -14495,18 +14495,18 @@ } }, "node_modules/jest-cli": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz", - "integrity": "sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.4.tgz", + "integrity": "sha512-+MfsHnZPUOBigCBURuQFRpgYoPCgmIFkICkqt4SrramZCUp/UAuWcst4pMZb84O3VU8JyKJmnpGG4qH8ClQloA==", "dependencies": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.3", + "jest-config": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "prompts": "^2.0.1", @@ -14528,27 +14528,27 @@ } }, "node_modules/jest-config": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz", - "integrity": "sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.4.tgz", + "integrity": "sha512-6lxg0ugO6KS2zKEbpdDwBzu1IT0Xg4/VhxXMuBu+z/5FvBjLCEMTaWQm3bCaGCZUR9j9FK4DzUIxyhIgn6kVEg==", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.2", + "@jest/test-sequencer": "^27.4.4", "@jest/types": "^27.4.2", - "babel-jest": "^27.4.2", + "babel-jest": "^27.4.4", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.2", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", + "jest-circus": "^27.4.4", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.2", + "jest-jasmine2": "^27.4.4", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-runner": "^27.4.3", + "jest-resolve": "^27.4.4", + "jest-runner": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "micromatch": "^4.0.4", @@ -14613,11 +14613,11 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz", - "integrity": "sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", + "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", "dependencies": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -14630,11 +14630,11 @@ } }, "node_modules/jest-environment-node": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz", - "integrity": "sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", + "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", "dependencies": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -14664,9 +14664,9 @@ } }, "node_modules/jest-haste-map": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz", - "integrity": "sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.4.tgz", + "integrity": "sha512-kvspmHmgPIZoDaqUsvsJFTaspuxhATvdO6wsFNGNSi8kfdiOCEEvECNbht8xG+eE5Ol88JyJmp2D7RF4dYo85Q==", "dependencies": { "@jest/types": "^27.4.2", "@types/graceful-fs": "^4.1.2", @@ -14677,7 +14677,7 @@ "jest-regex-util": "^27.4.0", "jest-serializer": "^27.4.0", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "micromatch": "^4.0.4", "walker": "^1.0.7" }, @@ -14689,12 +14689,12 @@ } }, "node_modules/jest-jasmine2": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz", - "integrity": "sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.4.tgz", + "integrity": "sha512-ygk2tUgtLeN3ouj4KEYw9p81GLI1EKrnvourPULN5gdgB482PH5op9gqaRG0IenbJhBbbRwiSvh5NoBoQZSqdA==", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", @@ -14706,8 +14706,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "throat": "^6.0.1" @@ -14798,14 +14798,14 @@ } }, "node_modules/jest-resolve": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz", - "integrity": "sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.4.tgz", + "integrity": "sha512-Yh5jK3PBmDbm01Rc8pT0XqpBlTPEGwWp7cN61ijJuwony/tR2Taof3TLy6yfNiuRS8ucUOPO7NBYm3ei38kkcg==", "dependencies": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", @@ -14818,27 +14818,27 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz", - "integrity": "sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.4.tgz", + "integrity": "sha512-iAnpCXh81sd9nbyqySvm5/aV9X6JZKE0dQyFXTC8tptXcdrgS0vjPFy+mEgzPHxXw+tq4TQupuTa0n8OXwRIxw==", "dependencies": { "@jest/types": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.2" + "jest-snapshot": "^27.4.4" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-runner": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz", - "integrity": "sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.4.tgz", + "integrity": "sha512-AXv/8Q0Xf1puWnDf52m7oLrK7sXcv6re0V/kItwTSVHJbX7Oebm07oGFQqGmq0R0mhO1zpmB3OpqRuaCN2elPA==", "dependencies": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -14846,15 +14846,15 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-haste-map": "^27.4.2", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-leak-detector": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-runtime": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-runtime": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "source-map-support": "^0.5.6", "throat": "^6.0.1" }, @@ -14863,16 +14863,16 @@ } }, "node_modules/jest-runtime": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz", - "integrity": "sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.4.tgz", + "integrity": "sha512-tZGay6P6vXJq8t4jVFAUzYHx+lzIHXjz+rj1XBk6mAR1Lwtf5kz0Uun7qNuU+oqpZu4+hhuxpUfXb6j30bEPqA==", "dependencies": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/globals": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/globals": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/yargs": "^16.0.0", "chalk": "^4.0.0", @@ -14882,12 +14882,12 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-mock": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "slash": "^3.0.0", @@ -14911,9 +14911,9 @@ } }, "node_modules/jest-snapshot": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz", - "integrity": "sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.4.tgz", + "integrity": "sha512-yy+rpCvYMOjTl7IMuaMI9OP9WT229zi8BhdNHm6e6mttAOIzvIiCxFoZ6yRxaV3HDPPgMryi+ReX2b8+IQJdPA==", "dependencies": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -14921,7 +14921,7 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", @@ -14931,10 +14931,10 @@ "graceful-fs": "^4.2.4", "jest-diff": "^27.4.2", "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", "natural-compare": "^1.4.0", "pretty-format": "^27.4.2", @@ -15092,9 +15092,9 @@ } }, "node_modules/jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz", + "integrity": "sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -25915,7 +25915,7 @@ "license": "MIT", "devDependencies": { "babel-plugin-tester": "^10.1.0", - "jest": "^27.4.3" + "jest": "^27.4.4" }, "peerDependencies": { "@babel/core": "^7.1.0" @@ -25947,7 +25947,7 @@ "version": "1.0.10", "license": "MIT", "devDependencies": { - "jest": "^27.4.3" + "jest": "^27.4.4" } }, "packages/cra-template": { @@ -25985,7 +25985,7 @@ }, "devDependencies": { "cross-env": "^7.0.3", - "jest": "^27.4.3" + "jest": "^27.4.4" }, "engines": { "node": ">=14" @@ -26077,7 +26077,7 @@ }, "devDependencies": { "cross-env": "^7.0.3", - "jest": "^27.4.3" + "jest": "^27.4.4" }, "engines": { "node": ">=14" @@ -26108,7 +26108,7 @@ "eslint-config-react-app": "^6.0.0", "flow-bin": "^0.116.0", "html-entities": "^2.3.2", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-fetch-mock": "^3.0.3", "object-assign": "^4.1.1", "promise": "^8.1.0", @@ -26155,7 +26155,7 @@ "fs-extra": "^10.0.0", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", "mini-css-extract-plugin": "^2.4.5", @@ -27608,14 +27608,14 @@ } }, "@jest/core": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz", - "integrity": "sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.4.tgz", + "integrity": "sha512-xBNPVqYAdAiAMXnb4ugx9Cdmr0S52lBsLbQMR/sGBRO0810VSPKiuSDtuup6qdkK1e9vxbv3KK3IAP1QFAp8mw==", "requires": { "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.2", + "@jest/reporters": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -27624,15 +27624,15 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.3", - "jest-haste-map": "^27.4.2", + "jest-config": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-resolve-dependencies": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-resolve-dependencies": "^27.4.4", + "jest-runner": "^27.4.4", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "jest-watcher": "^27.4.2", @@ -27651,9 +27651,9 @@ } }, "@jest/environment": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", - "integrity": "sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", + "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", "requires": { "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", @@ -27675,24 +27675,24 @@ } }, "@jest/globals": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz", - "integrity": "sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", + "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/types": "^27.4.2", "expect": "^27.4.2" } }, "@jest/reporters": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz", - "integrity": "sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.4.tgz", + "integrity": "sha512-ssyJSw9B9Awb1QaxDhIPSs4de1b7SE2kv7tqFehQL13xpn5HUkMYZK/ufTOXiCAnXFOZS+XDl1GaQ/LmJAzI1A==", "requires": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^27.4.2", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -27705,10 +27705,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-haste-map": "^27.4.4", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -27751,20 +27751,20 @@ } }, "@jest/test-sequencer": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz", - "integrity": "sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.4.tgz", + "integrity": "sha512-mCh+d4JTGTtX7vr13d7q2GHJy33nAobEwtEJ8X3u7R8+0ImVO2eAsQzsLfX8lyvdYHBxYABhqbYuaUNo42/pQw==", "requires": { "@jest/test-result": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-runtime": "^27.4.2" + "jest-haste-map": "^27.4.4", + "jest-runtime": "^27.4.4" } }, "@jest/transform": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz", - "integrity": "sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.4.tgz", + "integrity": "sha512-7U/nDSrGsGzL7+X8ScNFV71w8u8knJQWSa9C2xsrrKLMOgb+rWuCG4VAyWke/53BU96GnT+Ka81xCAHA5gk6zA==", "requires": { "@babel/core": "^7.1.0", "@jest/types": "^27.4.2", @@ -27773,7 +27773,7 @@ "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-regex-util": "^27.4.0", "jest-util": "^27.4.2", "micromatch": "^4.0.4", @@ -30957,11 +30957,11 @@ "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==" }, "babel-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz", - "integrity": "sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.4.tgz", + "integrity": "sha512-+6RVutZxOQgJkt4svgTHPFtOQlVe9dUg3wrimIAM38pY6hL/nsL8glfFSUjD9jNVjaVjzkCzj6loFFecrjr9Qw==", "requires": { - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.0.0", @@ -31061,7 +31061,7 @@ "version": "file:packages/babel-plugin-named-asset-import", "requires": { "babel-plugin-tester": "^10.1.0", - "jest": "^27.4.3" + "jest": "^27.4.4" } }, "babel-plugin-polyfill-corejs2": { @@ -32370,7 +32370,7 @@ "confusing-browser-globals": { "version": "file:packages/confusing-browser-globals", "requires": { - "jest": "^27.4.3" + "jest": "^27.4.4" } }, "connect-history-api-fallback": { @@ -33057,7 +33057,7 @@ "envinfo": "^7.8.1", "fs-extra": "^10.0.0", "hyperquest": "^2.1.3", - "jest": "^27.4.3", + "jest": "^27.4.4", "prompts": "^2.4.2", "semver": "^7.3.5", "tar-pack": "^3.4.1", @@ -37039,13 +37039,13 @@ } }, "jest": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz", - "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.4.tgz", + "integrity": "sha512-AXwEIFa58Uf1Jno3/KSo5HZZ0/2Xwqvfrz0/3bmTwImkFlbOvz5vARAW9nTrxRLkojjkitaZ1KNKAtw3JRFAaA==", "requires": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "import-local": "^3.0.2", - "jest-cli": "^27.4.3" + "jest-cli": "^27.4.4" } }, "jest-changed-files": { @@ -37059,11 +37059,11 @@ } }, "jest-circus": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz", - "integrity": "sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.4.tgz", + "integrity": "sha512-4DWhvQerDq5X4GaqhEUoZiBhuNdKDGr0geW0iJwarbDljAmGaGOErKQG+z2PBr0vgN05z7tsGSY51mdWr8E4xg==", "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -37075,8 +37075,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "slash": "^3.0.0", @@ -37085,18 +37085,18 @@ } }, "jest-cli": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz", - "integrity": "sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.4.tgz", + "integrity": "sha512-+MfsHnZPUOBigCBURuQFRpgYoPCgmIFkICkqt4SrramZCUp/UAuWcst4pMZb84O3VU8JyKJmnpGG4qH8ClQloA==", "requires": { - "@jest/core": "^27.4.3", + "@jest/core": "^27.4.4", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.3", + "jest-config": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "prompts": "^2.0.1", @@ -37104,27 +37104,27 @@ } }, "jest-config": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz", - "integrity": "sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.4.tgz", + "integrity": "sha512-6lxg0ugO6KS2zKEbpdDwBzu1IT0Xg4/VhxXMuBu+z/5FvBjLCEMTaWQm3bCaGCZUR9j9FK4DzUIxyhIgn6kVEg==", "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.2", + "@jest/test-sequencer": "^27.4.4", "@jest/types": "^27.4.2", - "babel-jest": "^27.4.2", + "babel-jest": "^27.4.4", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.2", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", + "jest-circus": "^27.4.4", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.2", + "jest-jasmine2": "^27.4.4", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-runner": "^27.4.3", + "jest-resolve": "^27.4.4", + "jest-runner": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "micromatch": "^4.0.4", @@ -37171,11 +37171,11 @@ } }, "jest-environment-jsdom": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz", - "integrity": "sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", + "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -37185,11 +37185,11 @@ } }, "jest-environment-node": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz", - "integrity": "sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", + "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", "requires": { - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/fake-timers": "^27.4.2", "@jest/types": "^27.4.2", "@types/node": "*", @@ -37213,9 +37213,9 @@ "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==" }, "jest-haste-map": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz", - "integrity": "sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.4.tgz", + "integrity": "sha512-kvspmHmgPIZoDaqUsvsJFTaspuxhATvdO6wsFNGNSi8kfdiOCEEvECNbht8xG+eE5Ol88JyJmp2D7RF4dYo85Q==", "requires": { "@jest/types": "^27.4.2", "@types/graceful-fs": "^4.1.2", @@ -37227,18 +37227,18 @@ "jest-regex-util": "^27.4.0", "jest-serializer": "^27.4.0", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "micromatch": "^4.0.4", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz", - "integrity": "sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.4.tgz", + "integrity": "sha512-ygk2tUgtLeN3ouj4KEYw9p81GLI1EKrnvourPULN5gdgB482PH5op9gqaRG0IenbJhBbbRwiSvh5NoBoQZSqdA==", "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", "@jest/types": "^27.4.2", @@ -37250,8 +37250,8 @@ "jest-each": "^27.4.2", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-runtime": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "pretty-format": "^27.4.2", "throat": "^6.0.1" @@ -37314,14 +37314,14 @@ "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==" }, "jest-resolve": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz", - "integrity": "sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.4.tgz", + "integrity": "sha512-Yh5jK3PBmDbm01Rc8pT0XqpBlTPEGwWp7cN61ijJuwony/tR2Taof3TLy6yfNiuRS8ucUOPO7NBYm3ei38kkcg==", "requires": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", @@ -37331,24 +37331,24 @@ } }, "jest-resolve-dependencies": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz", - "integrity": "sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.4.tgz", + "integrity": "sha512-iAnpCXh81sd9nbyqySvm5/aV9X6JZKE0dQyFXTC8tptXcdrgS0vjPFy+mEgzPHxXw+tq4TQupuTa0n8OXwRIxw==", "requires": { "@jest/types": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.2" + "jest-snapshot": "^27.4.4" } }, "jest-runner": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz", - "integrity": "sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.4.tgz", + "integrity": "sha512-AXv/8Q0Xf1puWnDf52m7oLrK7sXcv6re0V/kItwTSVHJbX7Oebm07oGFQqGmq0R0mhO1zpmB3OpqRuaCN2elPA==", "requires": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", + "@jest/environment": "^27.4.4", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -37356,30 +37356,30 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-haste-map": "^27.4.2", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-haste-map": "^27.4.4", "jest-leak-detector": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-runtime": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-runtime": "^27.4.4", "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "jest-worker": "^27.4.4", "source-map-support": "^0.5.6", "throat": "^6.0.1" } }, "jest-runtime": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz", - "integrity": "sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.4.tgz", + "integrity": "sha512-tZGay6P6vXJq8t4jVFAUzYHx+lzIHXjz+rj1XBk6mAR1Lwtf5kz0Uun7qNuU+oqpZu4+hhuxpUfXb6j30bEPqA==", "requires": { "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/globals": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/globals": "^27.4.4", "@jest/source-map": "^27.4.0", "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/yargs": "^16.0.0", "chalk": "^4.0.0", @@ -37389,12 +37389,12 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-message-util": "^27.4.2", "jest-mock": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-snapshot": "^27.4.2", + "jest-resolve": "^27.4.4", + "jest-snapshot": "^27.4.4", "jest-util": "^27.4.2", "jest-validate": "^27.4.2", "slash": "^3.0.0", @@ -37412,9 +37412,9 @@ } }, "jest-snapshot": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz", - "integrity": "sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.4.tgz", + "integrity": "sha512-yy+rpCvYMOjTl7IMuaMI9OP9WT229zi8BhdNHm6e6mttAOIzvIiCxFoZ6yRxaV3HDPPgMryi+ReX2b8+IQJdPA==", "requires": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -37422,7 +37422,7 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.2", + "@jest/transform": "^27.4.4", "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", @@ -37432,10 +37432,10 @@ "graceful-fs": "^4.2.4", "jest-diff": "^27.4.2", "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.2", + "jest-haste-map": "^27.4.4", "jest-matcher-utils": "^27.4.2", "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", + "jest-resolve": "^27.4.4", "jest-util": "^27.4.2", "natural-compare": "^1.4.0", "pretty-format": "^27.4.2", @@ -37548,9 +37548,9 @@ } }, "jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz", + "integrity": "sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==", "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -41158,7 +41158,7 @@ "gzip-size": "^6.0.0", "immer": "^9.0.7", "is-root": "^2.1.0", - "jest": "^27.4.3", + "jest": "^27.4.4", "loader-utils": "^3.2.0", "open": "^8.4.0", "pkg-up": "^3.1.0", @@ -41204,7 +41204,7 @@ "eslint-config-react-app": "^6.0.0", "flow-bin": "^0.116.0", "html-entities": "^2.3.2", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-fetch-mock": "^3.0.3", "object-assign": "^4.1.1", "promise": "^8.1.0", @@ -41260,7 +41260,7 @@ "fsevents": "^2.3.2", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", "mini-css-extract-plugin": "^2.4.5", diff --git a/package.json b/package.json index 5239056db7f..a0946873027 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "get-port": "^5.1.1", "globby": "^11.0.4", "husky": "^4.3.8", - "jest": "^27.4.3", + "jest": "^27.4.4", "lerna": "^4.0.0", "lerna-changelog": "^2.2.0", "lint-staged": "^12.1.2", diff --git a/packages/babel-plugin-named-asset-import/package.json b/packages/babel-plugin-named-asset-import/package.json index d6605a0c787..880d10a7ea6 100644 --- a/packages/babel-plugin-named-asset-import/package.json +++ b/packages/babel-plugin-named-asset-import/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "babel-plugin-tester": "^10.1.0", - "jest": "^27.4.3" + "jest": "^27.4.4" }, "scripts": { "test": "jest" diff --git a/packages/confusing-browser-globals/package.json b/packages/confusing-browser-globals/package.json index a322b96a062..c997e9d9454 100644 --- a/packages/confusing-browser-globals/package.json +++ b/packages/confusing-browser-globals/package.json @@ -20,6 +20,6 @@ "index.js" ], "devDependencies": { - "jest": "^27.4.3" + "jest": "^27.4.4" } } diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index 6c0a6b86b5e..07092fb0d9e 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -42,6 +42,6 @@ }, "devDependencies": { "cross-env": "^7.0.3", - "jest": "^27.4.3" + "jest": "^27.4.4" } } diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index e0177daca1f..a1aa03f4ff4 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -79,7 +79,7 @@ }, "devDependencies": { "cross-env": "^7.0.3", - "jest": "^27.4.3" + "jest": "^27.4.4" }, "scripts": { "test": "cross-env FORCE_COLOR=true jest" diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 1bf95846715..52c23a33af7 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -48,7 +48,7 @@ "eslint-config-react-app": "^6.0.0", "flow-bin": "^0.116.0", "html-entities": "^2.3.2", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-fetch-mock": "^3.0.3", "object-assign": "^4.1.1", "promise": "^8.1.0", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 78c3204f0be..367d79074c1 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -48,7 +48,7 @@ "fs-extra": "^10.0.0", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", - "jest": "^27.4.3", + "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", "mini-css-extract-plugin": "^2.4.5", From 867c0190126d1c512117c81679fe9f74bacd2c21 Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Sat, 11 Dec 2021 12:34:48 +0100 Subject: [PATCH 06/15] Remove unmaintained tar-pack updating tar from v2 to v6 --- package-lock.json | 280 +------------------- packages/create-react-app/createReactApp.js | 19 +- packages/create-react-app/package.json | 2 +- 3 files changed, 17 insertions(+), 284 deletions(-) diff --git a/package-lock.json b/package-lock.json index 06fe20ee8a3..33234b016df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6758,17 +6758,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dependencies": { - "inherits": "~2.0.0" - }, - "engines": { - "node": "0.4 || >=0.5.8" - } - }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -7459,7 +7448,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, "engines": { "node": ">=10" } @@ -11757,7 +11745,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, "dependencies": { "minipass": "^3.0.0" }, @@ -11788,52 +11775,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "dependencies": { - "fstream": "^1.0.0", - "inherits": "2", - "minimatch": "^3.0.0" - } - }, - "node_modules/fstream/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/fstream/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -16639,7 +16580,6 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -16726,7 +16666,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -16739,7 +16678,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -22963,7 +22901,6 @@ "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -22994,83 +22931,6 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, - "node_modules/tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", - "dependencies": { - "debug": "^2.2.0", - "fstream": "^1.0.10", - "fstream-ignore": "^1.0.5", - "once": "^1.3.3", - "readable-stream": "^2.1.4", - "rimraf": "^2.5.1", - "tar": "^2.2.1", - "uid-number": "^0.0.6" - } - }, - "node_modules/tar-pack/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/tar-pack/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "node_modules/tar-pack/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/tar-pack/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/tar-pack/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/tar-pack/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/tar-pack/node_modules/tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "deprecated": "This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.", - "dependencies": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - } - }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -23889,6 +23749,7 @@ "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "dev": true, "engines": { "node": "*" } @@ -25976,7 +25837,7 @@ "hyperquest": "^2.1.3", "prompts": "^2.4.2", "semver": "^7.3.5", - "tar-pack": "^3.4.1", + "tar": "^6.1.11", "tmp": "^0.2.1", "validate-npm-package-name": "^3.0.0" }, @@ -31260,14 +31121,6 @@ } } }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "~2.0.0" - } - }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -31784,8 +31637,7 @@ "chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, "chrome-trace-event": { "version": "1.0.3", @@ -33060,7 +32912,7 @@ "jest": "^27.4.4", "prompts": "^2.4.2", "semver": "^7.3.5", - "tar-pack": "^3.4.1", + "tar": "^6.1.11", "tmp": "^0.2.1", "validate-npm-package-name": "^3.0.0" }, @@ -35058,7 +34910,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, "requires": { "minipass": "^3.0.0" } @@ -35079,45 +34930,6 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "optional": true }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", - "requires": { - "fstream": "^1.0.0", - "inherits": "2", - "minimatch": "^3.0.0" - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -38748,7 +38560,6 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -38815,7 +38626,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -38824,8 +38634,7 @@ "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "mkdirp-classic": { "version": "0.5.3", @@ -43668,7 +43477,6 @@ "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dev": true, "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -43698,81 +43506,6 @@ } } }, - "tar-pack": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", - "requires": { - "debug": "^2.2.0", - "fstream": "^1.0.10", - "fstream-ignore": "^1.0.5", - "once": "^1.3.3", - "readable-stream": "^2.1.4", - "rimraf": "^2.5.1", - "tar": "^2.2.1", - "uid-number": "^0.0.6" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - } - } - } - }, "tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", @@ -44390,7 +44123,8 @@ "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "dev": true }, "umask": { "version": "1.1.0", diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 6a2bb06b76e..10e92efbe96 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -43,7 +43,8 @@ const path = require('path'); const semver = require('semver'); const spawn = require('cross-spawn'); const tmp = require('tmp'); -const unpack = require('tar-pack').unpack; +const tar = require('tar'); +const zlib = require('zlib'); const url = require('url'); const validateProjectName = require('validate-npm-package-name'); @@ -674,15 +675,13 @@ function getTemporaryDirectory() { function extractStream(stream, dest) { return new Promise((resolve, reject) => { - stream.pipe( - unpack(dest, err => { - if (err) { - reject(err); - } else { - resolve(dest); - } - }) - ); + stream + .on('error', reject) + .pipe(zlib.createGunzip()) + .on('error', reject) + .pipe(tar.extract({ strip: 1, C: dest })) + .on('error', reject) + .on('finish', () => resolve(dest)); }); } diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index 07092fb0d9e..49d2b42f58c 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -36,7 +36,7 @@ "hyperquest": "^2.1.3", "prompts": "^2.4.2", "semver": "^7.3.5", - "tar-pack": "^3.4.1", + "tar": "^6.1.11", "tmp": "^0.2.1", "validate-npm-package-name": "^3.0.0" }, From 2af14b965e1554856a184d4a757ea9244f8591db Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Sat, 11 Dec 2021 16:31:37 +0100 Subject: [PATCH 07/15] Load tsconfig or jsconfig as base for swc configuration --- package-lock.json | 4 + .../react-scripts/config/createSwcConfig.js | 172 +++++++++++++----- packages/react-scripts/package.json | 2 + 3 files changed, 137 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33234b016df..6dbb6bb88d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26019,6 +26019,8 @@ "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", + "json5": "^2.2.0", + "lodash.merge": "^4.6.2", "mini-css-extract-plugin": "^2.4.5", "postcss": "^8.4.4", "postcss-flexbugs-fixes": "^5.0.2", @@ -41072,6 +41074,8 @@ "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", + "json5": "^2.2.0", + "lodash.merge": "^4.6.2", "mini-css-extract-plugin": "^2.4.5", "postcss": "^8.4.4", "postcss-flexbugs-fixes": "^5.0.2", diff --git a/packages/react-scripts/config/createSwcConfig.js b/packages/react-scripts/config/createSwcConfig.js index 250b6049323..8da28f23348 100644 --- a/packages/react-scripts/config/createSwcConfig.js +++ b/packages/react-scripts/config/createSwcConfig.js @@ -7,6 +7,11 @@ */ // @remove-on-eject-end 'use strict'; +const fs = require('fs'); +const path = require('path'); +const merge = require('lodash.merge'); +const JSON5 = require('json5'); +const paths = require('./paths'); const hasJsxRuntime = require('./hasJsxRuntime'); module.exports = function createSwcConfig({ @@ -15,50 +20,135 @@ module.exports = function createSwcConfig({ isEnvProduction = false, shouldUseReactRefresh = false, } = {}) { - const env = - isEnvDevelopment | isEnvProduction - ? { - mode: 'entry', - coreJs: 3, - } - : {}; + const projectSwcConfig = mapProjectConfigToSwcConfig(getProjectConfig()); + + const generalOptions = { + jsx: true, + runtime: hasJsxRuntime ? 'automatic' : 'clasic', + sourceMaps: shouldUseSourceMap, + refresh: shouldUseReactRefresh, + useBroserlists: isEnvDevelopment | isEnvProduction, + development: isEnvDevelopment, + }; + return { - ecmascript: { - sourceMaps: shouldUseSourceMap, - jsc: { - externalHelpers: true, - parser: { - jsx: true, - syntax: 'ecmascript', - }, - transform: { - react: { - runtime: hasJsxRuntime ? 'automatic' : 'clasic', - refresh: shouldUseReactRefresh, - development: isEnvDevelopment, - }, - }, + ecmascript: merge( + {}, + projectSwcConfig, + getBaseConfiguration({ + ...generalOptions, + }) + ), + typescript: merge( + {}, + projectSwcConfig, + getBaseConfiguration({ + ...generalOptions, + syntax: 'typescript', + }) + ), + }; +}; + +function getBaseConfiguration({ + runtime = 'clasic', + syntax = 'ecmascript', + jsx = false, + sourceMaps = false, + refresh = false, + useBroserlists = false, + development = false, +}) { + return { + sourceMaps, + jsc: { + parser: { + [syntax === 'typescript' ? 'tsx' : 'jsx']: jsx, + syntax, }, - env, - }, - typescript: { - sourceMaps: shouldUseSourceMap, - jsc: { - externalHelpers: true, - parser: { - tsx: true, - syntax: 'typescript', - development: isEnvDevelopment, - }, - transform: { - react: { - runtime: hasJsxRuntime ? 'automatic' : 'clasic', - refresh: shouldUseReactRefresh, - development: isEnvDevelopment, - }, + transform: { + react: { + runtime, + refresh, + development, }, }, }, - env, + env: useBroserlists + ? { + mode: 'entry', + coreJs: 3, + } + : {}, }; -}; +} + +function mapProjectConfigToSwcConfig(projectConfig = {}) { + const { + compilerOptions: { + target, + importHelpers, + experimentalDecorators, + emitDecoratorMetadata, + baseUrl, + paths, + } = {}, + } = projectConfig; + const result = { jsc: { externalHelpers: true, parser: {}, transform: {} } }; + + if (target != null) { + result.jsc.target = target; + } + if (importHelpers != null) { + result.jsc.externalHelpers = importHelpers; + } + if (experimentalDecorators != null) { + result.jsc.parser.decorators = experimentalDecorators; + } + if (emitDecoratorMetadata != null) { + result.jsc.transform.decoratorMetadata = emitDecoratorMetadata; + } + + if (baseUrl != null) { + result.jsc.baseUrl = baseUrl; + if (paths != null) { + result.jsc.paths = paths; + } + } + + return result; +} + +function getProjectConfig(configPath, loadedPaths = []) { + const configPaths = + configPath != null ? [configPath] : [paths.appTsConfig, paths.appJsConfig]; + const [projectConfigPath] = configPaths.filter(p => fs.existsSync(p)); + if (projectConfigPath == null) { + return {}; + } + if (loadedPaths.includes(projectConfigPath)) { + return {}; + } + try { + const projectConfig = JSON5.parse( + fs.readFileSync(projectConfigPath, 'utf-8') + ); + if (projectConfig.extends != null) { + const baseConfig = path.resolve( + path.dirname(projectConfigPath), + projectConfig.extends.replace('/', path.sep) + ); + delete projectConfig.extends; + return merge( + getProjectConfig(baseConfig, [...loadedPaths, projectConfigPath]), + projectConfig + ); + } + return projectConfig; + } catch (error) { + console.error( + `Error: Failed to load "${projectConfigPath}", error: "${error.message}"` + ); + process.exit(1); + } +} diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 367d79074c1..b159a560158 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -51,6 +51,8 @@ "jest": "^27.4.4", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", + "json5": "^2.2.0", + "lodash.merge": "^4.6.2", "mini-css-extract-plugin": "^2.4.5", "postcss": "^8.4.4", "postcss-flexbugs-fixes": "^5.0.2", From d42aed5c95641f794af5c9c89fba8cf1dd294263 Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Sat, 11 Dec 2021 18:01:57 +0100 Subject: [PATCH 08/15] Fix swc browserslist setting path=paths.appPath did not work https://swc.rs/docs/configuration/supported-browsers#path Also enabled requre resolve to allow extending from packages --- .../react-scripts/config/createSwcConfig.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/react-scripts/config/createSwcConfig.js b/packages/react-scripts/config/createSwcConfig.js index 8da28f23348..7972b771136 100644 --- a/packages/react-scripts/config/createSwcConfig.js +++ b/packages/react-scripts/config/createSwcConfig.js @@ -13,6 +13,9 @@ const merge = require('lodash.merge'); const JSON5 = require('json5'); const paths = require('./paths'); const hasJsxRuntime = require('./hasJsxRuntime'); +const browserslist = require('browserslist'); + +const targets = browserslist.loadConfig({ path: paths.appPath }); module.exports = function createSwcConfig({ shouldUseSourceMap = true, @@ -27,7 +30,7 @@ module.exports = function createSwcConfig({ runtime: hasJsxRuntime ? 'automatic' : 'clasic', sourceMaps: shouldUseSourceMap, refresh: shouldUseReactRefresh, - useBroserlists: isEnvDevelopment | isEnvProduction, + useBrowserslist: isEnvDevelopment | isEnvProduction, development: isEnvDevelopment, }; @@ -56,7 +59,7 @@ function getBaseConfiguration({ jsx = false, sourceMaps = false, refresh = false, - useBroserlists = false, + useBrowserslist = false, development = false, }) { return { @@ -74,8 +77,9 @@ function getBaseConfiguration({ }, }, }, - env: useBroserlists + env: useBrowserslist ? { + targets, mode: 'entry', coreJs: 3, } @@ -134,10 +138,9 @@ function getProjectConfig(configPath, loadedPaths = []) { fs.readFileSync(projectConfigPath, 'utf-8') ); if (projectConfig.extends != null) { - const baseConfig = path.resolve( - path.dirname(projectConfigPath), - projectConfig.extends.replace('/', path.sep) - ); + const baseConfig = require.resolve(projectConfig.extends, { + paths: [path.dirname(projectConfigPath)], + }); delete projectConfig.extends; return merge( getProjectConfig(baseConfig, [...loadedPaths, projectConfigPath]), From a8aa2540e7a6e27e87ddc56be438376bd7742e65 Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Mon, 13 Dec 2021 21:21:19 +0100 Subject: [PATCH 09/15] Revert "Breaking: Remove support for Flow" This reverts commit 6f9083bf84c5edff5c70e86d5ec4a2073c0b098b. --- README.md | 2 +- docusaurus/docs/adding-a-sass-stylesheet.md | 12 ++++++++ docusaurus/docs/adding-flow.md | 28 +++++++++++++++++++ .../proxying-api-requests-in-development.md | 6 ++-- .../docs/supported-browsers-features.md | 2 +- docusaurus/website/sidebars.json | 1 + .../react-scripts/config/webpack.config.js | 2 +- .../src/features/syntax/AsyncAwait.js | 10 +++++++ 8 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 docusaurus/docs/adding-flow.md diff --git a/README.md b/README.md index 3f063c8e0d1..71c6485a16b 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Please refer to the [User Guide](https://facebook.github.io/create-react-app/doc Your environment will have everything you need to build a modern single-page React app: -- React, JSX, ES6 and TypeScript syntax support. +- React, JSX, ES6, TypeScript and Flow syntax support. - Language extras beyond ES6 like the object spread operator. - Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes. - A fast interactive unit test runner with built-in support for coverage reporting. diff --git a/docusaurus/docs/adding-a-sass-stylesheet.md b/docusaurus/docs/adding-a-sass-stylesheet.md index 825702b6744..5a287294155 100644 --- a/docusaurus/docs/adding-a-sass-stylesheet.md +++ b/docusaurus/docs/adding-a-sass-stylesheet.md @@ -44,6 +44,18 @@ To use imports relative to a path you specify, you can add a [`.env` file](https > **Tip:** You can opt into using this feature with [CSS modules](adding-a-css-modules-stylesheet.md) too! +> **Note:** If you're using Flow, override the [module.file_ext](https://flow.org/en/docs/config/options/#toc-module-file-ext-string) setting in your `.flowconfig` so it'll recognize `.sass` or `.scss` files. You will also need to include the `module.file_ext` default settings for `.js`, `.jsx`, `.mjs` and `.json` files. +> +> ``` +> [options] +> module.file_ext=.js +> module.file_ext=.jsx +> module.file_ext=.mjs +> module.file_ext=.json +> module.file_ext=.sass +> module.file_ext=.scss +> ``` + > **Note:** LibSass and the packages built on top of it, including Node Sass, are [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). > If you're a user of Node Sass, you can migrate to Dart Sass by replacing `node-sass` in your `package.json` file with `sass` or by running the following commands: > diff --git a/docusaurus/docs/adding-flow.md b/docusaurus/docs/adding-flow.md new file mode 100644 index 00000000000..321605261e9 --- /dev/null +++ b/docusaurus/docs/adding-flow.md @@ -0,0 +1,28 @@ +--- +id: adding-flow +title: Adding Flow +--- + +Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. + +Recent versions of [Flow](https://flow.org/) work with Create React App projects out of the box. + +To add Flow to a Create React App project, follow these steps: + +1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flow.org/en/docs/config/) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). + +Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. +You can optionally enable an extension for your IDE, such as [Flow Language Support](https://github.com/flowtype/flow-for-vscode) for Visual Studio Code, or leverage the Language Server Protocol standard (e.g. [vim LSP](https://github.com/prabirshrestha/vim-lsp/wiki/Servers-Flow)) to get hints while you type. + +If you'd like to use [absolute imports](/docs/importing-a-component#absolute-imports) with Flow, +make sure to add the following line to your `.flowconfig` to make Flow aware of it: + +```diff + [options] ++ module.name_mapper='^\([^\.].*\)$' -> '/src/\1' +``` + +To learn more about Flow, check out [its documentation](https://flow.org/). diff --git a/docusaurus/docs/proxying-api-requests-in-development.md b/docusaurus/docs/proxying-api-requests-in-development.md index 8f145750b00..66563e25e45 100644 --- a/docusaurus/docs/proxying-api-requests-in-development.md +++ b/docusaurus/docs/proxying-api-requests-in-development.md @@ -87,7 +87,7 @@ Next, create `src/setupProxy.js` and place the following contents in it: ```js const { createProxyMiddleware } = require('http-proxy-middleware'); -module.exports = function (app) { +module.exports = function(app) { // ... }; ``` @@ -97,7 +97,7 @@ You can now register proxies as you wish! Here's an example using the above `htt ```js const { createProxyMiddleware } = require('http-proxy-middleware'); -module.exports = function (app) { +module.exports = function(app) { app.use( '/api', createProxyMiddleware({ @@ -110,6 +110,6 @@ module.exports = function (app) { > **Note:** You do not need to import this file anywhere. It is automatically registered when you start the development server. -> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for ES Modules, etc). +> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc). > **Note:** Passing the path to the proxy function allows you to use globbing and/or pattern matching on the path, which is more flexible than the express route matching. diff --git a/docusaurus/docs/supported-browsers-features.md b/docusaurus/docs/supported-browsers-features.md index dc801d38b11..d104c19a0c5 100644 --- a/docusaurus/docs/supported-browsers-features.md +++ b/docusaurus/docs/supported-browsers-features.md @@ -17,7 +17,7 @@ This project supports a superset of the latest JavaScript standard. In addition - [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread) (ES2018). - [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 4 proposal) - [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). -- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [TypeScript](./adding-typescript). +- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html), [Flow](./adding-flow) and [TypeScript](./adding-typescript). Learn more about [different proposal stages](https://tc39.github.io/process-document/). diff --git a/docusaurus/website/sidebars.json b/docusaurus/website/sidebars.json index 5d5e9898949..386a29da1bf 100644 --- a/docusaurus/website/sidebars.json +++ b/docusaurus/website/sidebars.json @@ -30,6 +30,7 @@ "importing-a-component", "using-global-variables", "adding-bootstrap", + "adding-flow", "adding-typescript", "adding-relay", "adding-a-router", diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 777127f14c3..2b3405873c4 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -371,7 +371,7 @@ module.exports = function (webpackEnv) { }, }, // Process application JS with swc. - // The preset includes JSX, TypeScript, and some ESnext features. + // The preset includes JSX, Flow, TypeScript, and some ESnext features. { test: /\.(js|mjs|jsx)$/, include: paths.appSrc, diff --git a/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js b/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js index 1dcac672c8c..f098b3f3629 100644 --- a/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js +++ b/packages/react-scripts/fixtures/kitchensink/template/src/features/syntax/AsyncAwait.js @@ -17,6 +17,16 @@ async function load() { ]; } +/* eslint-disable */ +// Regression test for https://github.com/facebook/create-react-app/issues/3055 +const x = async ( + /* prettier-ignore */ + y: void +) => { + const z = await y; +}; +/* eslint-enable */ + export default class AsyncAwait extends Component { static propTypes = { onReady: PropTypes.func.isRequired, From 11bf2c9e6ac74f29104f35f57a3c4fc0d002d6f6 Mon Sep 17 00:00:00 2001 From: "Morten N.O. Henriksen" Date: Mon, 13 Dec 2021 22:41:29 +0100 Subject: [PATCH 10/15] Add babel back and hide swc under flag --- docusaurus/docs/advanced-configuration.md | 5 +- package-lock.json | 438 +++++++++--------- .../config/jest/babelTransform.js | 25 + .../react-scripts/config/webpack.config.js | 54 ++- .../config/webpack/loaders/code/babel.js | 108 +++++ .../loaders/code}/createSwcConfig.js | 4 +- .../config/webpack/loaders/code/swc.js | 46 ++ .../fixtures/kitchensink/template/README.md | 2 +- .../template/jest.integration.config.js | 8 +- .../kitchensink/template/jest.transform.js | 5 + packages/react-scripts/package.json | 5 + packages/react-scripts/scripts/build.js | 1 + packages/react-scripts/scripts/eject.js | 7 + packages/react-scripts/scripts/start.js | 1 + packages/react-scripts/scripts/test.js | 1 + .../scripts/utils/createJestConfig.js | 22 +- 16 files changed, 467 insertions(+), 265 deletions(-) create mode 100644 packages/react-scripts/config/jest/babelTransform.js create mode 100644 packages/react-scripts/config/webpack/loaders/code/babel.js rename packages/react-scripts/config/{ => webpack/loaders/code}/createSwcConfig.js (97%) create mode 100644 packages/react-scripts/config/webpack/loaders/code/swc.js create mode 100644 packages/react-scripts/fixtures/kitchensink/template/jest.transform.js diff --git a/docusaurus/docs/advanced-configuration.md b/docusaurus/docs/advanced-configuration.md index 34144ce6040..cd7c20339dc 100644 --- a/docusaurus/docs/advanced-configuration.md +++ b/docusaurus/docs/advanced-configuration.md @@ -15,7 +15,7 @@ You can adjust various development and production settings by setting environmen | PORT | βœ… Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. | | HTTPS | βœ… Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. | | WDS_SOCKET_HOST | βœ… Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket hostname for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.hostname` for the SockJS hostname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockhost) for more details. | -| WDS_SOCKET_PATH | βœ… Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/ws` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. | +| WDS_SOCKET_PATH | βœ… Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/ws` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. | | WDS_SOCKET_PORT | βœ… Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket port for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.port` for the SockJS port. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockport) for more details. | | PUBLIC_URL | βœ… Used | βœ… Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. | | BUILD_PATH | 🚫 Ignored | βœ… Used | By default, Create React App will output compiled assets to a `/build` directory adjacent to your `/src`. You may use this variable to specify a new path for Create React App to output assets. BUILD_PATH should be specified as a path relative to the root of your project. | @@ -24,9 +24,10 @@ You can adjust various development and production settings by setting environmen | CHOKIDAR_USEPOLLING | βœ… Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. | | GENERATE_SOURCEMAP | 🚫 Ignored | βœ… Used | When set to `false`, source maps are not generated for a production build. This solves out of memory (OOM) issues on some smaller machines. | | INLINE_RUNTIME_CHUNK | 🚫 Ignored | βœ… Used | By default, Create React App will embed the runtime script into `index.html` during the production build. When set to `false`, the script will not be embedded and will be imported as usual. This is normally required when dealing with CSP. | -| IMAGE_INLINE_SIZE_LIMIT | βœ… Used | βœ… Used | By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to `0` will disable the inlining of images. | +| IMAGE_INLINE_SIZE_LIMIT | βœ… Used | βœ… Used | By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to `0` will disable the inlining of images. | | FAST_REFRESH | βœ… Used | 🚫 Ignored | When set to `false`, disables experimental support for Fast Refresh to allow you to tweak your components in real time without reloading the page. | | TSC_COMPILE_ON_ERROR | βœ… Used | βœ… Used | When set to `true`, you can run and properly build TypeScript projects even if there are TypeScript type check errors. These errors are printed as warnings in the terminal and/or browser console. | | ESLINT_NO_DEV_ERRORS | βœ… Used | 🚫 Ignored | When set to `true`, ESLint errors are converted to warnings during development. As a result, ESLint output will no longer appear in the error overlay. | | DISABLE_ESLINT_PLUGIN | βœ… Used | βœ… Used | When set to `true`, [eslint-webpack-plugin](https://github.com/webpack-contrib/eslint-webpack-plugin) will be completely disabled. | | DISABLE_NEW_JSX_TRANSFORM | βœ… Used | βœ… Used | When set to `true`, disables the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) introduced in React 17 and backported to React 16.14.0, 15.7.0, and 0.14.10. New projects will use a version of React that supports this by default but you may need to disable it in existing projects if you can't upgrade React. | +| SWC_TRANSFORM | βœ… Used | βœ… Used | When set to `true`, enables [SWC](https://swc.rs/) - We are evaluating and taking feedback on this experimental feature. Note that `Flow` is currently not supported but might be later on [Strip flow types](https://github.com/swc-project/swc/issues/256) React. | diff --git a/package-lock.json b/package-lock.json index 6dbb6bb88d3..fca627d14fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6409,7 +6409,6 @@ "version": "8.2.3", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", - "dev": true, "dependencies": { "find-cache-dir": "^3.3.1", "loader-utils": "^1.4.0", @@ -6428,7 +6427,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, "dependencies": { "minimist": "^1.2.0" }, @@ -6440,7 +6438,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -6454,7 +6451,6 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, "dependencies": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", @@ -7935,8 +7931,7 @@ "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "node_modules/compare-func": { "version": "2.0.0", @@ -11459,7 +11454,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -15157,8 +15151,7 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -20802,9 +20795,9 @@ } }, "node_modules/rollup": { - "version": "2.60.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.2.tgz", - "integrity": "sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==", + "version": "2.61.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", + "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", "bin": { "rollup": "dist/bin/rollup" }, @@ -25122,28 +25115,28 @@ "dev": true }, "node_modules/workbox-background-sync": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.4.1.tgz", - "integrity": "sha512-GiDklRhDF/oJ+WJhb6jO00wA+fjOZlY4SomqpumXP6OXp1WodmKu7xv75hpum0Kx4Fh3MZrj+9Ae+dIYlq21dA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.4.2.tgz", + "integrity": "sha512-P7c8uG5X2k+DMICH9xeSA9eUlCOjHHYoB42Rq+RtUpuwBxUOflAXR1zdsMWj81LopE4gjKXlTw7BFd1BDAHo7g==", "dependencies": { "idb": "^6.1.4", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-broadcast-update": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.4.1.tgz", - "integrity": "sha512-oz1WAEppIatucgIc49zXPsyQG6004eoKsyiJVGDyN94LIFpUDfGa+cykN32X0PaqOC9bdlj+4EjVBi0OuwkIHA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.4.2.tgz", + "integrity": "sha512-qnBwQyE0+PWFFc/n4ISXINE49m44gbEreJUYt2ldGH3+CNrLmJ1egJOOyUqqu9R4Eb7QrXcmB34ClXG7S37LbA==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-build": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.4.1.tgz", - "integrity": "sha512-cvH74tEO8SrziFrCntZ/35B0uaMZFKG+gnk3vZmKLSUTab/6MlhL+UwYXf1sMV5SD/W/v7pnFKZbdAOAg5Ne2w==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.4.2.tgz", + "integrity": "sha512-WMdYLhDIsuzViOTXDH+tJ1GijkFp5khSYolnxR/11zmfhNDtuo7jof72xPGFy+KRpsz6tug39RhivCj77qqO0w==", "dependencies": { - "@apideck/better-ajv-errors": "^0.2.7", + "@apideck/better-ajv-errors": "^0.3.1", "@babel/core": "^7.11.1", "@babel/preset-env": "^7.11.0", "@babel/runtime": "^7.11.2", @@ -25166,32 +25159,32 @@ "strip-comments": "^2.0.1", "tempy": "^0.6.0", "upath": "^1.2.0", - "workbox-background-sync": "6.4.1", - "workbox-broadcast-update": "6.4.1", - "workbox-cacheable-response": "6.4.1", - "workbox-core": "6.4.1", - "workbox-expiration": "6.4.1", - "workbox-google-analytics": "6.4.1", - "workbox-navigation-preload": "6.4.1", - "workbox-precaching": "6.4.1", - "workbox-range-requests": "6.4.1", - "workbox-recipes": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1", - "workbox-streams": "6.4.1", - "workbox-sw": "6.4.1", - "workbox-window": "6.4.1" + "workbox-background-sync": "6.4.2", + "workbox-broadcast-update": "6.4.2", + "workbox-cacheable-response": "6.4.2", + "workbox-core": "6.4.2", + "workbox-expiration": "6.4.2", + "workbox-google-analytics": "6.4.2", + "workbox-navigation-preload": "6.4.2", + "workbox-precaching": "6.4.2", + "workbox-range-requests": "6.4.2", + "workbox-recipes": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2", + "workbox-streams": "6.4.2", + "workbox-sw": "6.4.2", + "workbox-window": "6.4.2" }, "engines": { "node": ">=10.0.0" } }, "node_modules/workbox-build/node_modules/@apideck/better-ajv-errors": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.2.7.tgz", - "integrity": "sha512-J2dW+EHYudbwI7MGovcHWLBrxasl21uuroc2zT8bH2RxYuv2g5GqsO5jcKUZz4LaMST45xhKjVuyRYkhcWyMhA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.1.tgz", + "integrity": "sha512-6RMV31esAxqlDIvVCG/CJxY/s8dFNVOI5w8RWIfDMhjg/iwqnawko9tJXau/leqC4+T1Bu8et99QVWCwU5wk+g==", "dependencies": { - "json-schema": "^0.3.0", + "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" }, @@ -25231,11 +25224,6 @@ "node": ">=10" } }, - "node_modules/workbox-build/node_modules/json-schema": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.3.0.tgz", - "integrity": "sha512-TYfxx36xfl52Rf1LU9HyWSLGPdYLL+SQ8/E/0yVyKG8wCCDaSrhPap0vEdlsZWRaS6tnKKLPGiEJGiREVC8kxQ==" - }, "node_modules/workbox-build/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -25321,118 +25309,118 @@ } }, "node_modules/workbox-cacheable-response": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.4.1.tgz", - "integrity": "sha512-omXplP3miJhQwx+jfFnqO9xWgNc8CLG6EWRvTyc8R81cA/4zhqh87yj9UVH+fGUmuIXOUBPAuulSazXUsvKFWg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.4.2.tgz", + "integrity": "sha512-9FE1W/cKffk1AJzImxgEN0ceWpyz1tqNjZVtA3/LAvYL3AC5SbIkhc7ZCO82WmO9IjTfu8Vut2X/C7ViMSF7TA==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-core": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.4.1.tgz", - "integrity": "sha512-5hosqpSK+48jHlj+5EHN5dtH1Ade4fqTe4+xX3U9wWK1SDaXEqXpVxdHuBqYfg75UE1PUINA0rhMZWTqeGoLFg==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.4.2.tgz", + "integrity": "sha512-1U6cdEYPcajRXiboSlpJx6U7TvhIKbxRRerfepAJu2hniKwJ3DHILjpU/zx3yvzSBCWcNJDoFalf7Vgd7ey/rw==" }, "node_modules/workbox-expiration": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.4.1.tgz", - "integrity": "sha512-N912AGhi95vhf2vebE3wPhnGjnR+t5W4yALDY7Pl6bcuhySNbwkkp2RjQcBB+dxrdiX2rOvavvdcf/q1LSnEyg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.4.2.tgz", + "integrity": "sha512-0hbpBj0tDnW+DZOUmwZqntB/8xrXOgO34i7s00Si/VlFJvvpRKg1leXdHHU8ykoSBd6+F2KDcMP3swoCi5guLw==", "dependencies": { "idb": "^6.1.4", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-google-analytics": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.4.1.tgz", - "integrity": "sha512-L1JQISg1CxMAlqw3HXpWB2gRYsmJ9F9OgC2/UNAZLyOJTFk1faZziPS4eXe+UaHevZ+Ma66Z2zfYxPUTr5znjQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.4.2.tgz", + "integrity": "sha512-u+gxs3jXovPb1oul4CTBOb+T9fS1oZG+ZE6AzS7l40vnyfJV79DaLBvlpEZfXGv3CjMdV1sT/ltdOrKzo7HcGw==", "dependencies": { - "workbox-background-sync": "6.4.1", - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-background-sync": "6.4.2", + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "node_modules/workbox-navigation-preload": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.4.1.tgz", - "integrity": "sha512-npgZYoeaE+teQvpWqZLgJDJ6I3qxwqAfnSIa8yrNQ2sLR1A88uWGGsiRzfUsIdKjVCLPQVZ+clwb6XU1vyW9Lw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.4.2.tgz", + "integrity": "sha512-viyejlCtlKsbJCBHwhSBbWc57MwPXvUrc8P7d+87AxBGPU+JuWkT6nvBANgVgFz6FUhCvRC8aYt+B1helo166g==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-precaching": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.4.1.tgz", - "integrity": "sha512-Sq8d+/wfcXFjwuVwKe2VxD4QddRBgkO6pJVgpHbk5WFynR8dc8Zj3BlJ38e4nMlRuBZ8996TIgAmk/U6Rr5YHQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.4.2.tgz", + "integrity": "sha512-CZ6uwFN/2wb4noHVlALL7UqPFbLfez/9S2GAzGAb0Sk876ul9ukRKPJJ6gtsxfE2HSTwqwuyNVa6xWyeyJ1XSA==", "dependencies": { - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "node_modules/workbox-range-requests": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.4.1.tgz", - "integrity": "sha512-X/asYHeuWIKg5Tk+dfmiEOo9hlkQ1K737dnENj8zL97kZDdcfokPT5CuXgM2xqX7NMoahONq1Eo2UoFfJNjZzg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.4.2.tgz", + "integrity": "sha512-SowF3z69hr3Po/w7+xarWfzxJX/3Fo0uSG72Zg4g5FWWnHpq2zPvgbWerBZIa81zpJVUdYpMa3akJJsv+LaO1Q==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-recipes": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.4.1.tgz", - "integrity": "sha512-Yu9tLmgD25NorZPO3FHJUii/Y2ghrx2jD2QKMaWBBplshw1MFokqlmr3Dz3O6NI8jBBUnK5Dtbl0+SCwVGSCqg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.4.2.tgz", + "integrity": "sha512-/oVxlZFpAjFVbY+3PoGEXe8qyvtmqMrTdWhbOfbwokNFtUZ/JCtanDKgwDv9x3AebqGAoJRvQNSru0F4nG+gWA==", "dependencies": { - "workbox-cacheable-response": "6.4.1", - "workbox-core": "6.4.1", - "workbox-expiration": "6.4.1", - "workbox-precaching": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-cacheable-response": "6.4.2", + "workbox-core": "6.4.2", + "workbox-expiration": "6.4.2", + "workbox-precaching": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "node_modules/workbox-routing": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.4.1.tgz", - "integrity": "sha512-FIy27mwM3WdDASOTMX10OZ8q3Un47ULeDtDrDAKfWYIP/oTF2xoA1/HtXpOjBlyg5VP/poPX5GDojXHXAXpfzQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.4.2.tgz", + "integrity": "sha512-0ss/n9PAcHjTy4Ad7l2puuod4WtsnRYu9BrmHcu6Dk4PgWeJo1t5VnGufPxNtcuyPGQ3OdnMdlmhMJ57sSrrSw==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-strategies": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.4.1.tgz", - "integrity": "sha512-2UQ+7Siy4Z5QG2LebbVhDLmPG3M7bVo/tZqN4LNUGXS6fDlpbTTK6A3Hu0W8gCVwIX0tSg7U3mVhDntH4qt3Dg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.4.2.tgz", + "integrity": "sha512-YXh9E9dZGEO1EiPC3jPe2CbztO5WT8Ruj8wiYZM56XqEJp5YlGTtqRjghV+JovWOqkWdR+amJpV31KPWQUvn1Q==", "dependencies": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/workbox-streams": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.4.1.tgz", - "integrity": "sha512-0t3QKBml3Qi37JniDfEn0FfN4JRgMK6sEcjGxvmMGwlHAyKukZr0Gj58ax1o1KYGGJr72RDBK+YXI9Sk9cKifw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.4.2.tgz", + "integrity": "sha512-ROEGlZHGVEgpa5bOZefiJEVsi5PsFjJG9Xd+wnDbApsCO9xq9rYFopF+IRq9tChyYzhBnyk2hJxbQVWphz3sog==", "dependencies": { - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1" + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2" } }, "node_modules/workbox-sw": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.4.1.tgz", - "integrity": "sha512-IJNYcNbjugMB9v+Yx7uswohjOaYoimw5dI0Gcaj2zrJHKjV0bom+BPRCdijmttN/3uVbX57jhNe8SMzWMj7fHw==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.4.2.tgz", + "integrity": "sha512-A2qdu9TLktfIM5NE/8+yYwfWu+JgDaCkbo5ikrky2c7r9v2X6DcJ+zSLphNHHLwM/0eVk5XVf1mC5HGhYpMhhg==" }, "node_modules/workbox-webpack-plugin": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.4.1.tgz", - "integrity": "sha512-8rHQ+Q9Y1y+f1FJSUM7EEuaVsBMSFO6dbyqib3vcTZvnoTmCa4ZcThK9UXa9qTs8Q2yGACU18lm3uOm+OOKEMQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.4.2.tgz", + "integrity": "sha512-CiEwM6kaJRkx1cP5xHksn13abTzUqMHiMMlp5Eh/v4wRcedgDTyv6Uo8+Hg9MurRbHDosO5suaPyF9uwVr4/CQ==", "dependencies": { "fast-json-stable-stringify": "^2.1.0", "pretty-bytes": "^5.4.1", "source-map-url": "^0.4.0", "upath": "^1.2.0", "webpack-sources": "^1.4.3", - "workbox-build": "6.4.1" + "workbox-build": "6.4.2" }, "engines": { "node": ">=10.0.0" @@ -25460,12 +25448,12 @@ } }, "node_modules/workbox-window": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.4.1.tgz", - "integrity": "sha512-v5G1U+NN0sHErvE9fzHRA75FrfRFj/0dihFnvno5yqHZZIb9G4U2AarodSDRBC3t6CsnLO68l1Bj1gsHqsM9Qw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.4.2.tgz", + "integrity": "sha512-KVyRKmrJg7iB+uym/B/CnEUEFG9CvnTU1Bq5xpXHbtgD9l+ShDekSl1wYpqw/O0JfeeQVOFb8CiNfvnwWwqnWQ==", "dependencies": { "@types/trusted-types": "^2.0.2", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "node_modules/wrap-ansi": { @@ -25996,11 +25984,16 @@ "version": "4.0.3", "license": "MIT", "dependencies": { + "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", "@swc/core": "^1.2.119", "@swc/helpers": "^0.3.2", "@swc/jest": "^0.2.12", + "babel-jest": "^27.4.2", + "babel-loader": "^8.2.3", + "babel-plugin-named-asset-import": "^0.3.7", + "babel-preset-react-app": "^10.0.0", "bfj": "^7.0.2", "browserslist": "^4.18.1", "camelcase": "^6.2.1", @@ -30838,7 +30831,6 @@ "version": "8.2.3", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", - "dev": true, "requires": { "find-cache-dir": "^3.3.1", "loader-utils": "^1.4.0", @@ -30850,7 +30842,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, "requires": { "minimist": "^1.2.0" } @@ -30859,7 +30850,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -30870,7 +30860,6 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, "requires": { "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", @@ -32021,8 +32010,7 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "compare-func": { "version": "2.0.0", @@ -34730,7 +34718,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, "requires": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -37459,8 +37446,7 @@ "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "json-schema-traverse": { "version": "0.4.1", @@ -41050,11 +41036,16 @@ "react-scripts": { "version": "file:packages/react-scripts", "requires": { + "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", "@swc/core": "^1.2.119", "@swc/helpers": "^0.3.2", "@swc/jest": "^0.2.12", + "babel-jest": "^27.4.2", + "babel-loader": "^8.2.3", + "babel-plugin-named-asset-import": "^0.3.7", + "babel-preset-react-app": "^10.0.0", "bfj": "^7.0.2", "browserslist": "^4.18.1", "camelcase": "^6.2.1", @@ -41820,9 +41811,9 @@ } }, "rollup": { - "version": "2.60.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.60.2.tgz", - "integrity": "sha512-1Bgjpq61sPjgoZzuiDSGvbI1tD91giZABgjCQBKM5aYLnzjq52GoDuWVwT/cm/MCxCMPU8gqQvkj8doQ5C8Oqw==", + "version": "2.61.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", + "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", "requires": { "fsevents": "~2.3.2" } @@ -45192,28 +45183,28 @@ "dev": true }, "workbox-background-sync": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.4.1.tgz", - "integrity": "sha512-GiDklRhDF/oJ+WJhb6jO00wA+fjOZlY4SomqpumXP6OXp1WodmKu7xv75hpum0Kx4Fh3MZrj+9Ae+dIYlq21dA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.4.2.tgz", + "integrity": "sha512-P7c8uG5X2k+DMICH9xeSA9eUlCOjHHYoB42Rq+RtUpuwBxUOflAXR1zdsMWj81LopE4gjKXlTw7BFd1BDAHo7g==", "requires": { "idb": "^6.1.4", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-broadcast-update": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.4.1.tgz", - "integrity": "sha512-oz1WAEppIatucgIc49zXPsyQG6004eoKsyiJVGDyN94LIFpUDfGa+cykN32X0PaqOC9bdlj+4EjVBi0OuwkIHA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.4.2.tgz", + "integrity": "sha512-qnBwQyE0+PWFFc/n4ISXINE49m44gbEreJUYt2ldGH3+CNrLmJ1egJOOyUqqu9R4Eb7QrXcmB34ClXG7S37LbA==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-build": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.4.1.tgz", - "integrity": "sha512-cvH74tEO8SrziFrCntZ/35B0uaMZFKG+gnk3vZmKLSUTab/6MlhL+UwYXf1sMV5SD/W/v7pnFKZbdAOAg5Ne2w==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.4.2.tgz", + "integrity": "sha512-WMdYLhDIsuzViOTXDH+tJ1GijkFp5khSYolnxR/11zmfhNDtuo7jof72xPGFy+KRpsz6tug39RhivCj77qqO0w==", "requires": { - "@apideck/better-ajv-errors": "^0.2.7", + "@apideck/better-ajv-errors": "^0.3.1", "@babel/core": "^7.11.1", "@babel/preset-env": "^7.11.0", "@babel/runtime": "^7.11.2", @@ -45236,29 +45227,29 @@ "strip-comments": "^2.0.1", "tempy": "^0.6.0", "upath": "^1.2.0", - "workbox-background-sync": "6.4.1", - "workbox-broadcast-update": "6.4.1", - "workbox-cacheable-response": "6.4.1", - "workbox-core": "6.4.1", - "workbox-expiration": "6.4.1", - "workbox-google-analytics": "6.4.1", - "workbox-navigation-preload": "6.4.1", - "workbox-precaching": "6.4.1", - "workbox-range-requests": "6.4.1", - "workbox-recipes": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1", - "workbox-streams": "6.4.1", - "workbox-sw": "6.4.1", - "workbox-window": "6.4.1" + "workbox-background-sync": "6.4.2", + "workbox-broadcast-update": "6.4.2", + "workbox-cacheable-response": "6.4.2", + "workbox-core": "6.4.2", + "workbox-expiration": "6.4.2", + "workbox-google-analytics": "6.4.2", + "workbox-navigation-preload": "6.4.2", + "workbox-precaching": "6.4.2", + "workbox-range-requests": "6.4.2", + "workbox-recipes": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2", + "workbox-streams": "6.4.2", + "workbox-sw": "6.4.2", + "workbox-window": "6.4.2" }, "dependencies": { "@apideck/better-ajv-errors": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.2.7.tgz", - "integrity": "sha512-J2dW+EHYudbwI7MGovcHWLBrxasl21uuroc2zT8bH2RxYuv2g5GqsO5jcKUZz4LaMST45xhKjVuyRYkhcWyMhA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.1.tgz", + "integrity": "sha512-6RMV31esAxqlDIvVCG/CJxY/s8dFNVOI5w8RWIfDMhjg/iwqnawko9tJXau/leqC4+T1Bu8et99QVWCwU5wk+g==", "requires": { - "json-schema": "^0.3.0", + "json-schema": "^0.4.0", "jsonpointer": "^5.0.0", "leven": "^3.1.0" } @@ -45285,11 +45276,6 @@ "universalify": "^2.0.0" } }, - "json-schema": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.3.0.tgz", - "integrity": "sha512-TYfxx36xfl52Rf1LU9HyWSLGPdYLL+SQ8/E/0yVyKG8wCCDaSrhPap0vEdlsZWRaS6tnKKLPGiEJGiREVC8kxQ==" - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -45355,118 +45341,118 @@ } }, "workbox-cacheable-response": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.4.1.tgz", - "integrity": "sha512-omXplP3miJhQwx+jfFnqO9xWgNc8CLG6EWRvTyc8R81cA/4zhqh87yj9UVH+fGUmuIXOUBPAuulSazXUsvKFWg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.4.2.tgz", + "integrity": "sha512-9FE1W/cKffk1AJzImxgEN0ceWpyz1tqNjZVtA3/LAvYL3AC5SbIkhc7ZCO82WmO9IjTfu8Vut2X/C7ViMSF7TA==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-core": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.4.1.tgz", - "integrity": "sha512-5hosqpSK+48jHlj+5EHN5dtH1Ade4fqTe4+xX3U9wWK1SDaXEqXpVxdHuBqYfg75UE1PUINA0rhMZWTqeGoLFg==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.4.2.tgz", + "integrity": "sha512-1U6cdEYPcajRXiboSlpJx6U7TvhIKbxRRerfepAJu2hniKwJ3DHILjpU/zx3yvzSBCWcNJDoFalf7Vgd7ey/rw==" }, "workbox-expiration": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.4.1.tgz", - "integrity": "sha512-N912AGhi95vhf2vebE3wPhnGjnR+t5W4yALDY7Pl6bcuhySNbwkkp2RjQcBB+dxrdiX2rOvavvdcf/q1LSnEyg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.4.2.tgz", + "integrity": "sha512-0hbpBj0tDnW+DZOUmwZqntB/8xrXOgO34i7s00Si/VlFJvvpRKg1leXdHHU8ykoSBd6+F2KDcMP3swoCi5guLw==", "requires": { "idb": "^6.1.4", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-google-analytics": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.4.1.tgz", - "integrity": "sha512-L1JQISg1CxMAlqw3HXpWB2gRYsmJ9F9OgC2/UNAZLyOJTFk1faZziPS4eXe+UaHevZ+Ma66Z2zfYxPUTr5znjQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.4.2.tgz", + "integrity": "sha512-u+gxs3jXovPb1oul4CTBOb+T9fS1oZG+ZE6AzS7l40vnyfJV79DaLBvlpEZfXGv3CjMdV1sT/ltdOrKzo7HcGw==", "requires": { - "workbox-background-sync": "6.4.1", - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-background-sync": "6.4.2", + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "workbox-navigation-preload": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.4.1.tgz", - "integrity": "sha512-npgZYoeaE+teQvpWqZLgJDJ6I3qxwqAfnSIa8yrNQ2sLR1A88uWGGsiRzfUsIdKjVCLPQVZ+clwb6XU1vyW9Lw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.4.2.tgz", + "integrity": "sha512-viyejlCtlKsbJCBHwhSBbWc57MwPXvUrc8P7d+87AxBGPU+JuWkT6nvBANgVgFz6FUhCvRC8aYt+B1helo166g==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-precaching": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.4.1.tgz", - "integrity": "sha512-Sq8d+/wfcXFjwuVwKe2VxD4QddRBgkO6pJVgpHbk5WFynR8dc8Zj3BlJ38e4nMlRuBZ8996TIgAmk/U6Rr5YHQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.4.2.tgz", + "integrity": "sha512-CZ6uwFN/2wb4noHVlALL7UqPFbLfez/9S2GAzGAb0Sk876ul9ukRKPJJ6gtsxfE2HSTwqwuyNVa6xWyeyJ1XSA==", "requires": { - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "workbox-range-requests": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.4.1.tgz", - "integrity": "sha512-X/asYHeuWIKg5Tk+dfmiEOo9hlkQ1K737dnENj8zL97kZDdcfokPT5CuXgM2xqX7NMoahONq1Eo2UoFfJNjZzg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.4.2.tgz", + "integrity": "sha512-SowF3z69hr3Po/w7+xarWfzxJX/3Fo0uSG72Zg4g5FWWnHpq2zPvgbWerBZIa81zpJVUdYpMa3akJJsv+LaO1Q==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-recipes": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.4.1.tgz", - "integrity": "sha512-Yu9tLmgD25NorZPO3FHJUii/Y2ghrx2jD2QKMaWBBplshw1MFokqlmr3Dz3O6NI8jBBUnK5Dtbl0+SCwVGSCqg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.4.2.tgz", + "integrity": "sha512-/oVxlZFpAjFVbY+3PoGEXe8qyvtmqMrTdWhbOfbwokNFtUZ/JCtanDKgwDv9x3AebqGAoJRvQNSru0F4nG+gWA==", "requires": { - "workbox-cacheable-response": "6.4.1", - "workbox-core": "6.4.1", - "workbox-expiration": "6.4.1", - "workbox-precaching": "6.4.1", - "workbox-routing": "6.4.1", - "workbox-strategies": "6.4.1" + "workbox-cacheable-response": "6.4.2", + "workbox-core": "6.4.2", + "workbox-expiration": "6.4.2", + "workbox-precaching": "6.4.2", + "workbox-routing": "6.4.2", + "workbox-strategies": "6.4.2" } }, "workbox-routing": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.4.1.tgz", - "integrity": "sha512-FIy27mwM3WdDASOTMX10OZ8q3Un47ULeDtDrDAKfWYIP/oTF2xoA1/HtXpOjBlyg5VP/poPX5GDojXHXAXpfzQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.4.2.tgz", + "integrity": "sha512-0ss/n9PAcHjTy4Ad7l2puuod4WtsnRYu9BrmHcu6Dk4PgWeJo1t5VnGufPxNtcuyPGQ3OdnMdlmhMJ57sSrrSw==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-strategies": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.4.1.tgz", - "integrity": "sha512-2UQ+7Siy4Z5QG2LebbVhDLmPG3M7bVo/tZqN4LNUGXS6fDlpbTTK6A3Hu0W8gCVwIX0tSg7U3mVhDntH4qt3Dg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.4.2.tgz", + "integrity": "sha512-YXh9E9dZGEO1EiPC3jPe2CbztO5WT8Ruj8wiYZM56XqEJp5YlGTtqRjghV+JovWOqkWdR+amJpV31KPWQUvn1Q==", "requires": { - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "workbox-streams": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.4.1.tgz", - "integrity": "sha512-0t3QKBml3Qi37JniDfEn0FfN4JRgMK6sEcjGxvmMGwlHAyKukZr0Gj58ax1o1KYGGJr72RDBK+YXI9Sk9cKifw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.4.2.tgz", + "integrity": "sha512-ROEGlZHGVEgpa5bOZefiJEVsi5PsFjJG9Xd+wnDbApsCO9xq9rYFopF+IRq9tChyYzhBnyk2hJxbQVWphz3sog==", "requires": { - "workbox-core": "6.4.1", - "workbox-routing": "6.4.1" + "workbox-core": "6.4.2", + "workbox-routing": "6.4.2" } }, "workbox-sw": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.4.1.tgz", - "integrity": "sha512-IJNYcNbjugMB9v+Yx7uswohjOaYoimw5dI0Gcaj2zrJHKjV0bom+BPRCdijmttN/3uVbX57jhNe8SMzWMj7fHw==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.4.2.tgz", + "integrity": "sha512-A2qdu9TLktfIM5NE/8+yYwfWu+JgDaCkbo5ikrky2c7r9v2X6DcJ+zSLphNHHLwM/0eVk5XVf1mC5HGhYpMhhg==" }, "workbox-webpack-plugin": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.4.1.tgz", - "integrity": "sha512-8rHQ+Q9Y1y+f1FJSUM7EEuaVsBMSFO6dbyqib3vcTZvnoTmCa4ZcThK9UXa9qTs8Q2yGACU18lm3uOm+OOKEMQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.4.2.tgz", + "integrity": "sha512-CiEwM6kaJRkx1cP5xHksn13abTzUqMHiMMlp5Eh/v4wRcedgDTyv6Uo8+Hg9MurRbHDosO5suaPyF9uwVr4/CQ==", "requires": { "fast-json-stable-stringify": "^2.1.0", "pretty-bytes": "^5.4.1", "source-map-url": "^0.4.0", "upath": "^1.2.0", "webpack-sources": "^1.4.3", - "workbox-build": "6.4.1" + "workbox-build": "6.4.2" }, "dependencies": { "upath": { @@ -45486,12 +45472,12 @@ } }, "workbox-window": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.4.1.tgz", - "integrity": "sha512-v5G1U+NN0sHErvE9fzHRA75FrfRFj/0dihFnvno5yqHZZIb9G4U2AarodSDRBC3t6CsnLO68l1Bj1gsHqsM9Qw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.4.2.tgz", + "integrity": "sha512-KVyRKmrJg7iB+uym/B/CnEUEFG9CvnTU1Bq5xpXHbtgD9l+ShDekSl1wYpqw/O0JfeeQVOFb8CiNfvnwWwqnWQ==", "requires": { "@types/trusted-types": "^2.0.2", - "workbox-core": "6.4.1" + "workbox-core": "6.4.2" } }, "wrap-ansi": { diff --git a/packages/react-scripts/config/jest/babelTransform.js b/packages/react-scripts/config/jest/babelTransform.js new file mode 100644 index 00000000000..e925d3697b6 --- /dev/null +++ b/packages/react-scripts/config/jest/babelTransform.js @@ -0,0 +1,25 @@ +// @remove-on-eject-begin +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +// @remove-on-eject-end +'use strict'; + +const babelJest = require('babel-jest').default; +const hasJsxRuntime = require('../hasJsxRuntime'); + +module.exports = babelJest.createTransformer({ + presets: [ + [ + require.resolve('babel-preset-react-app'), + { + runtime: hasJsxRuntime ? 'automatic' : 'classic', + }, + ], + ], + babelrc: false, + configFile: false, +}); diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 2b3405873c4..930619f5489 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -35,7 +35,11 @@ const ForkTsCheckerWebpackPlugin = const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); const createEnvironmentHash = require('./webpack/persistentCache/createEnvironmentHash'); const hasJsxRuntime = require('./hasJsxRuntime'); -const createSwcConfig = require('./createSwcConfig'); + +const useSwc = process.env.SWC_TRANSFORM === 'true'; +const codeLoaders = useSwc + ? require('./webpack/loaders/code/swc') + : require('./webpack/loaders/code/babel'); // Source maps are resource heavy and can cause out of memory issue for large source files. const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; @@ -45,6 +49,15 @@ const reactRefreshWebpackPluginRuntimeEntry = require.resolve( '@pmmmwh/react-refresh-webpack-plugin' ); +const babelRuntimeEntry = require.resolve('babel-preset-react-app'); +const babelRuntimeEntryHelpers = require.resolve( + '@babel/runtime/helpers/esm/assertThisInitialized', + { paths: [babelRuntimeEntry] } +); +const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', { + paths: [babelRuntimeEntry], +}); + // Some apps do not need the benefits of saving a web request, so not inlining the chunk // makes for a smoother build process. const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false'; @@ -87,13 +100,6 @@ module.exports = function (webpackEnv) { const shouldUseReactRefresh = env.raw.FAST_REFRESH; - const swcConfig = createSwcConfig({ - shouldUseSourceMap, - isEnvDevelopment, - isEnvProduction, - shouldUseReactRefresh, - }); - // common function to get style loaders const getStyleLoaders = (cssOptions, preProcessor) => { const loaders = [ @@ -295,7 +301,7 @@ module.exports = function (webpackEnv) { }, plugins: [ // Prevents users from importing files from outside of src/ (or node_modules/). - // This often causes confusion because we only process files within src/ with swc. + // This often causes confusion because we only process files within src/ with babel (or experimental swc). // To fix this, we prevent you from importing files out of src/ -- if you'd like to, // please link the files into your node_modules/ and let module-resolution kick in. // Make sure your source files are compiled, as they will not be processed in any way. @@ -303,6 +309,9 @@ module.exports = function (webpackEnv) { paths.appPackageJson, reactRefreshRuntimeEntry, reactRefreshWebpackPluginRuntimeEntry, + babelRuntimeEntry, + babelRuntimeEntryHelpers, + babelRuntimeRegenerator, ]), ], }, @@ -370,26 +379,15 @@ module.exports = function (webpackEnv) { and: [/\.(ts|tsx|js|jsx|md|mdx)$/], }, }, - // Process application JS with swc. + // Process application JS with Babel (or experimental swc). // The preset includes JSX, Flow, TypeScript, and some ESnext features. - { - test: /\.(js|mjs|jsx)$/, - include: paths.appSrc, - loader: require.resolve('swc-loader'), - options: swcConfig.ecmascript, - }, - { - test: /\.(ts|tsx)$/, - include: paths.appSrc, - loader: require.resolve('swc-loader'), - options: swcConfig.typescript, - }, - // Process any JS outside of the app with swc. - // Unlike the application JS, we only compile the standard ES features. - { - test: /\.(js|mjs)$/, - loader: require.resolve('swc-loader'), - }, + ...codeLoaders({ + shouldUseSourceMap, + isEnvDevelopment, + isEnvProduction, + shouldUseReactRefresh, + }), + // "postcss" loader applies autoprefixer to our CSS. // "css" loader resolves paths in CSS and adds assets as dependencies. // "style" loader turns CSS into JS modules that inject