Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Upgrade react-dev-utils to 12.0.0 #17017

Closed
2 changes: 1 addition & 1 deletion app/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"global": "^4.4.0",
"lodash": "^4.17.21",
"prop-types": "^15.7.2",
"react-dev-utils": "^11.0.4",
"react-dev-utils": "^12.0.0",
"react-refresh": "^0.10.0",
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
Expand Down
2 changes: 1 addition & 1 deletion lib/builder-webpack4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"postcss-flexbugs-fixes": "^4.2.1",
"postcss-loader": "^4.2.0",
"raw-loader": "^4.0.2",
"react-dev-utils": "^11.0.4",
"react-dev-utils": "^12.0.0",
"stable": "^0.1.8",
"style-loader": "^1.3.0",
"terser-webpack-plugin": "^4.2.3",
Expand Down
3 changes: 0 additions & 3 deletions lib/builder-webpack4/src/preview/iframe-webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpac
import type { Configuration, RuleSetRule } from '@types/webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
import VirtualModulePlugin from 'webpack-virtual-modules';
import PnpWebpackPlugin from 'pnp-webpack-plugin';
Expand All @@ -19,7 +18,6 @@ import {
es6Transpiler,
handlebars,
interpolate,
nodeModulesPaths,
Options,
toImportFn,
normalizeStories,
Expand Down Expand Up @@ -212,7 +210,6 @@ export default async (options: Options & Record<string, any>): Promise<Configura
...stringifyProcessEnvs(envs),
NODE_ENV: JSON.stringify(envs.NODE_ENV),
}),
isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths),
isProd ? null : new HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
quiet ? null : new ProgressPlugin({}),
Expand Down
2 changes: 1 addition & 1 deletion lib/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"glob-promise": "^3.4.0",
"html-webpack-plugin": "^5.0.0",
"path-browserify": "^1.0.1",
"react-dev-utils": "^11.0.4",
"react-dev-utils": "^12.0.0",
"stable": "^0.1.8",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.0.3",
Expand Down
3 changes: 0 additions & 3 deletions lib/builder-webpack5/src/preview/iframe-webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
import VirtualModulePlugin from 'webpack-virtual-modules';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
Expand All @@ -19,7 +18,6 @@ import {
toRequireContextString,
es6Transpiler,
stringifyProcessEnvs,
nodeModulesPaths,
handlebars,
interpolate,
Options,
Expand Down Expand Up @@ -217,7 +215,6 @@ export default async (options: Options & Record<string, any>): Promise<Configura
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
}),
new ProvidePlugin({ process: 'process/browser.js' }),
isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths),
isProd ? null : new HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
quiet ? null : new ProgressPlugin({}),
Expand Down
245 changes: 245 additions & 0 deletions lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,248 @@ Object {
],
}
`;

exports[`cra-ts-essentials preview dev mode 1`] = `
Object {
"entry": Array [
"NODE_MODULES/@storybook/addon-ie11/dist/event-source-polyfill.js",
"ROOT/lib/core-client/dist/esm/globals/polyfills.js",
"ROOT/lib/core-client/dist/esm/manager/index.js",
"ROOT/addons/docs/dist/esm/register.js",
"ROOT/addons/controls/dist/esm/register.js",
"ROOT/addons/actions/dist/esm/register.js",
"ROOT/addons/backgrounds/dist/esm/register.js",
"ROOT/addons/toolbars/dist/esm/register.js",
"ROOT/addons/measure/dist/esm/register.js",
"ROOT/addons/outline/dist/esm/register.js",
],
"keys": Array [
"name",
"mode",
"bail",
"devtool",
"entry",
"output",
"watchOptions",
"plugins",
"module",
"resolve",
"resolveLoader",
"recordsPath",
"performance",
"optimization",
],
"module": Object {
"rules": Array [
Object {
"exclude": Array [
"NODE_MODULES/",
"/dist/",
],
"include": Array [
"ROOT",
],
"test": "/\\\\.(mjs|tsx?|jsx?)$/",
"use": Array [
Object {
"loader": "NODE_MODULES/babel-loader/lib/index.js",
"options": Object {
"babelrc": false,
"configFile": false,
"plugins": Array [
"NODE_MODULES/@babel/plugin-transform-shorthand-properties/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-block-scoping/lib/index.js",
Array [
"NODE_MODULES/@babel/plugin-proposal-decorators/lib/index.js",
Object {
"legacy": true,
},
],
Array [
"NODE_MODULES/@babel/plugin-proposal-class-properties/lib/index.js",
Object {
"loose": true,
},
],
Array [
"NODE_MODULES/@babel/plugin-proposal-private-methods/lib/index.js",
Object {
"loose": true,
},
],
"NODE_MODULES/@babel/plugin-proposal-export-default-from/lib/index.js",
"NODE_MODULES/@babel/plugin-syntax-dynamic-import/lib/index.js",
Array [
"NODE_MODULES/@babel/plugin-proposal-object-rest-spread/lib/index.js",
Object {
"loose": true,
"useBuiltIns": true,
},
],
"NODE_MODULES/@babel/plugin-transform-classes/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-arrow-functions/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-parameters/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-destructuring/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-spread/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-for-of/lib/index.js",
"NODE_MODULES/babel-plugin-macros/dist/index.js",
"NODE_MODULES/@babel/plugin-proposal-optional-chaining/lib/index.js",
"NODE_MODULES/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js",
Array [
"NODE_MODULES/babel-plugin-polyfill-corejs3/lib/index.js",
Object {
"absoluteImports": "NODE_MODULES/core-js/index.js",
"method": "usage-global",
"version": "*",
},
],
"NODE_MODULES/@babel/plugin-transform-template-literals/lib/index.js",
],
"presets": Array [
Array [
"NODE_MODULES/@babel/preset-env/lib/index.js",
Object {
"loose": true,
"shippedProposals": true,
},
],
"NODE_MODULES/@babel/preset-typescript/lib/index.js",
"NODE_MODULES/@babel/preset-react/lib/index.js",
],
"sourceType": "unambiguous",
},
},
],
},
Object {
"include": [Function],
"test": "/\\\\.js$/",
"use": Array [
Object {
"loader": "NODE_MODULES/babel-loader/lib/index.js",
"options": Object {
"plugins": Array [
"NODE_MODULES/@babel/plugin-transform-shorthand-properties/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-block-scoping/lib/index.js",
Array [
"NODE_MODULES/@babel/plugin-proposal-decorators/lib/index.js",
Object {
"legacy": true,
},
],
Array [
"NODE_MODULES/@babel/plugin-proposal-class-properties/lib/index.js",
Object {
"loose": true,
},
],
Array [
"NODE_MODULES/@babel/plugin-proposal-private-methods/lib/index.js",
Object {
"loose": true,
},
],
"NODE_MODULES/@babel/plugin-proposal-export-default-from/lib/index.js",
"NODE_MODULES/@babel/plugin-syntax-dynamic-import/lib/index.js",
Array [
"NODE_MODULES/@babel/plugin-proposal-object-rest-spread/lib/index.js",
Object {
"loose": true,
"useBuiltIns": true,
},
],
"NODE_MODULES/@babel/plugin-transform-classes/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-arrow-functions/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-parameters/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-destructuring/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-spread/lib/index.js",
"NODE_MODULES/@babel/plugin-transform-for-of/lib/index.js",
"NODE_MODULES/babel-plugin-macros/dist/index.js",
"NODE_MODULES/@babel/plugin-proposal-optional-chaining/lib/index.js",
"NODE_MODULES/@babel/plugin-proposal-nullish-coalescing-operator/lib/index.js",
Array [
"NODE_MODULES/babel-plugin-polyfill-corejs3/lib/index.js",
Object {
"absoluteImports": "NODE_MODULES/core-js/index.js",
"method": "usage-global",
"version": "*",
},
],
],
"presets": Array [
Array [
"NODE_MODULES/@babel/preset-env/lib/index.js",
Object {
"loose": true,
"modules": false,
"shippedProposals": true,
"targets": "defaults",
},
],
"NODE_MODULES/@babel/preset-react/lib/index.js",
],
"sourceType": "unambiguous",
},
},
],
},
Object {
"test": "/\\\\.css$/",
"use": Array [
"NODE_MODULES/style-loader/dist/cjs.js",
Object {
"loader": "NODE_MODULES/css-loader/dist/cjs.js",
"options": Object {
"importLoaders": 1,
},
},
],
},
Object {
"loader": "NODE_MODULES/file-loader/dist/cjs.js",
"options": Object {
"name": "static/media/[path][name].[ext]",
},
"test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/",
},
Object {
"loader": "NODE_MODULES/url-loader/dist/cjs.js",
"options": Object {
"limit": 10000,
"name": "static/media/[path][name].[ext]",
},
"test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/",
},
Object {
"include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/",
"test": "/\\\\.js$/",
"use": Array [
Object {
"loader": "NODE_MODULES/babel-loader/lib/index.js",
"options": Object {
"presets": Array [
Array [
"@babel/preset-env",
Object {
"targets": Object {
"ie": "11",
},
},
"storybook-addon-ie11",
],
],
"sourceType": "unambiguous",
},
},
],
},
],
},
"plugins": Array [
"VirtualModulesPlugin",
"HtmlWebpackPlugin",
"CaseSensitivePathsPlugin",
"DefinePlugin",
],
}
`;
Loading