Skip to content

Commit ba376cd

Browse files
committed
Delete fixtures folder
1 parent da89fc7 commit ba376cd

File tree

108 files changed

+94
-2681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+94
-2681
lines changed

packages/react-scripts/config/modules.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const fs = require('fs');
1212
const path = require('path');
1313
const paths = require('./paths');
1414
const chalk = require('react-dev-utils/chalk');
15+
const resolve = require('resolve');
1516

1617
/**
1718
* Get the baseUrl of a compilerOptions object.
@@ -71,7 +72,10 @@ function getModules() {
7172
// TypeScript project and set up the config
7273
// based on tsconfig.json
7374
if (hasTsConfig) {
74-
config = require(paths.appTsConfig);
75+
const ts = require(resolve.sync('typescript', {
76+
basedir: paths.appNodeModules,
77+
}));
78+
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
7579
// Otherwise we'll check if there is jsconfig.json
7680
// for non TS projects.
7781
} else if (hasJsConfig) {

packages/react-scripts/config/webpack.config.js

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,24 @@ const getClientEnvironment = require('./env');
3333
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
3434
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
3535
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
36+
const eslint = require('eslint');
3637
// @remove-on-eject-begin
3738
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
3839
// @remove-on-eject-end
3940
const postcssNormalize = require('postcss-normalize');
4041

42+
const appPackageJson = require(paths.appPackageJson);
43+
4144
// Source maps are resource heavy and can cause out of memory issue for large source files.
4245
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
4346
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
4447
// makes for a smoother build process.
4548
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
4649

50+
const imageInlineSizeLimit = parseInt(
51+
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
52+
);
53+
4754
// Check if TypeScript is setup
4855
const useTypeScript = fs.existsSync(paths.appTsConfig);
4956

@@ -117,12 +124,20 @@ module.exports = function(webpackEnv) {
117124
},
118125
].filter(Boolean);
119126
if (preProcessor) {
120-
loaders.push({
121-
loader: require.resolve(preProcessor),
122-
options: {
123-
sourceMap: isEnvProduction && shouldUseSourceMap,
127+
loaders.push(
128+
{
129+
loader: require.resolve('resolve-url-loader'),
130+
options: {
131+
sourceMap: isEnvProduction && shouldUseSourceMap,
132+
},
124133
},
125-
});
134+
{
135+
loader: require.resolve(preProcessor),
136+
options: {
137+
sourceMap: true,
138+
},
139+
}
140+
);
126141
}
127142
return loaders;
128143
};
@@ -184,6 +199,9 @@ module.exports = function(webpackEnv) {
184199
.replace(/\\/g, '/')
185200
: isEnvDevelopment &&
186201
(info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
202+
// Prevents conflicts when multiple Webpack runtimes (from different apps)
203+
// are used on the same page.
204+
jsonpFunction: `webpackJsonp${appPackageJson.name}`,
187205
},
188206
optimization: {
189207
minimize: isEnvProduction,
@@ -192,8 +210,8 @@ module.exports = function(webpackEnv) {
192210
new TerserPlugin({
193211
terserOptions: {
194212
parse: {
195-
// we want terser to parse ecma 8 code. However, we don't want it
196-
// to apply any minfication steps that turns valid ecma 5 code
213+
// We want terser to parse ecma 8 code. However, we don't want it
214+
// to apply any minification steps that turns valid ecma 5 code
197215
// into invalid ecma 5 code. This is why the 'compress' and 'output'
198216
// sections only apply transformations that are ecma 5 safe
199217
// https://github.com/facebook/create-react-app/pull/4234
@@ -209,7 +227,7 @@ module.exports = function(webpackEnv) {
209227
comparisons: false,
210228
// Disabled because of an issue with Terser breaking valid code:
211229
// https://github.com/facebook/create-react-app/issues/5250
212-
// Pending futher investigation:
230+
// Pending further investigation:
213231
// https://github.com/terser-js/terser/issues/120
214232
inline: 2,
215233
},
@@ -318,10 +336,26 @@ module.exports = function(webpackEnv) {
318336
options: {
319337
formatter: require.resolve('react-dev-utils/eslintFormatter'),
320338
eslintPath: require.resolve('eslint'),
339+
resolvePluginsRelativeTo: __dirname,
321340
// @remove-on-eject-begin
322-
baseConfig: {
323-
extends: [require.resolve('eslint-config-react-app')],
324-
},
341+
baseConfig: (() => {
342+
const eslintCli = new eslint.CLIEngine();
343+
let eslintConfig;
344+
try {
345+
eslintConfig = eslintCli.getConfigForFile(paths.appIndexJs);
346+
} catch (e) {
347+
// A config couldn't be found.
348+
}
349+
350+
// We allow overriding the config only if the env variable is set
351+
if (process.env.EXTEND_ESLINT && eslintConfig) {
352+
return eslintConfig;
353+
} else {
354+
return {
355+
extends: [require.resolve('eslint-config-react-app')],
356+
};
357+
}
358+
})(),
325359
ignore: false,
326360
useEslintrc: false,
327361
// @remove-on-eject-end
@@ -343,7 +377,7 @@ module.exports = function(webpackEnv) {
343377
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
344378
loader: require.resolve('url-loader'),
345379
options: {
346-
limit: 10000,
380+
limit: imageInlineSizeLimit,
347381
name: 'static/media/[name].[hash:8].[ext]',
348382
},
349383
},
@@ -384,7 +418,8 @@ module.exports = function(webpackEnv) {
384418
{
385419
loaderMap: {
386420
svg: {
387-
ReactComponent: '@svgr/webpack?-svgo,+ref![path]',
421+
ReactComponent:
422+
'@svgr/webpack?-svgo,+titleProp,+ref![path]',
388423
},
389424
},
390425
},
@@ -623,9 +658,11 @@ module.exports = function(webpackEnv) {
623658
navigateFallbackBlacklist: [
624659
// Exclude URLs starting with /_, as they're likely an API call
625660
new RegExp('^/_'),
626-
// Exclude URLs containing a dot, as they're likely a resource in
627-
// public/ and not a SPA route
628-
new RegExp('/[^/]+\\.[^/]+$'),
661+
// Exclude any URLs whose last part seems to be a file extension
662+
// as they're likely a resource and not a SPA route.
663+
// URLs containing a "?" character won't be blacklisted as they're likely
664+
// a route with query params (e.g. auth callbacks).
665+
new RegExp('/[^/?]+\\.[^/]+$'),
629666
],
630667
}),
631668
// TypeScript type checking

packages/react-scripts/cra-original-package.json

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts",
3-
"version": "3.0.1",
3+
"version": "3.1.1",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",
@@ -28,72 +28,69 @@
2828
},
2929
"types": "./lib/react-app.d.ts",
3030
"dependencies": {
31-
"@babel/core": "7.4.3",
32-
"@svgr/webpack": "4.1.0",
33-
"@typescript-eslint/eslint-plugin": "1.6.0",
34-
"@typescript-eslint/parser": "1.6.0",
35-
"babel-eslint": "10.0.1",
31+
"@babel/core": "7.5.5",
32+
"@svgr/webpack": "4.3.2",
33+
"@typescript-eslint/eslint-plugin": "1.13.0",
34+
"@typescript-eslint/parser": "1.13.0",
35+
"babel-eslint": "10.0.2",
3636
"babel-jest": "^24.8.0",
37-
"babel-loader": "8.0.5",
38-
"babel-plugin-named-asset-import": "^0.3.2",
39-
"babel-preset-react-app": "^9.0.0",
37+
"babel-loader": "8.0.6",
38+
"babel-plugin-named-asset-import": "^0.3.3",
39+
"babel-preset-react-app": "^9.0.1",
4040
"camelcase": "^5.2.0",
4141
"case-sensitive-paths-webpack-plugin": "2.2.0",
4242
"css-loader": "2.1.1",
4343
"dotenv": "6.2.0",
4444
"dotenv-expand": "4.2.0",
45-
"eslint": "^5.16.0",
46-
"eslint-config-react-app": "^4.0.1",
47-
"eslint-loader": "2.1.2",
48-
"eslint-plugin-flowtype": "2.50.1",
49-
"eslint-plugin-import": "2.16.0",
50-
"eslint-plugin-jsx-a11y": "6.2.1",
51-
"eslint-plugin-react": "7.12.4",
52-
"eslint-plugin-react-hooks": "^1.5.0",
45+
"eslint": "^6.1.0",
46+
"eslint-config-react-app": "^5.0.1",
47+
"eslint-loader": "2.2.1",
48+
"eslint-plugin-flowtype": "3.13.0",
49+
"eslint-plugin-import": "2.18.2",
50+
"eslint-plugin-jsx-a11y": "6.2.3",
51+
"eslint-plugin-react": "7.14.3",
52+
"eslint-plugin-react-hooks": "^1.6.1",
5353
"file-loader": "3.0.1",
5454
"fs-extra": "7.0.1",
5555
"html-webpack-plugin": "4.0.0-beta.5",
5656
"identity-obj-proxy": "3.0.0",
5757
"is-wsl": "^1.1.0",
58-
"jest": "24.7.1",
58+
"jest": "24.8.0",
5959
"jest-environment-jsdom-fourteen": "0.1.0",
60-
"jest-resolve": "24.7.1",
61-
"jest-watch-typeahead": "0.3.0",
60+
"jest-resolve": "24.8.0",
61+
"jest-watch-typeahead": "0.3.1",
6262
"mini-css-extract-plugin": "0.5.0",
63-
"optimize-css-assets-webpack-plugin": "5.0.1",
64-
"pnp-webpack-plugin": "1.2.1",
63+
"optimize-css-assets-webpack-plugin": "5.0.3",
64+
"pnp-webpack-plugin": "1.5.0",
6565
"postcss-flexbugs-fixes": "4.1.0",
6666
"postcss-loader": "3.0.0",
6767
"postcss-normalize": "7.0.1",
68-
"postcss-preset-env": "6.6.0",
68+
"postcss-preset-env": "6.7.0",
6969
"postcss-safe-parser": "4.0.1",
70-
"react-app-polyfill": "^1.0.1",
71-
"react-dev-utils": "^9.0.1",
72-
"resolve": "1.10.0",
73-
"sass-loader": "7.1.0",
74-
"semver": "6.0.0",
75-
"style-loader": "0.23.1",
76-
"terser-webpack-plugin": "1.2.3",
70+
"react-app-polyfill": "^1.0.2",
71+
"react-dev-utils": "^9.0.3",
72+
"resolve": "1.12.0",
73+
"resolve-url-loader": "3.1.0",
74+
"sass-loader": "7.2.0",
75+
"semver": "6.3.0",
76+
"style-loader": "1.0.0",
77+
"terser-webpack-plugin": "1.4.1",
7778
"ts-pnp": "1.1.2",
78-
"url-loader": "1.1.2",
79-
"webpack": "4.29.6",
79+
"url-loader": "2.1.0",
80+
"webpack": "4.39.1",
8081
"webpack-dev-server": "3.2.1",
8182
"webpack-manifest-plugin": "2.0.4",
82-
"workbox-webpack-plugin": "4.2.0"
83+
"workbox-webpack-plugin": "4.3.1"
8384
},
8485
"devDependencies": {
8586
"react": "^16.8.4",
8687
"react-dom": "^16.8.4"
8788
},
8889
"optionalDependencies": {
89-
"fsevents": "2.0.6"
90+
"fsevents": "2.0.7"
9091
},
9192
"browserslist": {
92-
"production": [
93-
">0.2%",
94-
"not dead",
95-
"not op_mini all"
96-
],
93+
"production": [">0.2%", "not dead", "not op_mini all"],
9794
"development": [
9895
"last 1 chrome version",
9996
"last 1 firefox version",

packages/react-scripts/fixtures/kitchensink/.env

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/.env.development

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/.env.local

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/.env.production

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/.flowconfig

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/.template.dependencies.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/react-scripts/fixtures/kitchensink/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)