diff --git a/package-lock.json b/package-lock.json
index eb9eb9c7bc4..2a1a96eb86f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,7 +4,6 @@
"requires": true,
"packages": {
"": {
- "name": "create-react-app",
"hasInstallScript": true,
"workspaces": [
"packages/*"
@@ -25838,7 +25837,7 @@
}
},
"packages/babel-plugin-named-asset-import": {
- "version": "0.3.7",
+ "version": "0.3.8",
"license": "MIT",
"devDependencies": {
"babel-plugin-tester": "^10.1.0",
@@ -25849,7 +25848,7 @@
}
},
"packages/babel-preset-react-app": {
- "version": "10.0.0",
+ "version": "10.0.1",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.16.0",
@@ -25871,28 +25870,28 @@
}
},
"packages/confusing-browser-globals": {
- "version": "1.0.10",
+ "version": "1.0.11",
"license": "MIT",
"devDependencies": {
"jest": "^27.4.3"
}
},
"packages/cra-template": {
- "version": "1.1.2",
+ "version": "1.1.3",
"license": "MIT",
"engines": {
"node": ">=14"
}
},
"packages/cra-template-typescript": {
- "version": "1.1.2",
+ "version": "1.1.3",
"license": "MIT",
"engines": {
"node": ">=14"
}
},
"packages/create-react-app": {
- "version": "4.0.3",
+ "version": "5.0.0",
"license": "MIT",
"dependencies": {
"chalk": "^4.1.2",
@@ -25933,7 +25932,7 @@
}
},
"packages/eslint-config-react-app": {
- "version": "6.0.0",
+ "version": "7.0.0",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.16.0",
@@ -25941,8 +25940,8 @@
"@rushstack/eslint-patch": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
- "babel-preset-react-app": "^10.0.0",
- "confusing-browser-globals": "^1.0.10",
+ "babel-preset-react-app": "^10.0.1",
+ "confusing-browser-globals": "^1.0.11",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
@@ -25959,7 +25958,7 @@
}
},
"packages/react-app-polyfill": {
- "version": "2.0.0",
+ "version": "3.0.0",
"license": "MIT",
"dependencies": {
"core-js": "^3.19.2",
@@ -25974,7 +25973,7 @@
}
},
"packages/react-dev-utils": {
- "version": "11.0.4",
+ "version": "12.0.0",
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.16.0",
@@ -25996,7 +25995,7 @@
"open": "^8.4.0",
"pkg-up": "^3.1.0",
"prompts": "^2.4.2",
- "react-error-overlay": "^6.0.9",
+ "react-error-overlay": "^6.0.10",
"recursive-readdir": "^2.2.2",
"shell-quote": "^1.7.3",
"strip-ansi": "^6.0.1",
@@ -26019,7 +26018,7 @@
}
},
"packages/react-error-overlay": {
- "version": "6.0.9",
+ "version": "6.0.10",
"license": "MIT",
"devDependencies": {
"@babel/code-frame": "^7.16.0",
@@ -26027,12 +26026,12 @@
"anser": "^2.1.0",
"babel-jest": "^27.4.2",
"babel-loader": "^8.2.3",
- "babel-preset-react-app": "^10.0.0",
+ "babel-preset-react-app": "^10.0.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
- "eslint-config-react-app": "^6.0.0",
+ "eslint-config-react-app": "^7.0.0",
"flow-bin": "^0.116.0",
"html-entities": "^2.3.2",
"jest": "^27.4.3",
@@ -26041,7 +26040,7 @@
"promise": "^8.1.0",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
- "react-app-polyfill": "^2.0.0",
+ "react-app-polyfill": "^3.0.0",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"settle-promise": "^1.0.0",
@@ -26059,7 +26058,7 @@
}
},
"packages/react-scripts": {
- "version": "4.0.3",
+ "version": "5.0.0",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.16.0",
@@ -26067,8 +26066,8 @@
"@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",
+ "babel-plugin-named-asset-import": "^0.3.8",
+ "babel-preset-react-app": "^10.0.1",
"bfj": "^7.0.2",
"browserslist": "^4.18.1",
"camelcase": "^6.2.1",
@@ -26078,7 +26077,7 @@
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"eslint": "^8.3.0",
- "eslint-config-react-app": "^6.0.0",
+ "eslint-config-react-app": "^7.0.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"fs-extra": "^10.0.0",
@@ -26094,8 +26093,8 @@
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^7.0.1",
"prompts": "^2.4.2",
- "react-app-polyfill": "^2.0.0",
- "react-dev-utils": "^11.0.4",
+ "react-app-polyfill": "^3.0.0",
+ "react-dev-utils": "^12.0.0",
"react-refresh": "^0.11.0",
"resolve": "^1.20.0",
"resolve-url-loader": "^4.0.0",
@@ -29113,7 +29112,8 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
- "dev": true
+ "dev": true,
+ "requires": {}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "5.13.0",
@@ -30199,12 +30199,14 @@
"acorn-import-assertions": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
- "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw=="
+ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
+ "requires": {}
},
"acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "requires": {}
},
"acorn-node": {
"version": "1.8.2",
@@ -30316,7 +30318,8 @@
"ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
- "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ=="
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "requires": {}
},
"alex": {
"version": "8.2.0",
@@ -32990,7 +32993,8 @@
"css-blank-pseudo": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-2.0.0.tgz",
- "integrity": "sha512-n7fxEOyuvAVPLPb9kL4XTIK/gnp2fKQ7KFQ+9lj60W9pDn/jTr5LjS/kHHm+rES/YJ3m0S6+uJgYSuAJg9zOyA=="
+ "integrity": "sha512-n7fxEOyuvAVPLPb9kL4XTIK/gnp2fKQ7KFQ+9lj60W9pDn/jTr5LjS/kHHm+rES/YJ3m0S6+uJgYSuAJg9zOyA==",
+ "requires": {}
},
"css-declaration-sorter": {
"version": "6.1.3",
@@ -33087,7 +33091,8 @@
"css-prefers-color-scheme": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-5.0.0.tgz",
- "integrity": "sha512-XpzVrdwbppHm+Nnrzcb/hQb8eq1aKv4U8Oh59LsLfTsbIZZ6Fvn9razb66ihH2aTJ0VhO9n9sVm8piyKXJAZMA=="
+ "integrity": "sha512-XpzVrdwbppHm+Nnrzcb/hQb8eq1aKv4U8Oh59LsLfTsbIZZ6Fvn9razb66ihH2aTJ0VhO9n9sVm8piyKXJAZMA==",
+ "requires": {}
},
"css-select": {
"version": "4.1.3",
@@ -33186,7 +33191,8 @@
"cssnano-utils": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz",
- "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ=="
+ "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==",
+ "requires": {}
},
"csso": {
"version": "4.2.0",
@@ -34028,8 +34034,8 @@
"@rushstack/eslint-patch": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
- "babel-preset-react-app": "^10.0.0",
- "confusing-browser-globals": "^1.0.10",
+ "babel-preset-react-app": "^10.0.1",
+ "confusing-browser-globals": "^1.0.11",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
@@ -34267,7 +34273,8 @@
"eslint-plugin-react-hooks": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz",
- "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA=="
+ "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==",
+ "requires": {}
},
"eslint-plugin-testing-library": {
"version": "5.0.1",
@@ -36200,7 +36207,8 @@
"icss-utils": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
- "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA=="
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+ "requires": {}
},
"idb": {
"version": "6.1.5",
@@ -37171,7 +37179,8 @@
"jest-pnp-resolver": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz",
- "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w=="
+ "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==",
+ "requires": {}
},
"jest-regex-util": {
"version": "27.4.0",
@@ -39994,7 +40003,8 @@
"postcss-browser-comments": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-4.0.0.tgz",
- "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg=="
+ "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==",
+ "requires": {}
},
"postcss-calc": {
"version": "8.0.0",
@@ -40051,7 +40061,8 @@
"postcss-custom-media": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-8.0.0.tgz",
- "integrity": "sha512-FvO2GzMUaTN0t1fBULDeIvxr5IvbDXcIatt6pnJghc736nqNgsGao5NT+5+WVLAQiTt6Cb3YUms0jiPaXhL//g=="
+ "integrity": "sha512-FvO2GzMUaTN0t1fBULDeIvxr5IvbDXcIatt6pnJghc736nqNgsGao5NT+5+WVLAQiTt6Cb3YUms0jiPaXhL//g==",
+ "requires": {}
},
"postcss-custom-properties": {
"version": "12.0.0",
@@ -40080,22 +40091,26 @@
"postcss-discard-comments": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz",
- "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg=="
+ "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==",
+ "requires": {}
},
"postcss-discard-duplicates": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz",
- "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA=="
+ "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==",
+ "requires": {}
},
"postcss-discard-empty": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz",
- "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw=="
+ "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==",
+ "requires": {}
},
"postcss-discard-overridden": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz",
- "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q=="
+ "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==",
+ "requires": {}
},
"postcss-double-position-gradients": {
"version": "3.0.1",
@@ -40116,27 +40131,32 @@
"postcss-flexbugs-fixes": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-5.0.2.tgz",
- "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ=="
+ "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==",
+ "requires": {}
},
"postcss-focus-visible": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-6.0.1.tgz",
- "integrity": "sha512-UddLlBmJ78Nu7OrKME70EKxCPBdxTx7pKIyD3GDNRM8Tnq19zmscT9QzsvR8gygz0i0nNUjMtSz4N3AEWZ5R/Q=="
+ "integrity": "sha512-UddLlBmJ78Nu7OrKME70EKxCPBdxTx7pKIyD3GDNRM8Tnq19zmscT9QzsvR8gygz0i0nNUjMtSz4N3AEWZ5R/Q==",
+ "requires": {}
},
"postcss-focus-within": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-5.0.1.tgz",
- "integrity": "sha512-50v1AZVlFSVzLTNdBQG521Aa54VABf/X1RkhR8Fm/9dDQby0W0XdwOnuo8Juvf0ZZXbKkxyTkyyQD0QaNVZVGg=="
+ "integrity": "sha512-50v1AZVlFSVzLTNdBQG521Aa54VABf/X1RkhR8Fm/9dDQby0W0XdwOnuo8Juvf0ZZXbKkxyTkyyQD0QaNVZVGg==",
+ "requires": {}
},
"postcss-font-variant": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz",
- "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA=="
+ "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==",
+ "requires": {}
},
"postcss-gap-properties": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-3.0.0.tgz",
- "integrity": "sha512-QJOkz1epC/iCuOdhQPm3n9T+F25+P+MYJEEcs5xz/Q+020mc9c6ZRGJkzPJd8FS9hFmT9eEKFEx9PEDl+lH5og=="
+ "integrity": "sha512-QJOkz1epC/iCuOdhQPm3n9T+F25+P+MYJEEcs5xz/Q+020mc9c6ZRGJkzPJd8FS9hFmT9eEKFEx9PEDl+lH5og==",
+ "requires": {}
},
"postcss-image-set-function": {
"version": "4.0.2",
@@ -40149,7 +40169,8 @@
"postcss-initial": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-4.0.1.tgz",
- "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ=="
+ "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==",
+ "requires": {}
},
"postcss-js": {
"version": "3.0.3",
@@ -40202,12 +40223,14 @@
"postcss-logical": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-5.0.0.tgz",
- "integrity": "sha512-fWEWMn/xf6F9SMzAD7OS0GTm8Qh1BlBmEbVT/YZGYhwipQEwOpO7YOOu+qnzLksDg9JjLRj5tLmeN8OW8+ogIA=="
+ "integrity": "sha512-fWEWMn/xf6F9SMzAD7OS0GTm8Qh1BlBmEbVT/YZGYhwipQEwOpO7YOOu+qnzLksDg9JjLRj5tLmeN8OW8+ogIA==",
+ "requires": {}
},
"postcss-media-minmax": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz",
- "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ=="
+ "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==",
+ "requires": {}
},
"postcss-merge-longhand": {
"version": "5.0.4",
@@ -40270,7 +40293,8 @@
"postcss-modules-extract-imports": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
- "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw=="
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+ "requires": {}
},
"postcss-modules-local-by-default": {
"version": "4.0.0",
@@ -40327,7 +40351,8 @@
"postcss-normalize-charset": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz",
- "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg=="
+ "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==",
+ "requires": {}
},
"postcss-normalize-display-values": {
"version": "5.0.1",
@@ -40411,12 +40436,14 @@
"postcss-overflow-shorthand": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-3.0.0.tgz",
- "integrity": "sha512-4fTapLT68wUoIr4m3Z0sKn1NbXX0lJYvj4aDA2++KpNx8wMSVf55UuLPz0nSjXa7dV1p0xQHlJ0iFJRNrSY2mw=="
+ "integrity": "sha512-4fTapLT68wUoIr4m3Z0sKn1NbXX0lJYvj4aDA2++KpNx8wMSVf55UuLPz0nSjXa7dV1p0xQHlJ0iFJRNrSY2mw==",
+ "requires": {}
},
"postcss-page-break": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz",
- "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ=="
+ "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==",
+ "requires": {}
},
"postcss-place": {
"version": "7.0.1",
@@ -40496,7 +40523,8 @@
"postcss-replace-overflow-wrap": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz",
- "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw=="
+ "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==",
+ "requires": {}
},
"postcss-selector-not": {
"version": "5.0.0",
@@ -40863,7 +40891,8 @@
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
- "dev": true
+ "dev": true,
+ "requires": {}
}
}
},
@@ -41034,7 +41063,7 @@
"open": "^8.4.0",
"pkg-up": "^3.1.0",
"prompts": "^2.4.2",
- "react-error-overlay": "^6.0.9",
+ "react-error-overlay": "^6.0.10",
"recursive-readdir": "^2.2.2",
"shell-quote": "^1.7.3",
"strip-ansi": "^6.0.1",
@@ -41067,12 +41096,12 @@
"anser": "^2.1.0",
"babel-jest": "^27.4.2",
"babel-loader": "^8.2.3",
- "babel-preset-react-app": "^10.0.0",
+ "babel-preset-react-app": "^10.0.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
- "eslint-config-react-app": "^6.0.0",
+ "eslint-config-react-app": "^7.0.0",
"flow-bin": "^0.116.0",
"html-entities": "^2.3.2",
"jest": "^27.4.3",
@@ -41081,7 +41110,7 @@
"promise": "^8.1.0",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
- "react-app-polyfill": "^2.0.0",
+ "react-app-polyfill": "^3.0.0",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"settle-promise": "^1.0.0",
@@ -41115,8 +41144,8 @@
"@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",
+ "babel-plugin-named-asset-import": "^0.3.8",
+ "babel-preset-react-app": "^10.0.1",
"bfj": "^7.0.2",
"browserslist": "^4.18.1",
"camelcase": "^6.2.1",
@@ -41126,7 +41155,7 @@
"dotenv": "^10.0.0",
"dotenv-expand": "^5.1.0",
"eslint": "^8.3.0",
- "eslint-config-react-app": "^6.0.0",
+ "eslint-config-react-app": "^7.0.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"fs-extra": "^10.0.0",
@@ -41144,8 +41173,8 @@
"postcss-preset-env": "^7.0.1",
"prompts": "^2.4.2",
"react": "^17.0.2",
- "react-app-polyfill": "^2.0.0",
- "react-dev-utils": "^11.0.4",
+ "react-app-polyfill": "^3.0.0",
+ "react-dev-utils": "^12.0.0",
"react-dom": "^17.0.2",
"react-refresh": "^0.11.0",
"resolve": "^1.20.0",
@@ -42892,7 +42921,8 @@
"style-loader": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
- "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ=="
+ "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
+ "requires": {}
},
"stylehacks": {
"version": "5.0.1",
@@ -45193,7 +45223,8 @@
"ws": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
- "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw=="
+ "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
+ "requires": {}
}
}
},
@@ -45778,7 +45809,8 @@
"ws": {
"version": "7.5.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz",
- "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA=="
+ "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==",
+ "requires": {}
},
"x-is-string": {
"version": "0.1.0",
diff --git a/packages/react-dev-utils/FileSizeReporter.js b/packages/react-dev-utils/FileSizeReporter.js
index b2b4cc6904d..80a1b4e7244 100644
--- a/packages/react-dev-utils/FileSizeReporter.js
+++ b/packages/react-dev-utils/FileSizeReporter.js
@@ -16,11 +16,7 @@ var stripAnsi = require('strip-ansi');
var gzipSize = require('gzip-size').sync;
function canReadAsset(asset) {
- return (
- /\.(js|css)$/.test(asset) &&
- !/service-worker\.js/.test(asset) &&
- !/precache-manifest\.[0-9a-f]+\.js/.test(asset)
- );
+ return /\.(js|css)$/.test(asset);
}
// Prints a detailed summary of build files.
diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js
index d9eea34701c..4e950ce500d 100644
--- a/packages/react-dev-utils/WebpackDevServerUtils.js
+++ b/packages/react-dev-utils/WebpackDevServerUtils.js
@@ -110,9 +110,9 @@ function createCompiler({
}) {
// "Compiler" is a low-level interface to webpack.
// It lets us listen to some events and provide our own custom messages.
- let compiler;
+ let masterCompiler;
try {
- compiler = webpack(config);
+ masterCompiler = webpack(config);
} catch (err) {
console.log(chalk.red('Failed to compile.'));
console.log();
@@ -125,7 +125,7 @@ function createCompiler({
// recompiling a bundle. WebpackDevServer takes care to pause serving the
// bundle, so if you refresh, it'll wait instead of serving the old one.
// "invalid" is short for "bundle invalidated", it doesn't imply any errors.
- compiler.hooks.invalid.tap('invalid', () => {
+ masterCompiler.hooks.invalid.tap('invalid', () => {
if (isInteractive) {
clearConsole();
}
@@ -133,23 +133,24 @@ function createCompiler({
});
let isFirstCompile = true;
- let tsMessagesPromise;
- if (useTypeScript) {
- forkTsCheckerWebpackPlugin
- .getCompilerHooks(compiler)
- .waiting.tap('awaitingTypeScriptCheck', () => {
- console.log(
- chalk.yellow(
- 'Files successfully emitted, waiting for typecheck results...'
- )
- );
- });
- }
+ masterCompiler.compilers.forEach(compiler => {
+ if (useTypeScript) {
+ forkTsCheckerWebpackPlugin
+ .getCompilerHooks(compiler)
+ .waiting.tap('awaitingTypeScriptCheck', () => {
+ console.log(
+ chalk.yellow(
+ 'Files successfully emitted, waiting for typecheck results...'
+ )
+ );
+ });
+ }
+ });
// "done" event fires when webpack has finished recompiling the bundle.
// Whether or not you have warnings or errors, you will get this event.
- compiler.hooks.done.tap('done', async stats => {
+ masterCompiler.hooks.done.tap('done', async stats => {
if (isInteractive) {
clearConsole();
}
@@ -198,6 +199,7 @@ function createCompiler({
chalk.underline(chalk.yellow('keywords')) +
' to learn more about each warning.'
);
+
console.log(
'To ignore, add ' +
chalk.cyan('// eslint-disable-next-line') +
@@ -206,27 +208,7 @@ function createCompiler({
}
});
- // You can safely remove this after ejecting.
- // We only use this block for testing of Create React App itself:
- const isSmokeTest = process.argv.some(
- arg => arg.indexOf('--smoke-test') > -1
- );
- if (isSmokeTest) {
- compiler.hooks.failed.tap('smokeTest', async () => {
- await tsMessagesPromise;
- process.exit(1);
- });
- compiler.hooks.done.tap('smokeTest', async stats => {
- await tsMessagesPromise;
- if (stats.hasErrors() || stats.hasWarnings()) {
- process.exit(1);
- } else {
- process.exit(0);
- }
- });
- }
-
- return compiler;
+ return masterCompiler;
}
function resolveLoopback(proxy) {
diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json
index 8d8a93676c4..0392cb48d86 100644
--- a/packages/react-dev-utils/package.json
+++ b/packages/react-dev-utils/package.json
@@ -1,6 +1,6 @@
{
- "name": "react-dev-utils",
- "version": "12.0.0",
+ "name": "@ouihelp-npm/react-dev-utils",
+ "version": "12000000.0.1",
"description": "webpack utilities used by Create React App",
"repository": {
"type": "git",
diff --git a/packages/react-scripts/config/paths.js b/packages/react-scripts/config/paths.js
index f4470a02f63..8b10d7bf8f8 100644
--- a/packages/react-scripts/config/paths.js
+++ b/packages/react-scripts/config/paths.js
@@ -66,6 +66,14 @@ module.exports = {
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
+ appServiceWorkerJs: resolveModule(
+ resolveApp,
+ 'src/alternative-entrypoints/service-worker/entrypoint'
+ ),
+ appWebworkerJs: resolveModule(
+ resolveApp,
+ 'src/alternative-entrypoints/webworker/entrypoint'
+ ),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appTsConfig: resolveApp('tsconfig.json'),
@@ -91,6 +99,14 @@ module.exports = {
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
+ appServiceWorkerJs: resolveModule(
+ resolveApp,
+ 'src/alternative-entrypoints/service-worker/entrypoint'
+ ),
+ appWebworkerJs: resolveModule(
+ resolveApp,
+ 'src/alternative-entrypoints/webworker/entrypoint'
+ ),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appTsConfig: resolveApp('tsconfig.json'),
@@ -129,6 +145,14 @@ if (
appPublic: resolveOwn(`${templatePath}/public`),
appHtml: resolveOwn(`${templatePath}/public/index.html`),
appIndexJs: resolveModule(resolveOwn, `${templatePath}/src/index`),
+ appServiceWorkerJs: resolveModule(
+ resolveOwn,
+ `${templatePath}/src/alternative-entrypoints/service-worker/entrypoint`
+ ),
+ appWebworkerJs: resolveModule(
+ resolveOwn,
+ `${templatePath}/src/alternative-entrypoints/webworker/entrypoint`
+ ),
appPackageJson: resolveOwn('package.json'),
appSrc: resolveOwn(`${templatePath}/src`),
appTsConfig: resolveOwn(`${templatePath}/tsconfig.json`),
diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js
index 2b1b3bbd47d..c4e93eb6be1 100644
--- a/packages/react-scripts/config/webpack.config.js
+++ b/packages/react-scripts/config/webpack.config.js
@@ -20,10 +20,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
-const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
-const ESLintPlugin = require('eslint-webpack-plugin');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
@@ -54,13 +52,14 @@ const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', {
paths: [babelRuntimeEntry],
});
+// These two requirements are for our custom `InjectMainEntrypointManifestPlugin`.
+const { RawSource } = require('webpack-sources');
+const replaceAndUpdateSourceMap = require('workbox-build/build/lib/replace-and-update-source-map');
+
// 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';
-const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === 'true';
-const disableESLintPlugin = process.env.DISABLE_ESLINT_PLUGIN === 'true';
-
const imageInlineSizeLimit = parseInt(
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
);
@@ -73,9 +72,6 @@ const useTailwind = fs.existsSync(
path.join(paths.appPath, 'tailwind.config.js')
);
-// Get the path to the uncompiled service worker (if it exists).
-const swSrc = paths.swSrc;
-
// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
@@ -95,6 +91,56 @@ const hasJsxRuntime = (() => {
}
})();
+// Custom Webpack plugin to stamp the main entrypoint list of files
+// into our service worker.
+// Inspired by workbox's `InjectManifestPlugin`.
+let mainEntrypointFilesPromiseResolver;
+const mainEntrypointFilesPromise = new Promise(resolve => {
+ mainEntrypointFilesPromiseResolver = resolve;
+});
+
+class InjectMainEntrypointManifestPlugin {
+ apply(compiler) {
+ compiler.hooks.compilation.tap(
+ 'InjectMainEntrypointManifestPlugin',
+ compilation => {
+ compilation.hooks.processAssets.tapPromise(
+ {
+ name: 'InjectMainEntrypointManifestPlugin',
+ stage: webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_HASH,
+ },
+ assets =>
+ this.handleEmit(assets).catch(error =>
+ compilation.errors.push(error)
+ )
+ );
+ }
+ );
+ }
+
+ async handleEmit(assets) {
+ const mainEntryPointFiles = await mainEntrypointFilesPromise;
+
+ const swFileName = 'sw.js';
+ const swSrcmapFileName = 'sw.js.map';
+
+ const swAsset = assets[swFileName];
+ const initialSWAssetString = swAsset.source();
+
+ const sourcemapAsset = assets[swSrcmapFileName];
+ const { source, map } = await replaceAndUpdateSourceMap({
+ jsFilename: swFileName,
+ originalMap: JSON.parse(sourcemapAsset.source()),
+ originalSource: initialSWAssetString,
+ replaceString: JSON.stringify(Object.values(mainEntryPointFiles)),
+ searchString: '__MAIN_ENTRYPOINT_FILES',
+ });
+
+ assets[swSrcmapFileName] = new RawSource(map);
+ assets[swFileName] = new RawSource(source);
+ }
+}
+
// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function (webpackEnv) {
@@ -196,7 +242,7 @@ module.exports = function (webpackEnv) {
return loaders;
};
- return {
+ const originalConfig = {
target: ['browserslist'],
mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
// Stop compilation early in production
@@ -343,6 +389,7 @@ module.exports = function (webpackEnv) {
babelRuntimeRegenerator,
]),
],
+ symlinks: false,
},
module: {
strictExportPresence: true,
@@ -685,6 +732,9 @@ module.exports = function (webpackEnv) {
fileName => !fileName.endsWith('.map')
);
+ // Give all files to our resolver.
+ mainEntrypointFilesPromiseResolver(manifestFiles);
+
return {
files: manifestFiles,
entrypoints: entrypointFiles,
@@ -700,19 +750,6 @@ module.exports = function (webpackEnv) {
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
- // Generate a service worker script that will precache, and keep up to date,
- // the HTML & assets that are part of the webpack build.
- isEnvProduction &&
- fs.existsSync(swSrc) &&
- new WorkboxWebpackPlugin.InjectManifest({
- swSrc,
- dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
- exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
- // Bump up the default maximum size (2mb) that's precached,
- // to make lazy-loading failure scenarios less likely.
- // See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
- maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
- }),
// TypeScript type checking
useTypeScript &&
new ForkTsCheckerWebpackPlugin({
@@ -761,34 +798,176 @@ module.exports = function (webpackEnv) {
infrastructure: 'silent',
},
}),
- !disableESLintPlugin &&
- new ESLintPlugin({
- // Plugin options
- extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
- formatter: require.resolve('react-dev-utils/eslintFormatter'),
- eslintPath: require.resolve('eslint'),
- failOnError: !(isEnvDevelopment && emitErrorsAsWarnings),
- context: paths.appSrc,
- cache: true,
- cacheLocation: path.resolve(
- paths.appNodeModules,
- '.cache/.eslintcache'
- ),
- // ESLint class options
- cwd: paths.appPath,
- resolvePluginsRelativeTo: __dirname,
- baseConfig: {
- extends: [require.resolve('eslint-config-react-app/base')],
- rules: {
- ...(!hasJsxRuntime && {
- 'react/react-in-jsx-scope': 'error',
- }),
- },
- },
- }),
].filter(Boolean),
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,
+ ignoreWarnings: [
+ // Ignore warnings raised by source-map-loader.
+ // some third party packages may ship miss-configured sourcemaps, that interrupts the build
+ // See: https://github.com/facebook/create-react-app/discussions/11278#discussioncomment-1780169
+ /**
+ *
+ * @param {import('webpack').WebpackError} warning
+ * @returns {boolean}
+ */
+ function ignoreSourcemapsloaderWarnings(warning) {
+ return (
+ warning.module &&
+ warning.module.resource.includes('node_modules') &&
+ warning.details &&
+ warning.details.includes('source-map-loader')
+ );
+ },
+ ],
+ };
+
+ const serviceWorkerConfig = {
+ target: 'webworker',
+ mode: originalConfig.mode,
+ bail: originalConfig.bail,
+ devtool: originalConfig.devtool,
+ entry: { 'service-worker': paths.appServiceWorkerJs },
+ output: {
+ path: originalConfig.output.path,
+ pathinfo: originalConfig.output.pathinfo,
+ filename: 'sw.js',
+ publicPath: originalConfig.output.publicPath,
+ devtoolModuleFilenameTemplate:
+ originalConfig.output.devtoolModuleFilenameTemplate,
+ },
+ optimization: {
+ minimize: originalConfig.optimization.minimize,
+ minimizer: originalConfig.optimization.minimizer,
+ },
+ resolve: originalConfig.resolve,
+ resolveLoader: originalConfig.resolveLoader,
+ module: originalConfig.module,
+ plugins: [
+ new webpack.DefinePlugin(env.stringified),
+ useTypeScript &&
+ new ForkTsCheckerWebpackPlugin({
+ async: isEnvDevelopment,
+ typescript: {
+ typescriptPath: resolve.sync('typescript', {
+ basedir: paths.appNodeModules,
+ }),
+ configOverwrite: {
+ compilerOptions: {
+ sourceMap: isEnvProduction
+ ? shouldUseSourceMap
+ : isEnvDevelopment,
+ skipLibCheck: true,
+ inlineSourceMap: false,
+ declarationMap: false,
+ noEmit: true,
+ incremental: true,
+ tsBuildInfoFile: paths.appTsBuildInfoFile,
+ },
+ },
+ context: paths.appPath,
+ diagnosticOptions: {
+ syntactic: true,
+ },
+ mode: 'write-references',
+ // profile: true,
+ },
+ issue: {
+ // This one is specifically to match during CI tests,
+ // as micromatch doesn't match
+ // '../cra-template-typescript/template/src/App.tsx'
+ // otherwise.
+ include: [
+ { file: '../**/src/**/*.{ts,tsx}' },
+ { file: '**/src/**/*.{ts,tsx}' },
+ ],
+ exclude: [
+ { file: '**/src/**/__tests__/**' },
+ { file: '**/src/**/?(*.){spec|test}.*' },
+ { file: '**/src/setupProxy.*' },
+ { file: '**/src/setupTests.*' },
+ ],
+ },
+ logger: {
+ infrastructure: 'silent',
+ },
+ }),
+ new InjectMainEntrypointManifestPlugin(),
+ ].filter(Boolean),
+ };
+
+ const webworkerConfig = {
+ target: 'webworker',
+ mode: originalConfig.mode,
+ bail: originalConfig.bail,
+ devtool: originalConfig.devtool,
+ entry: { webworker: paths.appWebworkerJs },
+ output: {
+ path: originalConfig.output.path,
+ pathinfo: originalConfig.output.pathinfo,
+ filename: 'webworker.js',
+ publicPath: originalConfig.output.publicPath,
+ devtoolModuleFilenameTemplate:
+ originalConfig.output.devtoolModuleFilenameTemplate,
+ },
+ optimization: {
+ minimize: originalConfig.optimization.minimize,
+ minimizer: originalConfig.optimization.minimizer,
+ },
+ resolve: originalConfig.resolve,
+ resolveLoader: originalConfig.resolveLoader,
+ module: originalConfig.module,
+ plugins: [
+ new webpack.DefinePlugin(env.stringified),
+ useTypeScript &&
+ new ForkTsCheckerWebpackPlugin({
+ async: isEnvDevelopment,
+ typescript: {
+ typescriptPath: resolve.sync('typescript', {
+ basedir: paths.appNodeModules,
+ }),
+ configOverwrite: {
+ compilerOptions: {
+ sourceMap: isEnvProduction
+ ? shouldUseSourceMap
+ : isEnvDevelopment,
+ skipLibCheck: true,
+ inlineSourceMap: false,
+ declarationMap: false,
+ noEmit: true,
+ incremental: true,
+ tsBuildInfoFile: paths.appTsBuildInfoFile,
+ },
+ },
+ context: paths.appPath,
+ diagnosticOptions: {
+ syntactic: true,
+ },
+ mode: 'write-references',
+ // profile: true,
+ },
+ issue: {
+ // This one is specifically to match during CI tests,
+ // as micromatch doesn't match
+ // '../cra-template-typescript/template/src/App.tsx'
+ // otherwise.
+ include: [
+ { file: '../**/src/**/*.{ts,tsx}' },
+ { file: '**/src/**/*.{ts,tsx}' },
+ ],
+ exclude: [
+ { file: '**/src/**/__tests__/**' },
+ { file: '**/src/**/?(*.){spec|test}.*' },
+ { file: '**/src/setupProxy.*' },
+ { file: '**/src/setupTests.*' },
+ ],
+ },
+ logger: {
+ infrastructure: 'silent',
+ },
+ }),
+ ].filter(Boolean),
};
+
+ return [originalConfig, serviceWorkerConfig, webworkerConfig];
};
diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json
index 99b82701669..d2a4a2615e9 100644
--- a/packages/react-scripts/package.json
+++ b/packages/react-scripts/package.json
@@ -1,6 +1,6 @@
{
- "name": "react-scripts",
- "version": "5.0.0",
+ "name": "@ouihelp-npm/react-scripts",
+ "version": "5000000.0.7",
"description": "Configuration and scripts for Create React App.",
"repository": {
"type": "git",
@@ -29,6 +29,7 @@
"types": "./lib/react-app.d.ts",
"dependencies": {
"@babel/core": "^7.16.0",
+ "@ouihelp-npm/react-dev-utils": "12000000.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
"@svgr/webpack": "^5.5.0",
"babel-jest": "^27.4.2",
@@ -74,7 +75,7 @@
"webpack": "^5.64.4",
"webpack-dev-server": "^4.6.0",
"webpack-manifest-plugin": "^4.0.2",
- "workbox-webpack-plugin": "^6.4.1"
+ "workbox-build": "5.1.4"
},
"devDependencies": {
"react": "^17.0.2",
diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js
index 7a3a635a5d3..fd110957b4d 100644
--- a/packages/react-scripts/scripts/build.js
+++ b/packages/react-scripts/scripts/build.js
@@ -32,7 +32,7 @@ const paths = require('../config/paths');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
-const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
+const FileSizeReporter = require('@ouihelp-npm/react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError');
const measureFileSizesBeforeBuild =
@@ -106,7 +106,7 @@ checkBrowsers(paths.appPath, isInteractive)
const appPackage = require(paths.appPackageJson);
const publicUrl = paths.publicUrlOrPath;
- const publicPath = config.output.publicPath;
+ const publicPath = config[0].output.publicPath;
const buildFolder = path.relative(process.cwd(), paths.appBuild);
printHostingInstructions(
appPackage,
diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js
index 8b9a2c26b4d..2e1605eafcd 100644
--- a/packages/react-scripts/scripts/start.js
+++ b/packages/react-scripts/scripts/start.js
@@ -33,7 +33,7 @@ const {
createCompiler,
prepareProxy,
prepareUrls,
-} = require('react-dev-utils/WebpackDevServerUtils');
+} = require('@ouihelp-npm/react-dev-utils/WebpackDevServerUtils');
const openBrowser = require('react-dev-utils/openBrowser');
const semver = require('semver');
const paths = require('../config/paths');
diff --git a/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js b/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
index cdc2d77a880..89db111cbe7 100644
--- a/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
+++ b/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
@@ -290,7 +290,7 @@ function verifyTypeScriptSetup() {
if (!fs.existsSync(paths.appTypeDeclarations)) {
fs.writeFileSync(
paths.appTypeDeclarations,
- `/// ${os.EOL}`
+ `/// ${os.EOL}`
);
}
}