From 7329dd5c7c872a882683270c8bd9ac451d89e324 Mon Sep 17 00:00:00 2001 From: William Monk Date: Sun, 5 Aug 2018 10:09:23 +0100 Subject: [PATCH] Lift all react-scripts-ts content to root --- CHANGELOG-0.x.md | 1374 - CHANGELOG.md | 0 CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 132 - LICENSE | 21 - README.md | 195 +- appveyor.cleanup-cache.txt | 6 - appveyor.yml | 42 - .../bin => bin}/react-scripts-ts.js | 0 bootstrap.js | 67 - .../react-scripts/config => config}/env.js | 0 .../config => config}/jest/babelTransform.js | 0 .../config => config}/jest/cssTransform.js | 0 .../config => config}/jest/fileTransform.js | 0 .../jest/typescriptTransform.js | 0 .../react-scripts/config => config}/paths.js | 0 .../config => config}/polyfills.js | 0 .../config => config}/webpack.config.dev.js | 0 .../config => config}/webpack.config.prod.js | 0 .../webpackDevServer.config.js | 0 packages/react-scripts/eslintrc => eslintrc | 0 .../kitchensink/.babelrc | 0 .../fixtures => fixtures}/kitchensink/.env | 0 .../kitchensink/.env.development | 0 .../kitchensink/.env.local | 0 .../kitchensink/.env.production | 0 .../kitchensink/.flowconfig | 0 .../kitchensink/.template.dependencies.json | 0 .../kitchensink/README.md | 0 .../kitchensink/gitignore | 0 .../kitchensink/integration/env.test.js | 0 .../kitchensink/integration/initDOM.js | 0 .../kitchensink/integration/syntax.test.js | 0 .../kitchensink/integration/webpack.test.js | 0 .../kitchensink/public/favicon.ico | Bin .../kitchensink/public/index.html | 0 .../kitchensink/src/App.js | 0 .../kitchensink/src/absoluteLoad.js | 0 .../src/features/env/ExpandEnvVariables.js | 0 .../features/env/ExpandEnvVariables.test.js | 0 .../src/features/env/FileEnvVariables.js | 0 .../src/features/env/FileEnvVariables.test.js | 0 .../kitchensink/src/features/env/NodePath.js | 0 .../src/features/env/NodePath.test.js | 0 .../kitchensink/src/features/env/PublicUrl.js | 0 .../src/features/env/PublicUrl.test.js | 0 .../src/features/env/ShellEnvVariables.js | 0 .../features/env/ShellEnvVariables.test.js | 0 .../src/features/syntax/ArrayDestructuring.js | 0 .../syntax/ArrayDestructuring.test.js | 0 .../src/features/syntax/ArraySpread.js | 0 .../src/features/syntax/ArraySpread.test.js | 0 .../src/features/syntax/AsyncAwait.js | 0 .../src/features/syntax/AsyncAwait.test.js | 0 .../src/features/syntax/ClassProperties.js | 0 .../features/syntax/ClassProperties.test.js | 0 .../src/features/syntax/ComputedProperties.js | 0 .../syntax/ComputedProperties.test.js | 0 .../features/syntax/CustomInterpolation.js | 0 .../syntax/CustomInterpolation.test.js | 0 .../src/features/syntax/DefaultParameters.js | 0 .../features/syntax/DefaultParameters.test.js | 0 .../features/syntax/DestructuringAndAwait.js | 0 .../syntax/DestructuringAndAwait.test.js | 0 .../src/features/syntax/Generators.js | 0 .../src/features/syntax/Generators.test.js | 0 .../features/syntax/ObjectDestructuring.js | 0 .../syntax/ObjectDestructuring.test.js | 0 .../src/features/syntax/ObjectSpread.js | 0 .../src/features/syntax/ObjectSpread.test.js | 0 .../src/features/syntax/Promises.js | 0 .../src/features/syntax/Promises.test.js | 0 .../src/features/syntax/RestAndDefault.js | 0 .../features/syntax/RestAndDefault.test.js | 0 .../src/features/syntax/RestParameters.js | 0 .../features/syntax/RestParameters.test.js | 0 .../features/syntax/TemplateInterpolation.js | 0 .../syntax/TemplateInterpolation.test.js | 0 .../src/features/webpack/CssInclusion.js | 0 .../src/features/webpack/CssInclusion.test.js | 0 .../src/features/webpack/ImageInclusion.js | 0 .../features/webpack/ImageInclusion.test.js | 0 .../src/features/webpack/JsonInclusion.js | 0 .../features/webpack/JsonInclusion.test.js | 0 .../src/features/webpack/LinkedModules.js | 0 .../features/webpack/LinkedModules.test.js | 0 .../src/features/webpack/NoExtInclusion.js | 0 .../features/webpack/NoExtInclusion.test.js | 0 .../src/features/webpack/SvgInclusion.js | 0 .../src/features/webpack/SvgInclusion.test.js | 0 .../features/webpack/UnknownExtInclusion.js | 0 .../webpack/UnknownExtInclusion.test.js | 0 .../webpack/assets/aFileWithExt.unknown | 0 .../features/webpack/assets/aFileWithoutExt | 0 .../src/features/webpack/assets/abstract.json | 0 .../src/features/webpack/assets/logo.svg | 0 .../src/features/webpack/assets/style.css | 0 .../features/webpack/assets/tiniest-cat.jpg | Bin .../kitchensink/src/index.js | 0 .../kitchensink/src/subfolder/lol.js | 0 lerna.json | 18 - package.json | 99 +- packages/babel-preset-react-app/README.md | 33 - packages/babel-preset-react-app/index.js | 140 - packages/babel-preset-react-app/package.json | 31 - packages/create-react-app/README.md | 7 - packages/create-react-app/createReactApp.js | 722 - packages/create-react-app/index.js | 58 - packages/create-react-app/package.json | 35 - packages/eslint-config-react-app/README.md | 67 - packages/eslint-config-react-app/index.js | 294 - packages/eslint-config-react-app/package.json | 21 - packages/react-dev-utils/FileSizeReporter.js | 152 - .../react-dev-utils/InterpolateHtmlPlugin.js | 44 - packages/react-dev-utils/ModuleScopePlugin.js | 70 - packages/react-dev-utils/README.md | 328 - .../WatchMissingNodeModulesPlugin.js | 35 - .../react-dev-utils/WebpackDevServerUtils.js | 430 - packages/react-dev-utils/__tests__/.eslintrc | 5 - .../__tests__/ignoredFiles.test.js | 55 - .../react-dev-utils/checkRequiredFiles.js | 32 - packages/react-dev-utils/clearConsole.js | 14 - packages/react-dev-utils/crossSpawn.js | 12 - .../react-dev-utils/errorOverlayMiddleware.js | 23 - packages/react-dev-utils/eslintFormatter.js | 91 - .../react-dev-utils/formatWebpackMessages.js | 125 - packages/react-dev-utils/getProcessForPort.js | 80 - packages/react-dev-utils/ignoredFiles.js | 20 - packages/react-dev-utils/inquirer.js | 12 - packages/react-dev-utils/launchEditor.js | 308 - .../react-dev-utils/launchEditorEndpoint.js | 10 - .../noopServiceWorkerMiddleware.js | 38 - packages/react-dev-utils/openBrowser.js | 125 - .../react-dev-utils/openChrome.applescript | 83 - packages/react-dev-utils/printBuildError.js | 45 - .../printHostingInstructions.js | 116 - .../react-dev-utils/webpackHotDevClient.js | 274 - packages/react-error-overlay/.babelrc | 3 - packages/react-error-overlay/.eslintrc | 6 - packages/react-error-overlay/.flowconfig | 15 - packages/react-error-overlay/.gitattributes | 1 - packages/react-error-overlay/.gitignore | 2 - packages/react-error-overlay/.npmignore | 3 - packages/react-error-overlay/README.md | 11 - packages/react-error-overlay/build.js | 94 - .../fixtures/bundle-default.json | 86 - .../react-error-overlay/fixtures/bundle.json | 518 - .../react-error-overlay/fixtures/bundle.mjs | 41224 --------------- .../fixtures/bundle.mjs.map | 1 - .../react-error-overlay/fixtures/bundle2.json | 122 - .../react-error-overlay/fixtures/bundle_u.mjs | 41488 ---------------- .../fixtures/bundle_u.mjs.map | 1 - .../fixtures/inline.es6.mjs | 5 - .../react-error-overlay/fixtures/inline.mjs | 12 - .../fixtures/junk-inline.mjs | 12 - packages/react-error-overlay/flow/env.js | 19 - .../__snapshots__/lines-around.js.snap | 61 - .../__snapshots__/script-lines.js.snap | 17 - .../__snapshots__/stack-frame.js.snap | 31 - .../__tests__/__snapshots__/unmapper.js.snap | 102 - .../src/__tests__/extract-source-map.js | 30 - .../src/__tests__/get-source-map.js | 63 - .../src/__tests__/lines-around.js | 18 - .../src/__tests__/mapper.js | 81 - .../parser/__snapshots__/chrome.js.snap | 54 - .../parser/__snapshots__/firefox.js.snap | 230 - .../parser/__snapshots__/react.js.snap | 54 - .../parser/__snapshots__/safari.js.snap | 42 - .../src/__tests__/parser/chrome.js | 20 - .../src/__tests__/parser/firefox.js | 60 - .../src/__tests__/parser/generic.js | 30 - .../src/__tests__/parser/react.js | 20 - .../src/__tests__/parser/safari.js | 20 - .../src/__tests__/script-lines.js | 16 - .../src/__tests__/setupJest.js | 8 - .../src/__tests__/stack-frame.js | 36 - .../src/__tests__/unmapper.js | 72 - .../src/components/CloseButton.js | 36 - .../src/components/CodeBlock.js | 52 - .../src/components/Collapsible.js | 88 - .../src/components/ErrorOverlay.js | 83 - .../src/components/Footer.js | 34 - .../src/components/Header.js | 33 - .../src/components/NavigationBar.js | 68 - .../src/containers/CompileErrorContainer.js | 51 - .../src/containers/RuntimeError.js | 69 - .../src/containers/RuntimeErrorContainer.js | 86 - .../src/containers/StackFrame.js | 190 - .../src/containers/StackFrameCodeBlock.js | 95 - .../src/containers/StackTrace.js | 92 - .../src/effects/proxyConsole.js | 70 - .../src/effects/stackTraceLimit.js | 43 - .../src/effects/unhandledError.js | 47 - .../src/effects/unhandledRejection.js | 53 - .../react-error-overlay/src/iframeScript.js | 64 - packages/react-error-overlay/src/index.js | 179 - .../src/listenToRuntimeErrors.js | 84 - packages/react-error-overlay/src/styles.js | 54 - .../src/utils/dom/absolutifyCaret.js | 41 - .../react-error-overlay/src/utils/dom/css.js | 47 - .../src/utils/generateAnsiHTML.js | 105 - .../src/utils/getLinesAround.js | 37 - .../src/utils/getPrettyURL.js | 47 - .../src/utils/getSourceMap.js | 128 - .../src/utils/getStackFrames.js | 48 - .../src/utils/isBultinErrorName.js | 25 - .../src/utils/isInternalFile.js | 19 - .../react-error-overlay/src/utils/mapper.js | 69 - .../src/utils/parseCompileError.js | 61 - .../react-error-overlay/src/utils/parser.js | 85 - .../src/utils/pollyfills.js | 18 - .../src/utils/stack-frame.js | 120 - .../react-error-overlay/src/utils/unmapper.js | 125 - .../react-error-overlay/src/utils/warnings.js | 51 - .../webpack.config.iframe.js | 48 - .../react-error-overlay/webpack.config.js | 37 - packages/react-scripts/.npmignore | 1 - packages/react-scripts/README.md | 7 - screencast.svg | 1 - .../scripts => scripts}/build.js | 0 .../scripts => scripts}/eject.js | 0 .../react-scripts/scripts => scripts}/init.js | 0 .../scripts => scripts}/start.js | 0 .../react-scripts/scripts => scripts}/test.js | 0 .../utils/createJestConfig.js | 0 tasks/cra.js | 109 - tasks/e2e-old-node.sh | 61 - tasks/local-test.sh | 111 - tasks/publish.sh | 39 - tasks/replace-own-deps.js | 28 - .../template => template}/README.md | 0 .../template => template}/gitignore | 0 .../template => template}/images.d.ts | 0 .../template => template}/public/favicon.ico | Bin .../template => template}/public/index.html | 0 .../public/manifest.json | 0 .../template => template}/src/App.css | 0 .../template => template}/src/App.test.tsx | 0 .../template => template}/src/App.tsx | 0 .../template => template}/src/index.css | 0 .../template => template}/src/index.tsx | 0 .../template => template}/src/logo.svg | 0 .../src/registerServiceWorker.ts | 0 .../template => template}/tsconfig.json | 0 .../template => template}/tsconfig.prod.json | 0 .../template => template}/tsconfig.test.json | 0 .../template => template}/tslint.json | 0 247 files changed, 71 insertions(+), 93548 deletions(-) delete mode 100644 CHANGELOG-0.x.md delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 appveyor.cleanup-cache.txt delete mode 100644 appveyor.yml rename {packages/react-scripts/bin => bin}/react-scripts-ts.js (100%) delete mode 100644 bootstrap.js rename {packages/react-scripts/config => config}/env.js (100%) rename {packages/react-scripts/config => config}/jest/babelTransform.js (100%) rename {packages/react-scripts/config => config}/jest/cssTransform.js (100%) rename {packages/react-scripts/config => config}/jest/fileTransform.js (100%) rename {packages/react-scripts/config => config}/jest/typescriptTransform.js (100%) rename {packages/react-scripts/config => config}/paths.js (100%) rename {packages/react-scripts/config => config}/polyfills.js (100%) rename {packages/react-scripts/config => config}/webpack.config.dev.js (100%) rename {packages/react-scripts/config => config}/webpack.config.prod.js (100%) rename {packages/react-scripts/config => config}/webpackDevServer.config.js (100%) rename packages/react-scripts/eslintrc => eslintrc (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.babelrc (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.env (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.env.development (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.env.local (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.env.production (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.flowconfig (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/.template.dependencies.json (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/README.md (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/gitignore (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/integration/env.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/integration/initDOM.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/integration/syntax.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/integration/webpack.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/public/favicon.ico (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/public/index.html (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/App.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/absoluteLoad.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/ExpandEnvVariables.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/ExpandEnvVariables.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/FileEnvVariables.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/FileEnvVariables.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/NodePath.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/NodePath.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/PublicUrl.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/PublicUrl.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/ShellEnvVariables.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/env/ShellEnvVariables.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ArrayDestructuring.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ArrayDestructuring.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ArraySpread.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ArraySpread.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/AsyncAwait.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/AsyncAwait.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ClassProperties.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ClassProperties.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ComputedProperties.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ComputedProperties.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/CustomInterpolation.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/CustomInterpolation.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/DefaultParameters.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/DefaultParameters.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/DestructuringAndAwait.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/DestructuringAndAwait.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/Generators.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/Generators.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ObjectDestructuring.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ObjectDestructuring.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ObjectSpread.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/ObjectSpread.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/Promises.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/Promises.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/RestAndDefault.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/RestAndDefault.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/RestParameters.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/RestParameters.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/TemplateInterpolation.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/syntax/TemplateInterpolation.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/CssInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/CssInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/ImageInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/ImageInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/JsonInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/JsonInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/LinkedModules.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/LinkedModules.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/NoExtInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/NoExtInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/SvgInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/SvgInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/UnknownExtInclusion.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/UnknownExtInclusion.test.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/aFileWithExt.unknown (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/aFileWithoutExt (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/abstract.json (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/logo.svg (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/style.css (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/features/webpack/assets/tiniest-cat.jpg (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/index.js (100%) rename {packages/react-scripts/fixtures => fixtures}/kitchensink/src/subfolder/lol.js (100%) delete mode 100644 lerna.json delete mode 100644 packages/babel-preset-react-app/README.md delete mode 100644 packages/babel-preset-react-app/index.js delete mode 100644 packages/babel-preset-react-app/package.json delete mode 100644 packages/create-react-app/README.md delete mode 100755 packages/create-react-app/createReactApp.js delete mode 100755 packages/create-react-app/index.js delete mode 100644 packages/create-react-app/package.json delete mode 100644 packages/eslint-config-react-app/README.md delete mode 100644 packages/eslint-config-react-app/index.js delete mode 100644 packages/eslint-config-react-app/package.json delete mode 100644 packages/react-dev-utils/FileSizeReporter.js delete mode 100644 packages/react-dev-utils/InterpolateHtmlPlugin.js delete mode 100644 packages/react-dev-utils/ModuleScopePlugin.js delete mode 100644 packages/react-dev-utils/README.md delete mode 100644 packages/react-dev-utils/WatchMissingNodeModulesPlugin.js delete mode 100644 packages/react-dev-utils/WebpackDevServerUtils.js delete mode 100644 packages/react-dev-utils/__tests__/.eslintrc delete mode 100644 packages/react-dev-utils/__tests__/ignoredFiles.test.js delete mode 100644 packages/react-dev-utils/checkRequiredFiles.js delete mode 100644 packages/react-dev-utils/clearConsole.js delete mode 100644 packages/react-dev-utils/crossSpawn.js delete mode 100644 packages/react-dev-utils/errorOverlayMiddleware.js delete mode 100644 packages/react-dev-utils/eslintFormatter.js delete mode 100644 packages/react-dev-utils/formatWebpackMessages.js delete mode 100644 packages/react-dev-utils/getProcessForPort.js delete mode 100644 packages/react-dev-utils/ignoredFiles.js delete mode 100644 packages/react-dev-utils/inquirer.js delete mode 100644 packages/react-dev-utils/launchEditor.js delete mode 100644 packages/react-dev-utils/launchEditorEndpoint.js delete mode 100644 packages/react-dev-utils/noopServiceWorkerMiddleware.js delete mode 100644 packages/react-dev-utils/openBrowser.js delete mode 100644 packages/react-dev-utils/openChrome.applescript delete mode 100644 packages/react-dev-utils/printBuildError.js delete mode 100644 packages/react-dev-utils/printHostingInstructions.js delete mode 100644 packages/react-dev-utils/webpackHotDevClient.js delete mode 100644 packages/react-error-overlay/.babelrc delete mode 100644 packages/react-error-overlay/.eslintrc delete mode 100644 packages/react-error-overlay/.flowconfig delete mode 100644 packages/react-error-overlay/.gitattributes delete mode 100644 packages/react-error-overlay/.gitignore delete mode 100644 packages/react-error-overlay/.npmignore delete mode 100644 packages/react-error-overlay/README.md delete mode 100644 packages/react-error-overlay/build.js delete mode 100644 packages/react-error-overlay/fixtures/bundle-default.json delete mode 100644 packages/react-error-overlay/fixtures/bundle.json delete mode 100644 packages/react-error-overlay/fixtures/bundle.mjs delete mode 100644 packages/react-error-overlay/fixtures/bundle.mjs.map delete mode 100644 packages/react-error-overlay/fixtures/bundle2.json delete mode 100644 packages/react-error-overlay/fixtures/bundle_u.mjs delete mode 100644 packages/react-error-overlay/fixtures/bundle_u.mjs.map delete mode 100644 packages/react-error-overlay/fixtures/inline.es6.mjs delete mode 100644 packages/react-error-overlay/fixtures/inline.mjs delete mode 100644 packages/react-error-overlay/fixtures/junk-inline.mjs delete mode 100644 packages/react-error-overlay/flow/env.js delete mode 100644 packages/react-error-overlay/src/__tests__/__snapshots__/lines-around.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/__snapshots__/script-lines.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/__snapshots__/stack-frame.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/__snapshots__/unmapper.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/extract-source-map.js delete mode 100644 packages/react-error-overlay/src/__tests__/get-source-map.js delete mode 100644 packages/react-error-overlay/src/__tests__/lines-around.js delete mode 100644 packages/react-error-overlay/src/__tests__/mapper.js delete mode 100644 packages/react-error-overlay/src/__tests__/parser/__snapshots__/chrome.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/parser/__snapshots__/firefox.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/parser/__snapshots__/react.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/parser/__snapshots__/safari.js.snap delete mode 100644 packages/react-error-overlay/src/__tests__/parser/chrome.js delete mode 100644 packages/react-error-overlay/src/__tests__/parser/firefox.js delete mode 100644 packages/react-error-overlay/src/__tests__/parser/generic.js delete mode 100644 packages/react-error-overlay/src/__tests__/parser/react.js delete mode 100644 packages/react-error-overlay/src/__tests__/parser/safari.js delete mode 100644 packages/react-error-overlay/src/__tests__/script-lines.js delete mode 100644 packages/react-error-overlay/src/__tests__/setupJest.js delete mode 100644 packages/react-error-overlay/src/__tests__/stack-frame.js delete mode 100644 packages/react-error-overlay/src/__tests__/unmapper.js delete mode 100644 packages/react-error-overlay/src/components/CloseButton.js delete mode 100644 packages/react-error-overlay/src/components/CodeBlock.js delete mode 100644 packages/react-error-overlay/src/components/Collapsible.js delete mode 100644 packages/react-error-overlay/src/components/ErrorOverlay.js delete mode 100644 packages/react-error-overlay/src/components/Footer.js delete mode 100644 packages/react-error-overlay/src/components/Header.js delete mode 100644 packages/react-error-overlay/src/components/NavigationBar.js delete mode 100644 packages/react-error-overlay/src/containers/CompileErrorContainer.js delete mode 100644 packages/react-error-overlay/src/containers/RuntimeError.js delete mode 100644 packages/react-error-overlay/src/containers/RuntimeErrorContainer.js delete mode 100644 packages/react-error-overlay/src/containers/StackFrame.js delete mode 100644 packages/react-error-overlay/src/containers/StackFrameCodeBlock.js delete mode 100644 packages/react-error-overlay/src/containers/StackTrace.js delete mode 100644 packages/react-error-overlay/src/effects/proxyConsole.js delete mode 100644 packages/react-error-overlay/src/effects/stackTraceLimit.js delete mode 100644 packages/react-error-overlay/src/effects/unhandledError.js delete mode 100644 packages/react-error-overlay/src/effects/unhandledRejection.js delete mode 100644 packages/react-error-overlay/src/iframeScript.js delete mode 100644 packages/react-error-overlay/src/index.js delete mode 100644 packages/react-error-overlay/src/listenToRuntimeErrors.js delete mode 100644 packages/react-error-overlay/src/styles.js delete mode 100644 packages/react-error-overlay/src/utils/dom/absolutifyCaret.js delete mode 100644 packages/react-error-overlay/src/utils/dom/css.js delete mode 100644 packages/react-error-overlay/src/utils/generateAnsiHTML.js delete mode 100644 packages/react-error-overlay/src/utils/getLinesAround.js delete mode 100644 packages/react-error-overlay/src/utils/getPrettyURL.js delete mode 100644 packages/react-error-overlay/src/utils/getSourceMap.js delete mode 100644 packages/react-error-overlay/src/utils/getStackFrames.js delete mode 100644 packages/react-error-overlay/src/utils/isBultinErrorName.js delete mode 100644 packages/react-error-overlay/src/utils/isInternalFile.js delete mode 100644 packages/react-error-overlay/src/utils/mapper.js delete mode 100644 packages/react-error-overlay/src/utils/parseCompileError.js delete mode 100644 packages/react-error-overlay/src/utils/parser.js delete mode 100644 packages/react-error-overlay/src/utils/pollyfills.js delete mode 100644 packages/react-error-overlay/src/utils/stack-frame.js delete mode 100644 packages/react-error-overlay/src/utils/unmapper.js delete mode 100644 packages/react-error-overlay/src/utils/warnings.js delete mode 100644 packages/react-error-overlay/webpack.config.iframe.js delete mode 100644 packages/react-error-overlay/webpack.config.js delete mode 100644 packages/react-scripts/.npmignore delete mode 100644 packages/react-scripts/README.md delete mode 100644 screencast.svg rename {packages/react-scripts/scripts => scripts}/build.js (100%) rename {packages/react-scripts/scripts => scripts}/eject.js (100%) rename {packages/react-scripts/scripts => scripts}/init.js (100%) rename {packages/react-scripts/scripts => scripts}/start.js (100%) rename {packages/react-scripts/scripts => scripts}/test.js (100%) rename {packages/react-scripts/scripts => scripts}/utils/createJestConfig.js (100%) delete mode 100644 tasks/cra.js delete mode 100755 tasks/e2e-old-node.sh delete mode 100755 tasks/local-test.sh delete mode 100755 tasks/publish.sh delete mode 100755 tasks/replace-own-deps.js rename {packages/react-scripts/template => template}/README.md (100%) rename {packages/react-scripts/template => template}/gitignore (100%) rename {packages/react-scripts/template => template}/images.d.ts (100%) rename {packages/react-scripts/template => template}/public/favicon.ico (100%) rename {packages/react-scripts/template => template}/public/index.html (100%) rename {packages/react-scripts/template => template}/public/manifest.json (100%) rename {packages/react-scripts/template => template}/src/App.css (100%) rename {packages/react-scripts/template => template}/src/App.test.tsx (100%) rename {packages/react-scripts/template => template}/src/App.tsx (100%) rename {packages/react-scripts/template => template}/src/index.css (100%) rename {packages/react-scripts/template => template}/src/index.tsx (100%) rename {packages/react-scripts/template => template}/src/logo.svg (100%) rename {packages/react-scripts/template => template}/src/registerServiceWorker.ts (100%) rename {packages/react-scripts/template => template}/tsconfig.json (100%) rename {packages/react-scripts/template => template}/tsconfig.prod.json (100%) rename {packages/react-scripts/template => template}/tsconfig.test.json (100%) rename {packages/react-scripts/template => template}/tslint.json (100%) diff --git a/CHANGELOG-0.x.md b/CHANGELOG-0.x.md deleted file mode 100644 index 9614986ff..000000000 --- a/CHANGELOG-0.x.md +++ /dev/null @@ -1,1374 +0,0 @@ -## 1.0.0 and Newer Versions - -**Please refer to [CHANGELOG.md](./CHANGELOG.md) for the newer versions.** - -## 0.9.5 (March 9, 2017) - -#### :bug: Bug Fix - -* `react-scripts` - - * [#1783](https://github.com/facebookincubator/create-react-app/pull/1783) **Work around Node 7.7.2 bug that crashes `npm start`.** ([@ryanwalters](https://github.com/ryanwalters)) - -#### :nail_care: Enhancement - -* `eslint-config-react-app` - - * [#1773](https://github.com/facebookincubator/create-react-app/pull/1773) Remove `guard-for-in` lint rule. ([@spicyj](https://github.com/spicyj)) - -* `react-scripts` - * [#1760](https://github.com/facebookincubator/create-react-app/pull/1760) Suggest `serve` for running in production. ([@leo](https://github.com/leo)) - * [#1747](https://github.com/facebookincubator/create-react-app/pull/1747) Display `yarn` instead of `yarnpkg` when creating a new app. ([@lpalmes](https://github.com/lpalmes)) - -#### :memo: Documentation - -* `react-scripts` - - * [#1756](https://github.com/facebookincubator/create-react-app/pull/1756) Add Yarn steps for adding Flow. ([@zertosh](https://github.com/zertosh)) - -#### :house: Internal - -* `babel-preset-react-app` - - * [#1742](https://github.com/facebookincubator/create-react-app/pull/1742) Switch to `babel-preset-env` to remove the deprecation warning. ([@Timer](https://github.com/Timer)) - -#### Committers: 6 -- Andres Suarez ([zertosh](https://github.com/zertosh)) -- Ben Alpert ([spicyj](https://github.com/spicyj)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Leo Lamprecht ([leo](https://github.com/leo)) -- Lorenzo Palmes ([lpalmes](https://github.com/lpalmes)) -- Ryan Walters ([ryanwalters](https://github.com/ryanwalters)) - -### Migrating from 0.9.4 to 0.9.5 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.5 -``` - -## 0.9.4 (March 6, 2017) - -#### :bug: Bug Fix -* `create-react-app` - - * [#1706](https://github.com/facebookincubator/create-react-app/pull/1706) Extract compressed package for package name. ([@Timer](https://github.com/Timer)) - - You may now specify a scoped package for `--scripts-version` and obtain a working installation. - - * [#1695](https://github.com/facebookincubator/create-react-app/pull/1695) Print why installation was aborted. ([@tgig](https://github.com/tgig)) - -* `react-scripts` - - * [#1727](https://github.com/facebookincubator/create-react-app/pull/1727) Fix ejecting from a scoped fork. ([@gaearon](https://github.com/gaearon)) - - Ejecting now works within a scoped fork. - - * [#1721](https://github.com/facebookincubator/create-react-app/pull/1721) Fix hot reloading for WebpackDevServer after eject. ([@gaearon](https://github.com/gaearon)) - -* `react-dev-utils` - - * [#1690](https://github.com/facebookincubator/create-react-app/pull/1690) Fix `openBrowser()` when `BROWSER=open` on macOS. ([@bpierre](https://github.com/bpierre)) - - * [#1696](https://github.com/facebookincubator/create-react-app/pull/1696) Improve reliability of port detection. ([@chrisdrackett](https://github.com/chrisdrackett)) - -#### :nail_care: Enhancement -* `eslint-config-react-app`, `react-scripts` - - * [#1705](https://github.com/facebookincubator/create-react-app/pull/1705) Add support for `ignoreRestSiblings` in `no-unused-vars`. ([@chrisdrackett](https://github.com/chrisdrackett)) - - Linter no longer warns when using rest properties to remove variables from an object. - - * [#1542](https://github.com/facebookincubator/create-react-app/pull/1542) Bump `jsx-a11y` version. ([@bondz](https://github.com/bondz)) - -* `react-dev-utils`, `react-scripts` - - * [#1726](https://github.com/facebookincubator/create-react-app/pull/1726) Extract generic build functions into `react-dev-utils`. ([@viankakrisna](https://github.com/viankakrisna)) - -* Other - - * [#1402](https://github.com/facebookincubator/create-react-app/pull/1402) Stub `package.json` for e2e test. ([@matoilic](https://github.com/matoilic)) - -#### :memo: Documentation -* `react-scripts` - * [#1710](https://github.com/facebookincubator/create-react-app/pull/1710) Update now.sh deployment instructions. ([@replaid](https://github.com/replaid)) - * [#1717](https://github.com/facebookincubator/create-react-app/pull/1717) Add docs for Apache client side routing. ([@viankakrisna](https://github.com/viankakrisna)) - * [#1698](https://github.com/facebookincubator/create-react-app/pull/1698) Suggest to use `.env` for enabling polling mode. ([@gaearon](https://github.com/gaearon)) - * [#1687](https://github.com/facebookincubator/create-react-app/pull/1687) Fixed missing `--recursive` flag in first `npm run watch-css` command. ([@mklemme](https://github.com/mklemme)) - -#### :house: Internal -* `react-scripts` - * [#1736](https://github.com/facebookincubator/create-react-app/pull/1736) Fix eject for linked react-scripts. ([@tuchk4](https://github.com/tuchk4)) - * [#1741](https://github.com/facebookincubator/create-react-app/pull/1741) Fix internal linting setup. ([@gaearon](https://github.com/gaearon)) - * [#1730](https://github.com/facebookincubator/create-react-app/pull/1730) Fix Node 4 e2e tests. ([@Timer](https://github.com/Timer)) -* `eslint-config-react-app` - * [#1740](https://github.com/facebookincubator/create-react-app/pull/1740) Relax ESLint config peerDependency. ([@gaearon](https://github.com/gaearon)) -* `eslint-config-react-app`, `react-dev-utils`, `react-scripts` - * [#1729](https://github.com/facebookincubator/create-react-app/pull/1729) Lint internal scripts with `eslint:recommended`. ([@gaearon](https://github.com/gaearon)) -* `react-dev-utils` - * [#1724](https://github.com/facebookincubator/create-react-app/pull/1724) Don't use ES6 in a file that should run on Node 4. ([@gaearon](https://github.com/gaearon)) -* Other - * [#1723](https://github.com/facebookincubator/create-react-app/pull/1723) Skip AppVeyor CI builds for Markdown changes. ([@gaearon](https://github.com/gaearon)) - * [#1707](https://github.com/facebookincubator/create-react-app/pull/1707) Add double quotes to escape spaces in paths in e2e. ([@viankakrisna](https://github.com/viankakrisna)) - * [#1688](https://github.com/facebookincubator/create-react-app/pull/1688) Upgrade `lerna` version. ([@viankakrisna](https://github.com/viankakrisna)) - -#### Committers: 11 -- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) -- Bond ([bondz](https://github.com/bondz)) -- Chris Drackett ([chrisdrackett](https://github.com/chrisdrackett)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Mato Ilic ([matoilic](https://github.com/matoilic)) -- Myk Klemme ([mklemme](https://github.com/mklemme)) -- Pierre Bertet ([bpierre](https://github.com/bpierre)) -- Ryan Platte ([replaid](https://github.com/replaid)) -- Travis Giggy ([tgig](https://github.com/tgig)) -- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) - -### Migrating from 0.9.3 to 0.9.4 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.4 -``` - -You may also optionally update the global command-line utility for scoped package support: - -``` -npm install -g create-react-app@1.3.0 -``` - -## 0.9.3 (February 28, 2017) - -#### :rocket: New Feature -* `create-react-app` - * [#1423](https://github.com/facebookincubator/create-react-app/pull/1423) **Fall back to Yarn offline cache when creating a new project.** ([@voxsim](https://github.com/voxsim)) - - If you are using Yarn, and you have created at least one app previously, Create React App now works offline. - - Yarn offline installation demo - -#### :bug: Bug Fix - -* `react-scripts` - - * [#1665](https://github.com/facebookincubator/create-react-app/pull/1665) Temporarily disable ESLint caching because of a bug. ([@gaearon](https://github.com/gaearon)) - -* `create-react-app` - * [#1675](https://github.com/facebookincubator/create-react-app/pull/1675) Delete project folder on failed installation on Windows. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - * [#1662](https://github.com/facebookincubator/create-react-app/pull/1662) Validate project name before creating a project. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - * [#1669](https://github.com/facebookincubator/create-react-app/pull/1669) Make sure React dependencies aren’t pinned in new projects. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - -#### :nail_care: Enhancement -* `react-scripts` - - * [#1677](https://github.com/facebookincubator/create-react-app/pull/1677) Add `X-FORWARDED` headers for proxy requests. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - -#### :memo: Documentation -* `react-scripts` - - * [#1657](https://github.com/facebookincubator/create-react-app/pull/1657) Tweak the Visual Studio Code debugging guide. ([@ryansully](https://github.com/ryansully)) - -#### :house: Internal -* End-to-end Tests - - * [#1648](https://github.com/facebookincubator/create-react-app/pull/1648) Add Windows CI tests for better stability. ([@Timer](https://github.com/Timer)) - -#### Committers: 5 -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Johann Hubert Sonntagbauer ([johann-sonntagbauer](https://github.com/johann-sonntagbauer)) -- Ryan Sullivan ([ryansully](https://github.com/ryansully)) -- Simon Vocella ([voxsim](https://github.com/voxsim)) - -### Migrating from 0.9.2 to 0.9.3 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.3 -``` - -You may also optionally update the global command-line utility for offline Yarn cache support: - -``` -npm install -g create-react-app@1.2.1 -``` - -## 0.9.2 (February 26, 2017) - -#### :nail_care: Enhancement - -* `create-react-app` - * [#1253](https://github.com/facebookincubator/create-react-app/pull/1253) **Install time optimization.** ([@n3tr](https://github.com/n3tr)) - - React, ReactDOM, and `react-scripts` are now installed in the same install instead of two different installs. This reduces app creation time by a noticeable amount. - - * [#1512](https://github.com/facebookincubator/create-react-app/pull/1512) **Graceful error handling.** ([@chitchu](https://github.com/chitchu)) - - If an error occurs while `create-react-app` is running, it will now clean up and not leave a broken project to reduce confusion. - - * [#1193](https://github.com/facebookincubator/create-react-app/pull/1193) Suggest upgrading to NPM >= 3 for faster install times. ([@mobinni](https://github.com/mobinni)) - - * [#1603](https://github.com/facebookincubator/create-react-app/pull/1603) Allow app creation in a WebStorm project. ([@driquelme](https://github.com/driquelme)) - - * [#1570](https://github.com/facebookincubator/create-react-app/pull/1570) Allow git urls in `--scripts-version`. ([@tomconroy](https://github.com/tomconroy)) - -* `react-scripts` - * [#1578](https://github.com/facebookincubator/create-react-app/pull/1578) Enable lint caching in development. ([@viankakrisna](https://github.com/viankakrisna)) - - * [#1478](https://github.com/facebookincubator/create-react-app/pull/1478) Update the build script message to show the correct port. ([@chyipin](https://github.com/chyipin)) - - * [#1567](https://github.com/facebookincubator/create-react-app/pull/1567) Remove .bin files after eject. ([@tuchk4](https://github.com/tuchk4)) - - * [#1560](https://github.com/facebookincubator/create-react-app/pull/1560) Bump `recursive-readdir`. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) - -#### :bug: Bug Fix -* `react-scripts` - - * [#1635](https://github.com/facebookincubator/create-react-app/pull/1635) **Fix Jest configuration.** ([@Timer](https://github.com/Timer)) - - Fixes ejecting on Windows for macOS and Linux machines. - - * [#1356](https://github.com/facebookincubator/create-react-app/pull/1356) Fix workflow if react-scripts package is linked via npm-link. ([@tuchk4](https://github.com/tuchk4)) - - Advanced users may opt to fork `react-scripts` instead of ejecting so they still receive upstream updates.
- `react-scripts` will now function as expected when linking to a development version.
- Previously, you could not test changes with an existing application via linking. - - * [#1585](https://github.com/facebookincubator/create-react-app/pull/1585) Ensure PORT environment variable is an integer. ([@matoilic](https://github.com/matoilic)) - - * [#1628](https://github.com/facebookincubator/create-react-app/pull/1628) Show correct port for pushstate-server URL text. ([@mattccrampton](https://github.com/mattccrampton)) - - * [#1647](https://github.com/facebookincubator/create-react-app/pull/1647) Fix `npm test` on Windows ([@gaearon](https://github.com/gaearon)) - - -#### :memo: Documentation -* User Guides - * [#1391](https://github.com/facebookincubator/create-react-app/pull/1391) Add note how to resolve missing required files for Heroku. ([@sbritoig](https://github.com/sbritoig)) - * [#1577](https://github.com/facebookincubator/create-react-app/pull/1577) Add a how-to on `react-snapshot`. ([@superhighfives](https://github.com/superhighfives)) - * [#1121](https://github.com/facebookincubator/create-react-app/pull/1121) Add documentation for customizing Bootstrap theme. ([@myappincome](https://github.com/myappincome)) - * [#1540](https://github.com/facebookincubator/create-react-app/pull/1540) Document debugging in Visual Studio Code. ([@bondz](https://github.com/bondz)) - * [#1618](https://github.com/facebookincubator/create-react-app/pull/1618) Add note about when to import Bootstrap CSS. ([@joewoodhouse](https://github.com/joewoodhouse)) - * [#1518](https://github.com/facebookincubator/create-react-app/pull/1518) Update flow configuration documentation. ([@SBrown52](https://github.com/SBrown52)) - * [#1625](https://github.com/facebookincubator/create-react-app/pull/1625) Specify that NODE_ENV is set to 'production' during the build step. ([@mderazon](https://github.com/mderazon)) - * [#1573](https://github.com/facebookincubator/create-react-app/pull/1573) Update Jest documentation links. ([@mkermani144](https://github.com/mkermani144)) - * [#1564](https://github.com/facebookincubator/create-react-app/pull/1564) Add --recursive to Sass watch script. ([@aleburato](https://github.com/aleburato)) - * [#1561](https://github.com/facebookincubator/create-react-app/pull/1561) Use https in link in documentation. ([@dariocravero](https://github.com/dariocravero)) - * [#1562](https://github.com/facebookincubator/create-react-app/pull/1562) Update `jest-enzyme` documentation. ([@kiranps](https://github.com/kiranps)) - * [#1543](https://github.com/facebookincubator/create-react-app/pull/1543) Update CSS preprocessor instructions. ([@aleburato](https://github.com/aleburato)) - * [#1338](https://github.com/facebookincubator/create-react-app/pull/1338) Add link to Azure deployment tutorial. ([@tpetrina](https://github.com/tpetrina)) - * [#1320](https://github.com/facebookincubator/create-react-app/pull/1320) Document how to disable autoprefix feature. ([@rrubas](https://github.com/rrubas)) - * [#1313](https://github.com/facebookincubator/create-react-app/pull/1313) List features beyond ES6 supported by create-react-app. ([@jonathanconway](https://github.com/jonathanconway)) - * [#1008](https://github.com/facebookincubator/create-react-app/pull/1008) Add Saas support documentation. ([@tsironis](https://github.com/tsironis)) - * [#994](https://github.com/facebookincubator/create-react-app/pull/994) Suggest `jest-enzyme` for simplifying test matchers. ([@blainekasten](https://github.com/blainekasten)) - * [#1608](https://github.com/facebookincubator/create-react-app/pull/1608) Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR. ([@AJamesPhillips](https://github.com/AJamesPhillips)) - * [#1495](https://github.com/facebookincubator/create-react-app/pull/1495) Add useful link to react-scripts. ([@pd4d10](https://github.com/pd4d10)) -* READMEs - * [#1576](https://github.com/facebookincubator/create-react-app/pull/1576) Switch from Neo to Neutrino. ([@eliperelman](https://github.com/eliperelman)) - * [#1275](https://github.com/facebookincubator/create-react-app/pull/1275) Suggest yarn commands in addition to npm. ([@lifez](https://github.com/lifez)) - -#### :house: Internal -* `babel-preset-react-app` - * [#1598](https://github.com/facebookincubator/create-react-app/pull/1598) Remove redundant babel-plugin-transform-es2015-parameters. ([@christophehurpeau](https://github.com/christophehurpeau)) -* Other - * [#1534](https://github.com/facebookincubator/create-react-app/pull/1534) Use yarn@latest in e2e. ([@gaearon](https://github.com/gaearon)) - * [#1295](https://github.com/facebookincubator/create-react-app/pull/1295) Make node version check more robust in e2e. ([@pugnascotia](https://github.com/pugnascotia)) - * [#1503](https://github.com/facebookincubator/create-react-app/pull/1503) Fix `test -e` in e2e. ([@igetgames](https://github.com/igetgames)) - -#### Committers: 36 -- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) -- Alessandro Burato ([aleburato](https://github.com/aleburato)) -- Alexander James Phillips ([AJamesPhillips](https://github.com/AJamesPhillips)) -- Blaine Kasten ([blainekasten](https://github.com/blainekasten)) -- Bond ([bondz](https://github.com/bondz)) -- Charlie Gleason ([superhighfives](https://github.com/superhighfives)) -- Christophe Hurpeau ([christophehurpeau](https://github.com/christophehurpeau)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Daniel Riquelme ([driquelme](https://github.com/driquelme)) -- Darío Javier Cravero ([dariocravero](https://github.com/dariocravero)) -- Dimitris Tsironis ([tsironis](https://github.com/tsironis)) -- Eli Perelman ([eliperelman](https://github.com/eliperelman)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Joe Woodhouse ([joewoodhouse](https://github.com/joewoodhouse)) -- Jonathan Conway ([jonathanconway](https://github.com/jonathanconway)) -- Marcus R. Brown ([igetgames](https://github.com/igetgames)) -- Mato Ilic ([matoilic](https://github.com/matoilic)) -- Matt Crampton ([mattccrampton](https://github.com/mattccrampton)) -- Michael DeRazon ([mderazon](https://github.com/mderazon)) -- Mo Binni ([mobinni](https://github.com/mobinni)) -- Mohammad Kermani ([mkermani144](https://github.com/mkermani144)) -- Phawin Khongkhasawan ([lifez](https://github.com/lifez)) -- Roman Rubas ([rrubas](https://github.com/rrubas)) -- Rory Hunter ([pugnascotia](https://github.com/pugnascotia)) -- Tom Conroy ([tomconroy](https://github.com/tomconroy)) -- Toni Petrina ([tpetrina](https://github.com/tpetrina)) -- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) -- Vicente Jr Yuchitcho ([chitchu](https://github.com/chitchu)) -- [SBrown52](https://github.com/SBrown52) -- [chyipin](https://github.com/chyipin) -- [myappincome](https://github.com/myappincome) -- [sbritoig](https://github.com/sbritoig) -- [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) -- kiran ps ([kiranps](https://github.com/kiranps)) -- pd4d10 ([pd4d10](https://github.com/pd4d10)) - -### Migrating from 0.9.0 to 0.9.2 - -**Note:** 0.9.1 had known issues so you should skip it. - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.2 -``` - -You may also optionally update the global command-line utility for more efficient installs (thanks [@n3tr](https://github.com/n3tr)): - -``` -npm install -g create-react-app@1.1.0 -``` - -## 0.9.1 (February 25, 2017) - -This release has known issues and you should skip it. Update directly to 0.9.2 instead. - -## 0.9.0 (February 11, 2017) - -Thanks to [@Timer](https://github.com/timer) for cutting this release. - -#### :rocket: New Feature - -* `react-scripts` - - * [#1489](https://github.com/facebookincubator/create-react-app/pull/1489) Support setting `"homepage"` to `"."` to generate relative asset paths. ([@tibdex](https://github.com/tibdex)) - - Applications that don’t use the HTML5 `pushState` API can now be built to be served from any relative URL. To enable this, specify `"."` as your `homepage` setting in `package.json`. It used to be possible before with a few known bugs, but they should be fixed now. See [Serving the Same Build from Different Paths](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#serving-the-same-build-from-different-paths). - - * [#937](https://github.com/facebookincubator/create-react-app/pull/1504) Add `PUBLIC_URL` environment variable for advanced use. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - - If you use a CDN to serve the app, you can now specify `PUBLIC_URL` environment variable to override the base URL (including the hostname) for resources referenced from the built code. This new variable is mentioned in the new [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) section. - - * [#1440](https://github.com/facebookincubator/create-react-app/pull/1440) Make all `REACT_APP_*` environment variables accessible in `index.html`. ([@jihchi](https://github.com/jihchi)) - - This makes all environment variables previously available in JS, also available in the HTML file, for example `%REACT_APP_MY_VARIABLE%`. See [Referencing Environment Variables in HTML](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#referencing-environment-variables-in-the-html). - -* `react-dev-utils` - - * [#1148](https://github.com/facebookincubator/create-react-app/pull/1148) Configure which browser to open with `npm start`. ([@GAumala](https://github.com/GAumala)) - - You can now disable the automatic browser launching by setting the `BROWSER` environment variable to `none`. You can also specify a different browser (or an arbitrary script) to open by default, [as supported by `opn` command](https://github.com/sindresorhus/opn#app) that we use under the hood. See [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration). - -#### :boom: Breaking Change - -* `react-scripts` - - * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) - * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) - * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) - - Jest has been updated to 18 and has introduced some [breaking changes and new features](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html). - -* `react-scripts`, `react-dev-utils` - - * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) - - Non-interactive terminals no longer automatically disable launching of the browser. Instead, you need to [specify `none` as `BROWSER` environment variable](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) if you wish to disable it. - -#### :bug: Bug Fix - -* `react-scripts` - - * [#1441](https://github.com/facebookincubator/create-react-app/pull/1441) Added `babel-runtime` dependency to deduplicate dependencies when using Yarn. ([@jkimbo](https://github.com/jkimbo)) - - This works around a bug in Yarn that caused newly created projects to be over 400MB. Now they are down to 126MB, just like with npm 3. - - * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) - * [#1458](https://github.com/facebookincubator/create-react-app/pull/1458) Additionally remove `react-scripts` from dependencies on eject. ([@creynders](https://github.com/creynders)) - * [#1309](https://github.com/facebookincubator/create-react-app/pull/1309) Bump `babel-loader` version (#1009). ([@frontsideair](https://github.com/frontsideair)) - * [#1267](https://github.com/facebookincubator/create-react-app/pull/1267) Only gitignore directories in root, not deep. ([@jayphelps](https://github.com/jayphelps)) - -* `react-dev-utils` - - * [#1377](https://github.com/facebookincubator/create-react-app/pull/1377) webpack-dev-server patch for 'still-ok' success status. ([@TheBlackBolt](https://github.com/TheBlackBolt)) - * [#1274](https://github.com/facebookincubator/create-react-app/pull/1274) Downgrading to compatible version of SockJS-Client. ([@holloway](https://github.com/holloway)) - * [#1247](https://github.com/facebookincubator/create-react-app/pull/1247) Only open Chrome tab if BROWSER is missing or is Chrome. ([@gaearon](https://github.com/gaearon)) - -#### :nail_care: Enhancement - -* `react-scripts` - - * [#1496](https://github.com/facebookincubator/create-react-app/pull/1496) Make build exit with error code when interrupted. ([@brandones](https://github.com/brandones)) - * [#1352](https://github.com/facebookincubator/create-react-app/pull/1352) More descriptive error message for `env.CI = true` warnings causing failures. ([@jayphelps](https://github.com/jayphelps)) - * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) - * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) - * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) - * [#1507](https://github.com/facebookincubator/create-react-app/pull/1507) fix: add yarn gitignores. ([@adjohnson916](https://github.com/adjohnson916)) - * [#1510](https://github.com/facebookincubator/create-react-app/pull/1510) Add missing `'\n'` to the end of `package.json` file. ([@pd4d10](https://github.com/pd4d10)) - * [#1324](https://github.com/facebookincubator/create-react-app/pull/1324) Use npm script hooks to avoid `&&` in deploy script. ([@zpao](https://github.com/zpao)) - -* `create-react-app` - - * [#1270](https://github.com/facebookincubator/create-react-app/pull/1270) gh-1269: Enabling nested folder paths for project name. ([@dinukadesilva](https://github.com/dinukadesilva)) - - -#### :memo: Documentation - -* User Guide - - * [#1515](https://github.com/facebookincubator/create-react-app/pull/1515) readme: Advanced Configuration. ([@Timer](https://github.com/Timer)) - * [#1513](https://github.com/facebookincubator/create-react-app/pull/1513) clarifying the use of custom environment variables. ([@calweb](https://github.com/calweb)) - * [#1511](https://github.com/facebookincubator/create-react-app/pull/1511) Change "OS X" references to "macOS". ([@RodrigoHahn](https://github.com/RodrigoHahn)) - * [#1482](https://github.com/facebookincubator/create-react-app/pull/1482) Edit User Guide: Add ESLint config for VS Code users. ([@vulong23](https://github.com/vulong23)) - * [#1483](https://github.com/facebookincubator/create-react-app/pull/1483) Reflect websocket proxy support on README (#1013). ([@frontsideair](https://github.com/frontsideair)) - * [#1453](https://github.com/facebookincubator/create-react-app/pull/1453) Readme: Removes experimental from Jest snapshot. ([@frehner](https://github.com/frehner)) - * [#1437](https://github.com/facebookincubator/create-react-app/pull/1437) Added links to tutorials for integrating cra with an api backend. ([@alexdriaguine](https://github.com/alexdriaguine)) - * [#1422](https://github.com/facebookincubator/create-react-app/pull/1422) Add causes of dev server not detecting changes. ([@jetpackpony](https://github.com/jetpackpony)) - * [#1260](https://github.com/facebookincubator/create-react-app/pull/1260) Heroku Deployment: Adds a note on how to resolve "File/Module Not Found Errors" . ([@MsUzoAgu](https://github.com/MsUzoAgu)) - * [#1256](https://github.com/facebookincubator/create-react-app/pull/1256) Add "Changing the Page Title" to User Guide. ([@gaearon](https://github.com/gaearon)) - * [#1245](https://github.com/facebookincubator/create-react-app/pull/1245) Replace the Flow documentation section. ([@gaearon](https://github.com/gaearon)) - * [#1514](https://github.com/facebookincubator/create-react-app/pull/1514) corrected minor typo. ([@crowchirp](https://github.com/crowchirp)) - * [#1393](https://github.com/facebookincubator/create-react-app/pull/1393) replace two space syntax with br tag. ([@carlsagan21](https://github.com/carlsagan21)) - * [#1384](https://github.com/facebookincubator/create-react-app/pull/1384) Document Flow support. ([@dschep](https://github.com/dschep)) - -* READMEs - - * [#1375](https://github.com/facebookincubator/create-react-app/pull/1375) Change console.log for errors and warnings. ([@jimmyhmiller](https://github.com/jimmyhmiller)) - * [#1369](https://github.com/facebookincubator/create-react-app/pull/1369) Add missing import in react-dev-utils README.md. ([@pedronauck](https://github.com/pedronauck)) - -#### :house: Internal - -* Internal Test Suite - - * [#1519](https://github.com/facebookincubator/create-react-app/pull/1519) Add test cases for PUBLIC_URL and relative path. ([@Timer](https://github.com/Timer)) - * [#1484](https://github.com/facebookincubator/create-react-app/pull/1484) Improve e2e-kitchensink and Jest coverage. ([@Timer](https://github.com/Timer)) - * [#1463](https://github.com/facebookincubator/create-react-app/pull/1463) Minor code style and wrong expect. ([@tuchk4](https://github.com/tuchk4)) - * [#1470](https://github.com/facebookincubator/create-react-app/pull/1470) E2e jsdom fix. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - * [#1187](https://github.com/facebookincubator/create-react-app/pull/1187) Use a more sophisticated template for end-to-end testing.. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - -* Other - - * [#1289](https://github.com/facebookincubator/create-react-app/pull/1289) Remove path-exists from dependencies and replace it with fs.existsSync. ([@halfzebra](https://github.com/halfzebra)) - -#### Committers: 35 -- Alex Driaguine ([alexdriaguine](https://github.com/alexdriaguine)) -- Anders D. Johnson ([adjohnson916](https://github.com/adjohnson916)) -- Anthony F. ([frehner](https://github.com/frehner)) -- Brandon Istenes ([brandones](https://github.com/brandones)) -- Calvin Webster ([calweb](https://github.com/calweb)) -- Cary Landholt ([CaryLandholt](https://github.com/CaryLandholt)) -- Chandan Rai ([crowchirp](https://github.com/crowchirp)) -- Christian Raidl ([Chris-R3](https://github.com/Chris-R3)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Daniel Schep ([dschep](https://github.com/dschep)) -- David ([lopezator](https://github.com/lopezator)) -- Dinuka De Silva ([dinukadesilva](https://github.com/dinukadesilva)) -- Eduard Kyvenko ([halfzebra](https://github.com/halfzebra)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Fatih ([frontsideair](https://github.com/frontsideair)) -- Gabriel Aumala ([GAumala](https://github.com/GAumala)) -- Jay Phelps ([jayphelps](https://github.com/jayphelps)) -- Jih-Chi Lee ([jihchi](https://github.com/jihchi)) -- Jimmy Miller ([jimmyhmiller](https://github.com/jimmyhmiller)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Johnny Magrippis ([jmagrippis](https://github.com/jmagrippis)) -- Jonathan Kim ([jkimbo](https://github.com/jkimbo)) -- MUA ([MsUzoAgu](https://github.com/MsUzoAgu)) -- Matthew Holloway ([holloway](https://github.com/holloway)) -- Nguyen Le Vu Long ([vulong23](https://github.com/vulong23)) -- Paul O’Shannessy ([zpao](https://github.com/zpao)) -- Pedro Nauck ([pedronauck](https://github.com/pedronauck)) -- Robbie H ([TheBlackBolt](https://github.com/TheBlackBolt)) -- Thibault Derousseaux ([tibdex](https://github.com/tibdex)) -- Valerii ([tuchk4](https://github.com/tuchk4)) -- Vasiliy Taranov ([jetpackpony](https://github.com/jetpackpony)) -- [RodrigoHahn](https://github.com/RodrigoHahn) -- creynders ([creynders](https://github.com/creynders)) -- pd4d10 ([pd4d10](https://github.com/pd4d10)) -- soo ([carlsagan21](https://github.com/carlsagan21)) - -### Migrating from 0.8.5 to 0.9.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.0 -``` - -Then, run your tests. If you are affected by breaking changes from Jest 18, consult [blog post](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html), [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md#jest-1800), and [documentation](http://facebook.github.io/jest/docs/getting-started.html). You might need to update any snapshots since their format might have changed. - -If you relied on the browser not starting in non-interactive terminals, you now need to explicitly specify `BROWSER=none` as an environment variable to disable it. - -## 0.8.5 (January 9, 2017) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :bug: Bug Fix -* `create-react-app`, `react-scripts` - * [#1365](https://github.com/facebookincubator/create-react-app/pull/1365) Use yarnpkg alias to run Yarn. ([@fson](https://github.com/fson)) - - Fixes an issue where running `create-react-app` failed on systems with Apache Hadoop installed because it falsely detected Hadoop YARN executable as Yarn package manager. - -#### Committers: 1 -- Ville Immonen ([fson](https://github.com/fson)) - -### Migrating from 0.8.4 to 0.8.5 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.5 -``` - -You may also optionally update the global command-line utility: - -``` -npm install -g create-react-app@1.0.3 -``` - -## 0.8.4 (December 11, 2016) - -#### :bug: Bug Fix -* `react-scripts` - - * [#1233](https://github.com/facebookincubator/create-react-app/pull/1233) Disable subresource integrity temporarily. ([@Timer](https://github.com/Timer)) - - We added [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) checks to the build output in 0.8.2 but it turns out that they may fail in browsers using special compression proxies, such as Chrome on Android, when served over HTTP. We disabled the checks until we can find a safe way to add them. - -* `react-dev-utils` - - * [#1226](https://github.com/facebookincubator/create-react-app/pull/1226) Fix weird lint output. ([@n3tr](https://github.com/n3tr)) - - Fixes strange lint message formatting in some edge cases. - - * [#1215](https://github.com/facebookincubator/create-react-app/pull/1215) Fix - openChrome won't open default browser (using Canary). ([@n3tr](https://github.com/n3tr)) - - Fixes a regression that caused stable Google Chrome to be opened even if you are using Canary as the default browser. - -* `create-react-app` - - * [#1223](https://github.com/facebookincubator/create-react-app/pull/1223) Clean up Yarn detection and install code. ([@fson](https://github.com/fson)) - - Fixes noisy output on Windows when Yarn is not installed. - - * [#1224](https://github.com/facebookincubator/create-react-app/pull/1224) Exit with an error code when npm/yarn install fails. ([@fson](https://github.com/fson)) - -#### :nail_care: Enhancement -* `react-scripts` - - * [#1237](https://github.com/facebookincubator/create-react-app/pull/1237) Clear scrollback in test mode. ([@gaearon](https://github.com/gaearon)) - - Ensures test watcher clears the console before running. - - * [#1229](https://github.com/facebookincubator/create-react-app/pull/1229) Disable jest watch mode when --coverage flag is present [#1207]. ([@BenoitAverty](https://github.com/BenoitAverty)) - - Since coverage doesn't work well with watch mode, we don’t run the watcher on `npm test -- --coverage` anymore. - - * [#1212](https://github.com/facebookincubator/create-react-app/pull/1212) Proxy rewrites Origin header to match the target server URL. ([@koles](https://github.com/koles)) - - Makes sure more API endpoints can work with the `proxy` setting. - - * [#1222](https://github.com/facebookincubator/create-react-app/pull/1222) Disable gh-page setup instruction if scripts.deploy has been added. ([@n3tr](https://github.com/n3tr)) - - Suppresses the instructions printed at the end of `npm run build` if `npm run deploy` already exists. - -* `create-react-app` - - * [#1236](https://github.com/facebookincubator/create-react-app/pull/1236) Tweak console messages. ([@gaearon](https://github.com/gaearon)) - - Makes error messages more friendly. - - * [#1195](https://github.com/facebookincubator/create-react-app/pull/1195) Use "commander" for cli argv handling. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - - Adds `create-react-app --help` with a list of options. - -* `react-dev-utils` - - * [#1211](https://github.com/facebookincubator/create-react-app/pull/1211) Use a better clear console sequence. ([@gaearon](https://github.com/gaearon)) - - Ensures the development server clears the terminal when files are changed. - -#### :memo: Documentation -* `react-dev-utils` - - * [#1232](https://github.com/facebookincubator/create-react-app/pull/1232) [documentation] fix html-dev-plugin link in react-dev-utils doc. ([@shogunsea](https://github.com/shogunsea)) - -* `react-scripts` - - * [#1220](https://github.com/facebookincubator/create-react-app/pull/1220) Adding troubleshooting information about Subresource Integrity digests.. ([@dfbaskin](https://github.com/dfbaskin)) - -#### :house: Internal -* `react-scripts` - - * [#1214](https://github.com/facebookincubator/create-react-app/pull/1214) Bump babel-eslint version. ([@existentialism](https://github.com/existentialism)) - -#### Committers: 10 -- Benoit Averty ([BenoitAverty](https://github.com/BenoitAverty)) -- Brian Ng ([existentialism](https://github.com/existentialism)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Dave Baskin ([dfbaskin](https://github.com/dfbaskin)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Pavel Kolesnikov ([koles](https://github.com/koles)) -- Shogun Sea ([shogunsea](https://github.com/shogunsea)) -- Ville Immonen ([fson](https://github.com/fson)) - -### Migrating from 0.8.3 to 0.8.4 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.4 -``` - -You may also optionally update the global command-line utility: - -``` -npm install -g create-react-app@1.0.2 -``` - -## 0.8.3 (December 8, 2016) - -#### :bug: Bug Fix -* `create-react-app` - * [#1204](https://github.com/facebookincubator/create-react-app/pull/1204) Catch synchronous errors from spawning yarn. ([@gaearon](https://github.com/gaearon)) - - Fixes a crash when running `create-react-app` in some cases. - -* `react-scripts` - * [#1203](https://github.com/facebookincubator/create-react-app/pull/1203) Update webpack-subresource-integrity to fix Windows builds. ([@gaearon](https://github.com/gaearon)) - - Fixes a crash when running `npm run build` on Windows. - - * [#1201](https://github.com/facebookincubator/create-react-app/pull/1201) Instruct Jest to load native components from RNW instead of RN. ([@remon-georgy](https://github.com/remon-georgy)) - - Fixes tests for users of React Native Web. - -#### :memo: Documentation -* `react-scripts` - - * [#806](https://github.com/facebookincubator/create-react-app/pull/806) Add syntax highlighting configuration guide. ([@mareksuscak](https://github.com/mareksuscak)) - -#### Committers: 3 -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Marek Suscak ([mareksuscak](https://github.com/mareksuscak)) -- Remon Georgy ([remon-georgy](https://github.com/remon-georgy)) - -### Migrating from 0.8.2 to 0.8.3 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.3 -``` - -You can optionally update the global CLI too: - -``` -npm install -g create-react-app@1.0.1 -``` - -## 0.8.2 (December 7, 2016) - -#### :rocket: New Feature -* `react-scripts` - * [#1176](https://github.com/facebookincubator/create-react-app/pull/1176) Add Subresource Integrity support. ([@XVincentX](https://github.com/XVincentX)) - - The generated HTML now includes [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) attributes ensuring that your users aren't served malicious code if your CDN gets compromised. - -#### :bug: Bug Fix -* `react-scripts` - * [#1197](https://github.com/facebookincubator/create-react-app/pull/1197) Let Jest handle all file types. ([@gaearon](https://github.com/gaearon)) - - Since 0.8.0, we started treating imports of any unknown file extensions as URLs. However, we had to revert this change for the test configuration in 0.8.1 because of a bug causing false positives. In 0.8.2, we are fixing this and making test configuration treat imports with unknown extensions the same way as we do in the browser environment. - - * [#1194](https://github.com/facebookincubator/create-react-app/pull/1194) Only honor relative `NODE_PATH`. ([@gaearon](https://github.com/gaearon)) - - Historically we have allowed specifying `NODE_PATH` environment variable as a way to allow “absolute imports”. For example, running `NODE_PATH=src npm start` in Bash or `set NODE_PATH=src&&npm start` in Windows Cmd would let you import anything inside `src` without specifying a relative path. However, we found a few nasty edge cases when Node.js core modules end up being in `NODE_PATH` and erroneously become bundled. As a result the build would crash on some systems when some libraries are imported. To fix this, we now only honor relative paths from `NODE_PATH` in Create React App. This means the existing use case for absolute imports is still supported (`src` in the example above is relative), but absolute paths in `NODE_PATH` (such as paths to Node.js core modules) will be ignored. - - * [#1188](https://github.com/facebookincubator/create-react-app/pull/1188) Update Webpack to fix source map issues. ([@gaearon](https://github.com/gaearon)) - - Since 0.8.0, we show source maps in development instead of the compiled code. However, it has come to our attention that Webpack's source map implementation had issues interpreting Babel output, and caused source maps to be wrong and breakpoints to be unusable in some cases. Webpack has released a fix for this, and we have updated the minimal version of Webpack that we are using. - - * [#1180](https://github.com/facebookincubator/create-react-app/pull/1180) Use `file-loader` for svgs. ([@bogdansoare](https://github.com/bogdansoare)) - - Since 0.8.0, we are treating all imports with non-JS/CSS extensions the same way. Importing them gives you a string with their URL, and if their content is small enough (less than 10K), the URL is in fact an inlined [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). However, this doesn't work well with SVGs in case you use them for a sprite system since fragments don't work in data URIs, and it's wasteful to inline the same sprite SVG many times. To fix this, we have added an exception so that SVG files never get inlined. - -* `react-dev-utils` - * [#1165](https://github.com/facebookincubator/create-react-app/pull/1165) Chrome 'open tab' reuse an empty tab when possible. ([@n3tr](https://github.com/n3tr)) - - Fixes an issue that caused two tabs to get opened instead of just one. It also fixes some cases where the window with the existing tab would not get activated. - -* `babel-preset-react-app` - * [#1179](https://github.com/facebookincubator/create-react-app/pull/1179) Fix Babel issues in tests by applying the right transforms. ([@gaearon](https://github.com/gaearon)) - - Fixes regressions in test environment that caused syntax errors with generators and `async` / `await`. - -#### :nail_care: Enhancement -* `eslint-config-react-app` - * [#1191](https://github.com/facebookincubator/create-react-app/pull/1191) Relax peerDependencies for ESLint preset. ([@gaearon](https://github.com/gaearon)) - - This allows the preset to be used in more apps without peer dependency conflicts. We still pin the exact versions in apps that haven't ejected for extra safety. - - * [#1159](https://github.com/facebookincubator/create-react-app/pull/1159) Make jsx-no-undef rule an error. ([@existentialism](https://github.com/existentialism)) - - Using an undefined type in JSX is now treated as a hard lint error because it is guaranteed to crash application at runtime. - -* `react-scripts` - * [#1175](https://github.com/facebookincubator/create-react-app/pull/1175) Remove path module from webpack config on eject. ([@harunhasdal](https://github.com/harunhasdal)) - - This makes the output after ejecting a bit cleaner. - - * [#1120](https://github.com/facebookincubator/create-react-app/pull/1120) Add `testURL` to Jest config. ([@spudly](https://github.com/spudly)) - - This fixes an error when running tests that interact with History API in jsdom. - -#### :memo: Documentation -* `react-scripts` - * [#1143](https://github.com/facebookincubator/create-react-app/pull/1143) Add deploy to Firebase CDN on template's README (Closes [#374](https://github.com/facebookincubator/create-react-app/issues/374)). ([@guilhermebruzzi](https://github.com/guilhermebruzzi)) - * [#1099](https://github.com/facebookincubator/create-react-app/pull/1099) Fix minor typo/grammar. ([@alex-wilmer](https://github.com/alex-wilmer)) - * [#1168](https://github.com/facebookincubator/create-react-app/pull/1168) Add "npm run build silently fails" to Troubleshooting. ([@gaearon](https://github.com/gaearon)) - -#### Committers: 12 -- Alex Wilmer ([alex-wilmer](https://github.com/alex-wilmer)) -- Bogdan Soare ([bogdansoare](https://github.com/bogdansoare)) -- Brian Ng ([existentialism](https://github.com/existentialism)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Guilherme Heynemann Bruzzi ([guilhermebruzzi](https://github.com/guilhermebruzzi)) -- Harun ([harunhasdal](https://github.com/harunhasdal)) -- James Newell ([jameslnewell](https://github.com/jameslnewell)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Li Xuanji ([zodiac](https://github.com/zodiac)) -- Stephen John Sorensen ([spudly](https://github.com/spudly)) -- Vincenzo Chianese ([XVincentX](https://github.com/XVincentX)) - -### Migrating from 0.8.1 to 0.8.2 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.2 -``` - -## 0.8.1 (December 4, 2016) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :bug: Bug Fix -* `react-scripts` - * [#1149](https://github.com/facebookincubator/create-react-app/pull/1149) Fix incorrectly stubbing JavaScript files with a dot in the import path in tests. ([@fson](https://github.com/fson)) - -### Migrating from 0.8.0 to 0.8.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.1 -``` - -## 0.8.0 (December 3, 2016) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :rocket: New Feature -* `react-scripts` - * [#944](https://github.com/facebookincubator/create-react-app/pull/944) Crash the build during CI whenever linter warnings are encountered. ([@excitement-engineer](https://github.com/excitement-engineer)) - - Linter warnings and errors are now checked during a continuous integration build (set by the `CI` environment variable) and the build will fail if any issues are found. See [Continuous Integration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#continuous-integration) for more information. - - * [#1090](https://github.com/facebookincubator/create-react-app/pull/1090) Enable proxying of WebSockets. ([@dceddia](https://github.com/dceddia)) - -* `create-react-app`, `react-scripts` - * [#898](https://github.com/facebookincubator/create-react-app/pull/898) Support Yarn. ([@fson](https://github.com/fson)) - - Yarn is a new fast, reliable and secure alternative to the `npm` client. If you have Yarn installed, `create-react-app` will use it to install packages when you create an app. It also creates a `yarn.lock` file that should be checked into source control (e.g. git). This ensures the same versions of packages will be installed each time `yarn install` is run, on any machine. - - `react-scripts` now also displays instructions using `yarn` commands for projects using Yarn (projects having a `yarn.lock` file). - - To create a project using Yarn, simply install `yarn` and use `create-react-app` like before: - ``` - npm install -g yarn create-react-app@latest - - create-react-app my-app # Packages are now installed with Yarn. - ``` - -#### :boom: Breaking Change -* `babel-preset-react-app` - * [#902](https://github.com/facebookincubator/create-react-app/pull/902) Enable useBuiltIns option on object-rest-spread. ([@existentialism](https://github.com/existentialism)) - - Object rest spread and JSX now use the native `Object.assign()` method instead of Babel's helper function. If you are using `babel-preset-react-app` directly in your project *and* targeting browsers that don't have `Object.assign()` available, from now on you need a polyfill for it (e.g. [`object-assign`](https://www.npmjs.com/package/object-assign)). - - **Note:** `react-scripts` already adds this polyfill, so no changes are necessary in Create React App projects. - -#### :bug: Bug Fix -* `react-scripts` - * [#978](https://github.com/facebookincubator/create-react-app/pull/978) Move the remove-on-eject-end tag at the end of the file. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - - Fixes a bug in ejected configuration. - - * [#1017](https://github.com/facebookincubator/create-react-app/pull/1017) Don't look for `.babelrc` file during test. ([@nhajidin](https://github.com/nhajidin)) - - Fixes a `.babelrc` file in a parent directory interfering with the `npm test` command. - - * [#951](https://github.com/facebookincubator/create-react-app/pull/951) Check for presence of folders before continuing eject. ([@heldinz](https://github.com/heldinz)) - - Fixes a bug where `eject` failed when a `scripts` or `config` folder already existed in the project. - -* `react-dev-utils` - * [#1035](https://github.com/facebookincubator/create-react-app/pull/1035) Fix Chrome tab reuse. ([@einarlove](https://github.com/einarlove)) - - Fixes a bug with the app not opening in the existing tab in Chrome. - - * [#964](https://github.com/facebookincubator/create-react-app/pull/964) Catch and noop call to open web browser. ([@spadin](https://github.com/spadin)) - - Not being able to open a browser doesn't crash the development server now. - -* `eslint-config-react-app`, `react-scripts` - * [#953](https://github.com/facebookincubator/create-react-app/pull/953) Fix `.ico` file extension being handled by test configuration. ([@vadzim](https://github.com/vadzim)) - -#### :nail_care: Enhancement -* `react-scripts` - * [#1032](https://github.com/facebookincubator/create-react-app/pull/1032) Add support for non-interactive terminal. ([@sheerun](https://github.com/sheerun)) - * [#1078](https://github.com/facebookincubator/create-react-app/pull/1078) Upgrade Jest to 17.0. ([@fson](https://github.com/fson)) - * [#1059](https://github.com/facebookincubator/create-react-app/pull/1059) Use `url-loader` with limit 10k as a default loader. ([@bebbi](https://github.com/bebbi)) - - `react-scripts` now treats imports with any unknown file extension as a resource. Files with a size below 10 KB are inlined using a data URI and larger files copied to the build folder. This removes the need for an internal [whitelist of supported file extensions](https://github.com/facebookincubator/create-react-app/issues/667). Any file that's not JS or CSS is now handled the same way. - - * [#924](https://github.com/facebookincubator/create-react-app/pull/924) Enable JavaScript source maps in development. ([@ekaradon](https://github.com/ekaradon)) - * [#1058](https://github.com/facebookincubator/create-react-app/pull/1058) Add missing dev argument in build script message. ([@nhajidin](https://github.com/nhajidin)) - * [#961](https://github.com/facebookincubator/create-react-app/pull/961) Add `collectCoverageFrom` option to collect coverage on files without any tests. ([@pmackcode](https://github.com/pmackcode)) - - The test script now considers all files in the project when calculating test coverage. - - * [#968](https://github.com/facebookincubator/create-react-app/pull/968) Enable gzip compression in the development server (#966). ([@frontsideair](https://github.com/frontsideair)) -* `react-dev-utils`, `react-scripts` - * [#816](https://github.com/facebookincubator/create-react-app/pull/816) add logging of existing default port process on start. ([@ianmcnally](https://github.com/ianmcnally)) - - `react-scripts` can guess which process is running on the port 3000 when it's not available: - ``` - Something is already running on port 3000. Probably: - my-app - in /Users/ian/dev/my-app - - Would you like to run the app on another port instead? - ``` -* `react-dev-utils` - * [#963](https://github.com/facebookincubator/create-react-app/pull/963) Allow webpack 2 as a peerDependency in react-dev-utils. ([@einarlove](https://github.com/einarlove)) - -#### :memo: Documentation -* `react-scripts` - * [#1126](https://github.com/facebookincubator/create-react-app/pull/1126) Add a note about vscode-jest. ([@orta](https://github.com/orta)) - * [#1080](https://github.com/facebookincubator/create-react-app/pull/1080) Add a note for OSX users about watchman and jest. ([@dmr](https://github.com/dmr)) - * [#1071](https://github.com/facebookincubator/create-react-app/pull/1071) Adds to docs - deployment with S3/CloudFront. ([@marcgarreau](https://github.com/marcgarreau)) - * [#976](https://github.com/facebookincubator/create-react-app/pull/976) Added info on using global variables. ([@jhorneman](https://github.com/jhorneman)) - * [#996](https://github.com/facebookincubator/create-react-app/pull/996) Remove redundant `function` from export statement. ([@gnowoel](https://github.com/gnowoel)) - * [#959](https://github.com/facebookincubator/create-react-app/pull/959) Always build before deploying to gh-pages. ([@dsernst](https://github.com/dsernst)) - * [#974](https://github.com/facebookincubator/create-react-app/pull/974) Gently nudge users towards https by default. ([@Swizec](https://github.com/Swizec)) -* Other - * [#1031](https://github.com/facebookincubator/create-react-app/pull/1031) No Configuration -> Convention over Configuration. ([@sheerun](https://github.com/sheerun)) - * [#995](https://github.com/facebookincubator/create-react-app/pull/995) Add Gatsby to alternatives. ([@KyleAMathews](https://github.com/KyleAMathews)) - -#### :house: Internal -* `react-scripts` - * [#1072](https://github.com/facebookincubator/create-react-app/pull/1072) Replace rimraf with fs-extra functions. ([@existentialism](https://github.com/existentialism)) - * [#1068](https://github.com/facebookincubator/create-react-app/pull/1068) Remove bundledDependencies. ([@fson](https://github.com/fson)) - * [#1057](https://github.com/facebookincubator/create-react-app/pull/1057) Update `css-loader`. ([@nhajidin](https://github.com/nhajidin)) - * [#983](https://github.com/facebookincubator/create-react-app/pull/983) Remove custom babel-loader cache dir config. ([@fson](https://github.com/fson)) -* `babel-preset-react-app` - * [#1052](https://github.com/facebookincubator/create-react-app/pull/1052) Remove unnecessary transform plugins for object spread to work. ([@valscion](https://github.com/valscion)) - * [#992](https://github.com/facebookincubator/create-react-app/pull/992) Explain the usage of react-jsx-source & react-jsx-self. ([@bboysathish](https://github.com/bboysathish)) - * [#1051](https://github.com/facebookincubator/create-react-app/pull/1051) Update babel-present-env and use node: 'current' as target. ([@valscion](https://github.com/valscion)) - -#### Committers: 27 -- Adam Stankiewicz ([sheerun](https://github.com/sheerun)) -- Alice Rose ([heldinz](https://github.com/heldinz)) -- Arunoda Susiripala ([arunoda](https://github.com/arunoda)) -- Brian Ng ([existentialism](https://github.com/existentialism)) -- Daniel Rech ([dmr](https://github.com/dmr)) -- Dave Ceddia ([dceddia](https://github.com/dceddia)) -- David Ernst ([dsernst](https://github.com/dsernst)) -- Dirk-Jan Rutten ([excitement-engineer](https://github.com/excitement-engineer)) -- Einar Löve ([einarlove](https://github.com/einarlove)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Fatih ([frontsideair](https://github.com/frontsideair)) -- Ian McNally ([ianmcnally](https://github.com/ianmcnally)) -- Jurie Horneman ([jhorneman](https://github.com/jhorneman)) -- Kyle Mathews ([KyleAMathews](https://github.com/KyleAMathews)) -- Leo Wong ([gnowoel](https://github.com/gnowoel)) -- Marc Garreau ([marcgarreau](https://github.com/marcgarreau)) -- Nazim Hajidin ([nhajidin](https://github.com/nhajidin)) -- Orta ([orta](https://github.com/orta)) -- Patrick Mackinder ([pmackcode](https://github.com/pmackcode)) -- Sandro Padin ([spadin](https://github.com/spadin)) -- Sathish ([bboysathish](https://github.com/bboysathish)) -- Stefan ([bebbi](https://github.com/bebbi)) -- Swizec Teller ([Swizec](https://github.com/Swizec)) -- Vadzim ([vadzim](https://github.com/vadzim)) -- Vesa Laakso ([valscion](https://github.com/valscion)) -- Ville Immonen ([fson](https://github.com/fson)) -- [ekaradon](https://github.com/ekaradon) - -### Migrating from 0.7.0 to 0.8.0 - -You may optionally update the global command (it’s not required, but it adds Yarn support for new projects): - -``` -npm install -g create-react-app@1.0.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.0 -``` - -## 0.7.0 (October 22, 2016) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -### Build Dependency (`react-scripts`) - -* Updates Jest to [version 16.0](http://facebook.github.io/jest/blog/2016/10/03/jest-16.html), with an upgraded CLI, improved snapshot testing, new matchers and more. ([@chase](https://github.com/chase) in [#858](https://github.com/facebookincubator/create-react-app/pull/858)) -* Test setup file `src/setupTests.js` is now called after test framework initialization to support loading custom matchers. ([@just-boris](https://github.com/just-boris) in [#846](https://github.com/facebookincubator/create-react-app/pull/846)) -* Build command shows better instructions for deploying the app to GitHub Pages ([@Janpot](https://github.com/Janpot) in [#841](https://github.com/facebookincubator/create-react-app/pull/841)) -* Build command now generates an asset manifest with mappings from each filename to its final output filename. ([@lukyth](https://github.com/lukyth) in [#891](https://github.com/facebookincubator/create-react-app/pull/891)) -* Build command exits, if there are errors from UglifyJS ([@pdillon](https://github.com/pdillon) in [#859](https://github.com/facebookincubator/create-react-app/pull/859)) -* Eject output is more beautiful now. ([@azakordonets](https://github.com/azakordonets) in [#769](https://github.com/facebookincubator/create-react-app/pull/769)) -* Fixes opening the app in a new tab in Chrome. ([@unixdev](https://github.com/unixdev) in [#831](https://github.com/facebookincubator/create-react-app/pull/831)) -* Fixes environment variables not being defined as normal properties of the `process.env` object. ([@dvkndn](https://github.com/dvkndn) in [#807](https://github.com/facebookincubator/create-react-app/pull/807)) -* Fixes PostCSS autoprefixer not processing CSS files imported with CSS `@import` statements. ([@nhunzaker](https://github.com/nhunzaker) in [#929](https://github.com/facebookincubator/create-react-app/pull/929)) - -### ESLint Config (`eslint-config-react-app`) - -* Adds `import/no-webpack-loader-syntax` rule that forbids using custom Webpack specific syntax to specify Webpack loaders in import statements. ([@fson](https://github.com/fson) in [#803](https://github.com/facebookincubator/create-react-app/pull/803)) -* `react/react-in-jsx-scope` rule ("React must be in scope") is now an error. ([@gaearon](https://github.com/gaearon) in [#822](https://github.com/facebookincubator/create-react-app/pull/822)) -* `no-unused-expressions` rule now allows the use of short circuit and ternary expressions. ([@cannona](https://github.com/cannona) in [#724](https://github.com/facebookincubator/create-react-app/pull/724)) - -### Babel Preset (`babel-preset-react-app`) - -* The preset now detects the Node.js version in test environment and disables unnecessary ES2015 transforms using `babel-preset-env`. ([@shubheksha](https://github.com/shubheksha) in [#878](https://github.com/facebookincubator/create-react-app/pull/878), [@JeffreyATW](https://github.com/JeffreyATW) in [#927 -](https://github.com/facebookincubator/create-react-app/pull/927)) -* Fixes a duplicate dependency on `babel-plugin-transform-regenerator`. ([@akofman](https://github.com/akofman) in [#864](https://github.com/facebookincubator/create-react-app/pull/864)) - -### Utilities (`react-dev-utils`) - -* The error overlay is now disposed after fixing linting errors. ([@jarlef](https://github.com/jarlef) in [#856](https://github.com/facebookincubator/create-react-app/pull/856)) -* Adds support for Webpack 2 to `webpackHotDevClient`. ([@michalkvasnicak](https://github.com/michalkvasnicak) in [#840](https://github.com/facebookincubator/create-react-app/pull/840)) - -### Global CLI (`create-react-app`) - -* Adds support for passing a scoped package name to the `--scripts-version` argument. ([@pdillon](https://github.com/pdillon) in [#826](https://github.com/facebookincubator/create-react-app/pull/826)) -* Fixes installing pre-release versions using a tarball URL with the `--scripts-version` argument. ([@jihchi](https://github.com/jihchi) in [#876](https://github.com/facebookincubator/create-react-app/pull/876)) - -### Migrating from 0.6.1 to 0.7.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.6.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.7.0 -``` - -### Breaking Change in 0.7.0 - -#### Updating Snapshots - -Jest 16 includes [improvements to snapshot testing and changes to the snapshot format](https://facebook.github.io/jest/blog/2016/10/03/jest-16.html#snapshot-updates). If your project uses snapshot testing, you'll need to update the snapshot files. To update the snapshots, run: -``` -npm test -- -u -``` - -## 0.6.1 (September 27, 2016) - -### Build Dependency (`react-scripts`) - -* Babel and ESLint configuration is now placed into `package.json` after ejecting. ([@montogeek](https://github.com/montogeek) in [#773](https://github.com/facebookincubator/create-react-app/pull/773)) - -### Utilities (`react-dev-utils`) - -* Fixes the syntax error overlay padding. ([@fson](https://github.com/fson) in [#758](https://github.com/facebookincubator/create-react-app/pull/758)) - -### Migrating from 0.6.0 to 0.6.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.6.1 -``` - -## 0.6.0 (September 25, 2016) - -### Build Dependency (`react-scripts`) - -* Adds an overlay for syntax errors in development. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) - -### Utilities (`react-dev-utils`) - -* Adds an alternative WebpackDevServer client that displays the error overlay. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) - -### Migrating from 0.5.1 to 0.6.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.6.0 -``` - -**Note: If the project fails to start, remove `node_modules`, ensure `react-scripts` is `0.6.0` in your `package.json`, and run `npm install` again. There seems to be an [npm bug](https://github.com/npm/npm/issues/14073) affecting this update.** - -## 0.5.1 (September 23, 2016) - -### Build Dependency (`react-scripts`) - -* Updates `react-dev-utils` dependency - -### Utilities (`react-dev-utils`) - -* Fixes `%PUBLIC_URL%` replacement to work when specified multiple times. ([@fson](https://github.com/fson) in [#731](https://github.com/facebookincubator/create-react-app/pull/731)) - -### Migrating from 0.5.0 to 0.5.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.5.1 -``` - -## 0.5.0 (September 23, 2016) - -### Build Dependency (`react-scripts`) - -* Adds [support for `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) with arbitrary assets. ([@gaearon](https://github.com/gaearon) in [#703](https://github.com/facebookincubator/create-react-app/pull/703)) -* You can now [specify defaults](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-development-environment-variables-in-env) for environment variables with `.env` file. ([@ayrton](https://github.com/ayrton) in [#695](https://github.com/facebookincubator/create-react-app/pull/695)) -* Ejecting now generates proper `.babelrc` and `.eslintrc`. ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689), [@gaearon](https://github.com/gaearon) in [#705](https://github.com/facebookincubator/create-react-app/pull/705)) -* Some React warnings now [include the component stacktrace](https://twitter.com/dan_abramov/status/779308833399332864). ([@gaearon](https://github.com/gaearon) in [#716](https://github.com/facebookincubator/create-react-app/pull/716)) -* `npm start` doesn’t fail in a composed Docker container. ([@arekkas](https://github.com/arekkas) in [#711](https://github.com/facebookincubator/create-react-app/issues/711)) -* The projects generated with `eject` are now cleaner. ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) -* The project is now managed as a monorepo. ([@ryanyogan](https://github.com/ryanyogan) in [#419](https://github.com/facebookincubator/create-react-app/pull/419), [@fson](https://github.com/fson) in [#678](https://github.com/facebookincubator/create-react-app/pull/678)) - -### ESLint Config (`eslint-config-react-app`) - -* Published for the first time! ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689)) -* Added [`react/no-danger-with-children`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/no-danger-with-children.md) and [`react/style-prop-object`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/style-prop-object.md) rules. ([@fson](https://github.com/fson) in [#696](https://github.com/facebookincubator/create-react-app/pull/696)) - -### Babel Preset (`babel-preset-react-app`) - -* Published for the first time! ([@fson](https://github.com/fson) in [#701](https://github.com/facebookincubator/create-react-app/pull/701)) - -### Utilities (`react-dev-utils`) - -* Published for the first time! ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) - -### Global CLI (`create-react-app`) - -* Added `README` to npm. There were no other changes. - -### Migrating from 0.4.3 to 0.5.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.5.0 -``` - -### Breaking Changes in 0.5.0 - -#### Global ESLint Plugin Versions - -If you used a global ESLint installation for the editor integration, you’ll need to install [these versions of global ESLint packages](https://github.com/facebookincubator/create-react-app/blob/c092086b1b256fd081f10744f90d216dd5217e29/packages/eslint-config-react-app/package.json#L14-L19). - -#### Moving `index.html` into `public` Folder - -You’ll also need to create a new folder called `public` in the root of your project. Then, move `index.html` and files it references (such as a favicon) into that folder. - -You can no longer reference any files from `./src` in `index.html`. Instead, `public/index.html` can now only reference files other inside of the `public` folder using a special variable called `%PUBLIC_URL%`. - -For example, instead of: - -```js - -``` - -You would need to move both `index.html` and `src/favicon.ico` into the `public` folder, and change `` to look like this: - -```html - -``` - -This ensures it become a part of the build output, and resolves correctly both with client-side routing and non-root `homepage` in `package.json`. Read more about [using the `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) and [why these changes were made](https://github.com/facebookincubator/create-react-app/pull/703). - -## 0.4.3 (September 18, 2016) - -This is a hotfix release for a broken package.
-It contained no changes to the code. - -### Build Dependency (`react-scripts`) - -* Fixes a packaging issue that affected npm 2. ([#676](https://github.com/facebookincubator/create-react-app/issues/676)) - -### Migrating from 0.4.2 to 0.4.3 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.3 -``` - -## 0.4.2 (September 18, 2016) - -### Build Dependency (`react-scripts`) - -* Lint output in editor is now opt-in because, due to [this ESLint issue](https://github.com/eslint/eslint/issues/3458), it is broken by default in Atom. ([@fson](https://github.com/fson) in [#649](https://github.com/facebookincubator/create-react-app/pull/649)) -* Fixes an issue causing compile errors when project folder is inside a symlink. ([@motiz88](https://github.com/motiz88) in [#648](https://github.com/facebookincubator/create-react-app/pull/648)) -* You can now import `jpeg`, `wav`, `mp3`, `m4a`, `aac`, and `oga`. ([@mareksuscak](https://github.com/mareksuscak) in [#624](https://github.com/facebookincubator/create-react-app/pull/624), [@danharper](https://github.com/danharper) in [#665](https://github.com/facebookincubator/create-react-app/pull/665)) -* Fixes false positives caused by the case sensitive import warning on Windows. ([@Urthen](https://github.com/Urthen) in [#593](https://github.com/facebookincubator/create-react-app/pull/593)) -* With Docker, `*.json.gzip` files are no longer created in the project folder. ([@thangngoc89](https://github.com/thangngoc89) in [#620](https://github.com/facebookincubator/create-react-app/pull/620)) -* Proxy network errors now abort requests instead of hanging. ([@cloudmu](https://github.com/cloudmu) in [#588](https://github.com/facebookincubator/create-react-app/pull/588)) -* Connection to the development server does not get interrupted in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#652](https://github.com/facebookincubator/create-react-app/pull/652)) -* Unsupported Node versions now print a warning. ([@fson](https://github.com/fson) in [#575](https://github.com/facebookincubator/create-react-app/pull/575)) -* Importing assets with special characters like `@` now works with tests. ([@fson](https://github.com/fson) in [#584](https://github.com/facebookincubator/create-react-app/pull/584)) -* Undefined variable lint rule is promoted from a warning to an error. ([@gaearon](https://github.com/gaearon) in [#669](https://github.com/facebookincubator/create-react-app/pull/669)) -* Variables starting with underscore no longer trigger the “unused variable” rule. ([@valscion](https://github.com/valscion) in [#640](https://github.com/facebookincubator/create-react-app/pull/640)) -* We now print a friendly error when required files are missing. ([@vnctaing](https://github.com/vnctaing) in [#653](https://github.com/facebookincubator/create-react-app/pull/653)) -* The output after creating a project is better formatted. ([@btnwtn](https://github.com/btnwtn) in [#629](https://github.com/facebookincubator/create-react-app/pull/629)) -* Development server logs are less noisy. ([@gaearon](https://github.com/gaearon) in [122068](https://github.com/facebookincubator/create-react-app/commit/1220683276dd9eb2f2719aece7f40bf2ffb397b4)) - -### Global CLI (`create-react-app`) - -* It now runs on early Node versions to print a friendly warning instead of crashing. ([@sotojuan](https://github.com/sotojuan) in [fc3ab4](https://github.com/facebookincubator/create-react-app/commit/fc3ab46d2a54f142f9287ce7de9ab2fc2514487d)) -* We now print a friendly message when you create a project with invalid name. ([@mareksuscak](https://github.com/mareksuscak) in [#628](https://github.com/facebookincubator/create-react-app/pull/628)) -* Passing a custom fork of `react-scripts` to `create-react-app` with `--scripts-version` works again. ([@yesmeck](https://github.com/yesmeck) in [#632](https://github.com/facebookincubator/create-react-app/pull/632)) - -### Migrating from 0.4.1 to 0.4.2 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.4.2 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.2 -``` - -## 0.4.1 (September 3, 2016) - -### Build Dependency (`react-scripts`) - -* We now support (but [don’t recommend](https://github.com/facebookincubator/create-react-app/issues/87#issuecomment-234627904)) `.jsx` file extension. ([@tizmagik](https://github.com/tizmagik) in [#563](https://github.com/facebookincubator/create-react-app/pull/563)) -* Proxy request errors are now printed to the console. ([@cloudmu](https://github.com/cloudmu) in [#502](https://github.com/facebookincubator/create-react-app/pull/502)) - -### Migrating from 0.4.0 to 0.4.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.1 -``` - -## 0.4.0 (September 2, 2016) - -### Build Dependency (`react-scripts`) - -* **Breaking Change:** Disabled implicit serving of source files in development. ([@gaearon](https://github.com/gaearon) in [#551](https://github.com/facebookincubator/create-react-app/pull/551)) -* You can use `NODE_PATH` environment variable for absolute `import` paths. ([@jimmyhmiller](https://github.com/jimmyhmiller) in [#476](https://github.com/facebookincubator/create-react-app/pull/476)) -* If `src/setupTests.js` exists, it will be used to setup the test environment. ([@gaelduplessix](https://github.com/gaelduplessix) in [#548](https://github.com/facebookincubator/create-react-app/pull/548)) -* If `HTTPS` environment variable is set to `true`, development server will run in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#552](https://github.com/facebookincubator/create-react-app/pull/552)) - -### Migrating from 0.3.1 to 0.4.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.0 -``` - -### Breaking Change in 0.4.0 - -Paths like `/src/somefile.png` used to be served in development, but only by accident. They never worked in production builds. Since 0.4.0, we [don’t serve static files by default in development anymore either](https://github.com/facebookincubator/create-react-app/pull/551). This removes a dangerous inconsistency that we never intentionally supported. - -If you need a static file to be part for the build, [import it from JavaScript and you will get its filename](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#adding-images-and-fonts). This ensures it gets included into the production build as well, and its filename contains the content hash. - -If you used static files with ``, [read this new guide](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#referring-to-static-assets-from-link-href) on how to make sure these files get included into the builds. For example, you can replace `` with ``, and then Webpack will recognize it and include it into the build. - -If you referenced some other files from `index.html`, please file an issue to discuss your use case. In the meantime, you can serve them from a separate static server until your use case is supported. - -## 0.3.1 (September 2, 2016) - -### Build Dependency (`react-scripts`) - -* Bumps Jest dependency to fix a few issues discovered yesterday. ([@cpojer](https://github.com/cpojer) in [facebook/jest#1580](https://github.com/facebook/jest/pull/1580), [@insin](https://github.com/insin) in [facebook/jest#1574](https://github.com/facebook/jest/pull/1574)) - -### Migrating from 0.3.0 to 0.3.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.3.1 -``` - -## 0.3.0 (September 1, 2016) - -### Build Dependency (`react-scripts`) - -* Testing is [now supported](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests)! ([Jest project contributors](https://github.com/facebook/jest/pulls?q=is%3Apr+is%3Aclosed), [@cpojer](https://github.com/cpojer) in [#250](https://github.com/facebookincubator/create-react-app/pull/250), [@gaearon](https://github.com/gaearon) in [#378](https://github.com/facebookincubator/create-react-app/pull/378), [#530](https://github.com/facebookincubator/create-react-app/pull/530), [#533](https://github.com/facebookincubator/create-react-app/pull/533)) -* Static files such as CSS, images, and fonts, can now exist outside `src` directory. ([@fson](https://github.com/fson) in [#504](https://github.com/facebookincubator/create-react-app/pull/504)) -* **Breaking Change:** Local paths in `` in `index.html` will now be correctly resolved, so deleting `favicon.ico` is not an error anymore. ([@andreypopp](https://github.com/andreypopp) in [#428](https://github.com/facebookincubator/create-react-app/pull/428)) -* Removed an annoying lint rule that warned for `
this.node = node}>`. ([@mrscobbler](https://github.com/mrscobbler) in [#529](https://github.com/facebookincubator/create-react-app/pull/529)) -* Temporarily disabled `react-constant-elements` Babel transform because of its bugs. ([@gaearon](https://github.com/gaearon) in [#534](https://github.com/facebookincubator/create-react-app/pull/534)) -* Fixed a permission issue with Docker. ([@gaearon](https://github.com/gaearon) in [73c940](https://github.com/facebookincubator/create-react-app/commit/73c940a73205d761230f8d6bf81ecfd460ba28a9)) -* Fixed an issue with generator syntax in Jest that occurred in an alpha release. ([@gaearon](https://github.com/gaearon) in [#535](https://github.com/facebookincubator/create-react-app/pull/535)) - -### Global CLI (`create-react-app`) - -* You can now create a project in a folder that already contains an `.idea` folder, which is necessary for future WebStorm integration. ([@denofevil](https://github.com/denofevil) in [#522](https://github.com/facebookincubator/create-react-app/pull/522)) - -### Migrating from 0.2.3 to 0.3.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.3.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.3.0 -``` - -#### Breaking Change - -Now `favicon.ico` is not treated specially anymore.
-If you use it, move it to `src` and add the following line to `` in your HTML: - -```html - -``` - -#### New Feature - -Since 0.3.0 added a test runner, we recommend that you add it to the `scripts` section of your `package.json` like this: - -```js - // ... - "scripts": { - // ... - "test": "react-scripts test --env=jsdom" - } -``` - -[Then read the testing guide to learn more about using it!](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests) - -## 0.2.3 (August 25, 2016) - -### Build Dependency (`react-scripts`) - -* You can now [proxy requests to an API server](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#proxying-api-requests-in-development) without worrying about CORS. ([@gaearon](https://github.com/gaearon) in [#282](https://github.com/facebookincubator/create-react-app/pull/282)) -* You can now [pass custom environment variables](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#adding-custom-environment-variables) to your application. ([@eliperelman](https://github.com/eliperelman) in [#342](https://github.com/facebookincubator/create-react-app/pull/342)) -* You can now [use `async` and `await`](https://ponyfoo.com/articles/understanding-javascript-async-await) syntax. ([@gaearon](https://github.com/gaearon) in [#327](https://github.com/facebookincubator/create-react-app/pull/327), [@fson](https://github.com/fson) in [#332](https://github.com/facebookincubator/create-react-app/pull/332)) -* Paths with period in them now load successfully on the development server. ([@mxstbr](https://github.com/mxstbr) in [#422](https://github.com/facebookincubator/create-react-app/pull/422)) -* Images with `.webp` extension are now supported. ([@gafemoyano](https://github.com/gafemoyano) in [#458](https://github.com/facebookincubator/create-react-app/pull/458)) -* The most recent version of React is now added to `package.json`. ([@wdhorton](https://github.com/wdhorton) in [#477](https://github.com/facebookincubator/create-react-app/pull/477)) -* Babel configuration is simplified. ([@kripod](https://github.com/kripod) in [#490](https://github.com/facebookincubator/create-react-app/pull/490)) - -### Migrating from 0.2.2 to 0.2.3 - -Update `react-scripts` to point to `0.2.3` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. - -Newly created projects will use `0.2.3` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.2 (August 22, 2016) - -### Build Dependency (`react-scripts`) - -* When the bundle size changes, we now display the difference after build. ([@elijahmanor](https://github.com/elijahmanor) in [#340](https://github.com/facebookincubator/create-react-app/pull/340)) -* `npm install`ing a missing dependency now forces a rebuild. ([@gaearon](https://github.com/gaearon) in [#349](https://github.com/facebookincubator/create-react-app/pull/349)) -* Autoprefixer config now includes more commonly supported browsers. ([@kripod](https://github.com/kripod) in [#345](https://github.com/facebookincubator/create-react-app/pull/345)) -* All the configuration is now documented inline so ejecting doesn’t leave you in the dark. ([@gaearon](https://github.com/gaearon) in [#362](https://github.com/facebookincubator/create-react-app/pull/362)) -* `Object.assign()` polyfill is now bundled by default. ([@gaearon](https://github.com/gaearon) in [#399](https://github.com/facebookincubator/create-react-app/pull/399)) -* [React Native Web](https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/) now works out of the box. ([@grigio](https://github.com/grigio) in [#407](https://github.com/facebookincubator/create-react-app/pull/407)) -* Same asset filenames in different folders don’t confuse the server now. ([@arunoda](https://github.com/arunoda) in [#446](https://github.com/facebookincubator/create-react-app/pull/446)) -* The `otf` font format is now supported. ([@A-gambit](https://github.com/A-gambit) in [#434](https://github.com/facebookincubator/create-react-app/pull/434)) -* The `new-cap` linting rule has been disabled thanks to feedback from Immutable.js users. ([@rricard](https://github.com/rricard) in [#470](https://github.com/facebookincubator/create-react-app/pull/470)) - -### Migrating from 0.2.1 to 0.2.2 - -Update `react-scripts` to point to `0.2.2` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. - -Newly created projects will use `0.2.2` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.1 (August 1, 2016) - -### Build Dependency (`react-scripts`) - -* Fixes an issue with `npm start` taking a very long time on OS X with Firewall enabled ([@gaearon](https://github.com/gaearon) in [#319](https://github.com/facebookincubator/create-react-app/pull/319)) -* Fixes an issue with Webpack eating a lot of CPU in some cases ([@dceddia](https://github.com/dceddia) in [#294](https://github.com/facebookincubator/create-react-app/pull/294)) -* We now warn if you import a file with mismatched casing because this breaks the watcher ([@alexzherdev](https://github.com/alexzherdev) in [#266](https://github.com/facebookincubator/create-react-app/pull/266)) -* CSS files specifying `?v=` after asset filenames, such as Font Awesome, now works correctly ([@alexzherdev](https://github.com/alexzherdev) in [#298](https://github.com/facebookincubator/create-react-app/pull/298)) -* Issues with `npm link`ing `react-scripts` have been fixed ([@dallonf](https://github.com/dallonf) in [#277](https://github.com/facebookincubator/create-react-app/pull/277)) -* We now use `/static` prefix for assets both in development and production ([@gaearon](https://github.com/gaearon) in [#278](https://github.com/facebookincubator/create-react-app/pull/278)) - -### Migrating from 0.2.0 to 0.2.1 - -Update `react-scripts` to point to `0.2.1` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. If you see a warning about wrong file casing next time you `npm start`, fix your imports to use the correct filename casing. - -Newly created projects will use `0.2.1` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.0 (July 28, 2016) - -### Build Dependency (`react-scripts`) - -* You can now enable deployment to GitHub Pages by adding `homepage` field to `package.json` ([@dhruska](https://github.com/dhruska) in [#94](https://github.com/facebookincubator/create-react-app/pull/94)) -* Development server now runs on `0.0.0.0` and works with VirtualBox ([@JWo1F](https://github.com/JWo1F) in [#128](https://github.com/facebookincubator/create-react-app/pull/128)) -* Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebookincubator/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4)) -* When `3000` port is taken, we offer to use another port ([@chocnut](https://github.com/chocnut) in [#101](https://github.com/facebookincubator/create-react-app/pull/101), [2edf21](https://github.com/facebookincubator/create-react-app/commit/2edf2180f2aa6bf647807d0b1fcd95f4cfe4a558)) -* You can now `import` CSS files from npm modules ([@glennreyes](https://github.com/glennreyes) in [#105](https://github.com/facebookincubator/create-react-app/pull/105), [@breaddevil](https://github.com/breaddevil) in [#178](https://github.com/facebookincubator/create-react-app/pull/178)) -* `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebookincubator/create-react-app/pull/235)) -* Regenerator runtime is now included if you use ES6 generators ([@gaearon](https://github.com/gaearon) in [#238](https://github.com/facebookincubator/create-react-app/pull/238)) -* Generated project now contains `.gitignore` ([@npverni](https://github.com/npverni) in [#79](https://github.com/facebookincubator/create-react-app/pull/79), [@chibicode](https://github.com/chibicode) in [#112](https://github.com/facebookincubator/create-react-app/pull/112)) -* ESLint config is now more compatible with Flow ([@gaearon](https://github.com/gaearon) in [#261](https://github.com/facebookincubator/create-react-app/pull/261)) -* A stylistic lint rule about method naming has been removed ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/157)) -* A few unobtrusive accessibility lint rules have been added ([@evcohen](https://github.com/evcohen) in [#175](https://github.com/facebookincubator/create-react-app/pull/175)) -* A `.babelrc` in parent directory no longer causes an error ([@alexzherdev](https://github.com/alexzherdev) in [#236](https://github.com/facebookincubator/create-react-app/pull/236)) -* Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebookincubator/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a)) -* Bug fixes from transitive dependencies are included ([#126](https://github.com/facebookincubator/create-react-app/issues/126)) -* Linting now works with IDEs if you follow [these](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor) instructions ([@keyanzhang](https://github.com/keyanzhang) in [#149](https://github.com/facebookincubator/create-react-app/pull/149)) -* After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebookincubator/create-react-app/pull/229)) - -### Global CLI (`create-react-app`) - -* It enforces that you have Node >= 4 ([@conorhastings](https://github.com/conorhastings) in [#88](https://github.com/facebookincubator/create-react-app/pull/88)) -* It handles `--version` flag correctly ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/152)) - -### Migrating from 0.1.0 to 0.2.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.2.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.2.0 -``` - -You may need to fix a few lint warnings about missing `` tag, but everything else should work out of the box. If you intend to deploy your site to GitHub Pages, you may now [add `homepage` field to `package.json`](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebookincubator/create-react-app/issues/124), follow [these new instructions](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor). - -## 0.1.0 (July 22, 2016) - -* Initial public release diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 55203be74..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,3 +0,0 @@ -# Code of Conduct - -Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 72994ebbf..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,132 +0,0 @@ -# Contributing to Create React App - -Loving Create React App and want to get involved? Thanks! There are plenty of ways you can help. - -Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. - -Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. - -## Core Ideas - -As much as possible, we try to avoid adding configuration and flags. The purpose of this tool is to provide the best experience for people getting started with React, and this will always be our first priority. This means that sometimes we [sacrifice additional functionality](https://gettingreal.37signals.com/ch05_Half_Not_Half_Assed.php) (such as server rendering) because it is too hard to solve it in a way that wouldn’t require any configuration. - -We prefer **convention, heuristics, or interactivity** over configuration.
-Here’s a few examples of them in action. - -### Convention - -Instead of letting the user specify the entry filename, we always assume it to be `src/index.js`. Rather than letting the user specify the output bundle name, we generate it, but make sure to include the content hash in it. Whenever possible, we want to leverage convention to make good choices for the user, especially in cases where it’s easy to misconfigure something. - -### Heuristics - -Normally, `npm start` runs on port `3000`, and this is not explicitly configurable. However some environments like cloud IDEs want the programs to run on a specific port to serve their output. We want to play well with different environments, so Create React App reads `PORT` environment variable and prefers it when it is specified. The trick is that we know cloud IDEs already specify it automatically so there is no need for the user to do anything. Create React App relies on heuristics to do the right thing depending on environment. - -Another example of this is how `npm test` normally launches the watcher, but if the `CI` environment variable is set, it will run tests once. We know that popular CI environments set this variable so the user doesn’t need to do anything. It just works. - -### Interactivity - -We prefer to add interactivity to the command line interface rather than add configuration flags. For example, `npm start` will attempt to run with port `3000` by default but it may be busy. Many other tools just fail in this case and ask that you pass a different port, but Create React App will display a prompt asking if you’d like to run the app on the next available port. - -Another example of interactivity is `npm test` watcher interface. Instead of asking people to pass command line flags for switching between test runner modes or search patterns, we print a hint with keys that you can press during the test session to instruct watcher what to do. Jest supports both flags and interactive CLI but Create React App prefers long-running sessions to keep user immersed in the flow over short-running sessions with different flags. - -### Breaking the Rules - -No rules are perfect. Sometimes we may introduce flags or configuration if we believe the value is high enough to justify the mental cost. For example, we know that apps may be hosted paths different from the root, and we need to support this use case. However we still try to fall back to heuristics when possible. In this example, we ask that you specify `homepage` in `package.json`, and infer the correct path based on it. We also nudge the user to fill out the `homepage` after the build so the user becomes aware that the feature exists. - -## Submitting a Pull Request - -Good pull requests, such as patches, improvements, and new features, are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. - -Please **ask first** if somebody else is already working on this or the core developers think your feature is in-scope for Create React App. Generally always have a related issue with discussions for whatever you are including. - -Please also provide a **test plan**, i.e. specify how you verified that your addition works. - -## Folder Structure of Create React App -`create-react-app` is a monorepo, meaning it is divided into independent sub-packages.
-These packages can be found in the [`packages/`](https://github.com/facebookincubator/create-react-app/tree/master/packages) directory. - -### Overview of directory structure -``` -packages/ - babel-preset-react-app/ - create-react-app/ - eslint-config-react-app/ - react-dev-utils/ - react-scripts/ -``` -### Package Descriptions -#### [babel-preset-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/babel-preset-react-app) -This package is a babel preset intended to be used with `react-scripts`.
-It targets platforms that React is designed to support (IE 9+) and enables experimental features used heavily at Facebook.
-This package is enabled by default for all `create-react-app` scaffolded applications. -#### [create-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/create-react-app) -The global CLI command code can be found in this directory, and shouldn't often be changed. It should run on Node 0.10+. -#### [eslint-config-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app) -This package contains a conservative set of rules focused on making errors apparent and enforces no style rules.
-This package is enabled by default for all `create-react-app` scaffolded applications. -#### [react-dev-utils](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils) -This package contains utilities used for `react-scripts` and sister packages.
-Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting. -#### [react-scripts](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-scripts) -This package is the heart of the project, which contains the scripts for setting up the development server, building production builds, configuring all software used, etc.
-All functionality must be retained (and configuration given to the user) if they choose to eject. - -## Setting Up a Local Copy - -1. Clone the repo with `git clone https://github.com/facebookincubator/create-react-app` - -2. Run `yarn` in the root `create-react-app` folder. - -Once it is done, you can modify any file locally and run `yarn start`, `yarn test` or `yarn build` just like in a generated project. - -If you want to try out the end-to-end flow with the global CLI, you can do this too: - -``` -yarn create-react-app my-app -cd my-app -``` - -and then run `yarn start` or `yarn build`. - -## Contributing to E2E (end to end) tests - -**TL;DR** use the command `yarn e2e:docker` to run unit and e2e tests. - -More detailed information are in the dedicated [README](/packages/react-scripts/fixtures/kitchensink/README.md). - -## Tips for contributors using Windows - -The scripts in tasks folder and other scripts in `package.json` will not work in Windows out of the box. However, using [Bash on windows](https://msdn.microsoft.com/en-us/commandline/wsl/about) makes it easier to use those scripts without any workarounds. The steps to do so are detailed below: - -### Install Bash on Ubuntu on Windows - -A good step by step guide can be found [here](https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/) - -### Install Node.js and yarn -Even if you have node and yarn installed on your windows, it would not be accessible from the bash shell. You would have to install it again. Installing via [`nvm`](https://github.com/creationix/nvm#install-script) is recommended. - -### Line endings - -By default git would use `CRLF` line endings which would cause the scripts to fail. You can change it for this repo only by setting `autocrlf` to false by running `git config core.autocrlf false`. You can also enable it for all your repos by using the `--global` flag if you wish to do so. - -## Cutting a Release - -1. Tag all merged pull requests that go into the release with the relevant milestone. Each merged PR should also be labeled with one of the [labels](https://github.com/facebookincubator/create-react-app/labels) named `tag: ...` to indicate what kind of change it is. -2. Close the milestone. -3. In most releases, only `react-scripts` needs to be released. If you don’t have any changes to the `packages/create-react-app` folder, you don’t need to bump its version or publish it (the publish script will publish only changed packages). -4. Note that files in `packages/create-react-app` should be modified with extreme caution. Since it’s a global CLI, any version of `create-react-app` (global CLI) including very old ones should work with the latest version of `react-scripts`. -5. Create a change log entry for the release: - * You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."` - * Run `yarn changelog`. The command will find all the labeled pull requests merged since the last release and group them by the label and affected packages, and create a change log entry with all the changes and links to PRs and their authors. Copy and paste it to `CHANGELOG.md`. - * Add a four-space indented paragraph after each non-trivial list item, explaining what changed and why. For each breaking change also write who it affects and instructions for migrating existing code. - * Maybe add some newlines here and there. Preview the result on GitHub to get a feel for it. Changelog generator output is a bit too terse for my taste, so try to make it visually pleasing and well grouped. -6. Make sure to include “Migrating from ...” instructions for the previous release. Often you can copy and paste them. -7. Run `npm run publish`. (It has to be `npm run publish` exactly, not just `npm publish` or `yarn publish`.) -8. Wait for a long time, and it will get published. Don’t worry that it’s stuck. In the end the publish script will prompt for versions before publishing the packages. -9. After publishing, create a GitHub Release with the same text as the changelog entry. See previous Releases for inspiration. - -Make sure to test the released version! If you want to be extra careful, you can publish a prerelease by running `npm run publish -- --tag next` instead of `npm run publish`. - ------------- - -*Many thanks to [h5bp](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md) for the inspiration with this contributing guide* diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 188fb2b0b..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013-present, Facebook, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 3da2f5f60..8004b8870 100644 --- a/README.md +++ b/README.md @@ -1,192 +1,7 @@ -# `react-scripts-ts` [![npm version](https://badge.fury.io/js/react-scripts-ts.svg)](https://badge.fury.io/js/react-scripts-ts) [![Build Status](https://travis-ci.org/wmonk/create-react-app-typescript.svg?branch=master)](https://travis-ci.org/wmonk/create-react-app-typescript) +# react-scripts -Create React apps (with Typescript) with no build configuration. +This package includes scripts and configuration used by [Create React App](https://github.com/facebookincubator/create-react-app).
+Please refer to its documentation: - * [Getting Started](#tldr) – How to create a new app. - * [User Guide](https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with react scripts ts. - -_Do you know react and want to try out typescript? Or do you know typescript and want to try out react?_ Get all the benefits from `create-react-app` but you use typescript! 🚀 - -## tl;dr - -```sh -npm install -g create-react-app - -create-react-app my-app --scripts-version=react-scripts-ts -cd my-app/ -npm start -``` - -## Migration - -In general, most upgrades won't require any migration steps to work, but if you experience problems after an upgrade, please file an issue, and we'll add it to the list of migration steps below. - -### From `<2.16.0` to `>=2.16.0` - -Since `2.16.0`, the template uses different `tsconfig` files for both development and production mode. For the latter, unfortunately, the path resolver is not smart enough to fall back to the basic `tsconfig.json` in case the expected `tsconfig.prod.json` is not present, so you have to create this file manually like shown [here](https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/template/tsconfig.prod.json). - -### From `<2.13.0` to `>=2.13.0` - -Since `2.13.0`, `typescript` is listed as a peer dependency of `react-scripts-ts`. For projects generated with at least this version, the init script takes care of properly installing it as dev dependency to the generated projects. Older projects require manual installation, in case you have not already done that. - -Using `npm`: -``` -npm i -D typescript -``` - -Using `yarn`: -``` -yarn add -D typescript -``` - -### From `<2.5.0` to `>=2.5.0` - -Version `2.5.0` introduces a new config file for jest, that is necessary for the tests to run. If you were previously running a version older than `v2.5.0` and upgraded to `v2.5.0` or newer, you need to manually add the new file, or else you'll get an error similar to this when trying to run your tests: - -```javascript -Test suite failed to run - -{ - "messageText": "Cannot read file 'C:\\[project]\\tsconfig.test.json': ENOENT: no such file or directory, open 'C:\\[project]\\tsconfig.test.json'.", - "category": 1, - "code": 5012 -} -``` - -To fix this, create a new file *in the root of the project* called `tsconfig.test.json`, and paste [the content of this file into it](https://raw.githubusercontent.com/wmonk/create-react-app-typescript/master/packages/react-scripts/template/tsconfig.test.json). Everything should work now. For more info, please see [this issue](https://github.com/wmonk/create-react-app-typescript/issues/141). - -## Changelog - -### 2.17.0 -* Update migration instructions - @DorianGrey -* tslint updates - @alexandrudanpop -* Stop eslint includes - @aurerua -* Resolve commited merge conflig - @AndrewKvalheim - -### 2.16.0 -* Allow `moduleNameMapper` config override - @sebald -* Fix travis build - @DorianGrey -* Allow using different tsconfig file for dev and build - @DorianGrey - -### 2.15.1 -* Fix duplicated mjs entry in Jest config - @StevenLangbroek -* Allow `--watchAll` to be set - @DorianGrey - -### 2.15.0 -* Replace TSLint rules with presets - @nielsdB97 -* Update file-loader exclusion rules - @winstonewert -* Fix Uglifyjs settings - @meandmax -* Merge react-script 1.1.x - @wmonk - -### 2.14.0 -* README fixes - @kaminskypavel -* README fixes - @adambowles -* Remove unused JS files - @DorianGrey -* README fixes - @stephtr -* Added the abillity to import js and jsx files with ts-loader - @GeeWee -* Uglifyjs update for es6 support - @thetric - -### 2.13.0 -* Remove tslint-loader from prod builds - @DorianGrey -* Include typescript as devDependency in boilerplate - @ianschmitz -* Document custom module formats - @joshtynjala -* Fix tsconfig.json - @diabelb - -### 2.12.0 -* Update typescript to 2.6.2 - -### 2.11.0 -* Upgrade to [`react-scripts@1.0.17`](https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.17) - -### 2.10.0 -* README updates - StefanSchoof -* README updates - DorianGrey -* Add support for fork-ts-checker-webpack-plugin - johnnyreilly - -### 2.9.0 - UNPUBLISHED -This included changes that were not published by the facebook upstream, so was unpublished. - -### 2.8.0 -* Update typescript to 2.5.3 - @nicolaserny - -### 2.7.0 -* Merge react-scripts@1.0.13 - @JohnNilsson -* Fix git tempalte - @hktonylee -* Provide migration docs - @JReinhold -* Updated dependencies - @swengorschewski -* Fix tslint config - @comerc - -### 2.6.0 -* Merge react-scripts@1.0.10 - @wmonk -* Update component template - @pelotom - -### 2.5.0 -* Support dynamic imports - thanks @nicolaserny, @DorianGrey -* Fix up tsconfig - thanks @js-n -* Fix readme typo - thanks @adambowles -* Move to ts-jest - thanks @DorianGrey - -### 2.4.0 -* Upgrade typescript to 2.4 and ts-loader to 2.2.1 - thanks @frederickfogerty -* Fix readme typo - thanks @wrongway4you - -### 2.3.2 -* Fix `typescript` version to 2.3.x until 2.4 @types are fixed - -### 2.3.1 - -* All tsc to parse config (for `extend`) - Thanks to @DorianGrey -* Fix various jest issues - thanks to @zinserjan -* Fix code coverage - thanks to @zinserjan - -### 2.2.0 -* Upgrade to [`react-scripts@1.0.6`](https://github.com/facebookincubator/create-react-app/) - -### 2.1.0 -* Update to `tslint@5.2.0` - thanks to @mindjuice -* Fix test setup issue - thanks to @jonmpqts -* Add `source-map-loader` - thanks to @Place1 -* Update to `typescript@2.3.3` - thanks to @sjdweb - -### 2.0.1 -* Fix issue with jest finding test files - -### 2.0.0 -* Upgrade to [`react-scripts@1.x.x`](https://github.com/facebookincubator/create-react-app/blob/0d1521aabf5a0201ea1bcccc33e286afe048f820/CHANGELOG.md) - -### 1.4.0 -* Upgrade to typescript@2.3.2 - thanks to @patrick91 -* Add tests around react-scripts-ts - thanks to @migerh - -### 1.3.0 -* Upgrade to typescript@2.2.2 - thanks to @jeremistadler - -### 1.1.8 -* Fix regression where no `@types` were being installed on init - -### 1.1.7 -* Merge facebookincubator/create-react-app@0.9.5 into react-scripts-ts -* Merge facebookincubator/create-react-app@0.9.4 into react-scripts-ts -* Merge facebookincubator/create-react-app@0.9.3 into react-scripts-ts -* Merge facebookincubator/create-react-app@0.9.2 into react-scripts-ts -* Merge facebookincubator/create-react-app@0.9.1 into react-scripts-ts - -### 1.1.6 -* Merge facebookincubator/create-react-app@0.9.0 into react-scripts-ts - -### 1.0.6 -* Add missing `cli-highlight` dependency - -### 1.0.5 -* Print file names when running `npm run build` -* Add support for `setupTest.ts` -* Highlight source code when erroring in `npm run build` - -### 1.0.4 -* Change mentions of `eslint` to `tslint` - -### 1.0.3 -* Remove hidden character from `tsconfig.json` - -### 1.0.2 -* Copy `typescriptTransform.js` when running `npm run eject` +* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. +* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. diff --git a/appveyor.cleanup-cache.txt b/appveyor.cleanup-cache.txt deleted file mode 100644 index ea6d1b9c0..000000000 --- a/appveyor.cleanup-cache.txt +++ /dev/null @@ -1,6 +0,0 @@ -Edit this file to trigger a cache rebuild. -http://help.appveyor.com/discussions/questions/1310-delete-cache - ----- -Just testing if this works. -lalala. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5d957aa7e..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,42 +0,0 @@ -image: Visual Studio 2017 - -environment: - matrix: - - nodejs_version: 8 - test_suite: "simple" - - nodejs_version: 8 - test_suite: "installs" - - nodejs_version: 8 - test_suite: "kitchensink" - - nodejs_version: 6 - test_suite: "simple" - - nodejs_version: 6 - test_suite: "installs" - - nodejs_version: 6 - test_suite: "kitchensink" - -cache: - - node_modules -> appveyor.cleanup-cache.txt - - packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt - -clone_depth: 50 - -matrix: - fast_finish: true - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - -build: off - -skip_commits: - files: - - '**/*.md' - -test_script: - - node --version - - npm --version - - bash tasks/e2e-%test_suite%.sh diff --git a/packages/react-scripts/bin/react-scripts-ts.js b/bin/react-scripts-ts.js similarity index 100% rename from packages/react-scripts/bin/react-scripts-ts.js rename to bin/react-scripts-ts.js diff --git a/bootstrap.js b/bootstrap.js deleted file mode 100644 index b54a1ed9f..000000000 --- a/bootstrap.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -const { execSync, spawn } = require('child_process'); -const { resolve } = require('path'); -const { existsSync } = require('fs'); -const { platform } = require('os'); - -function shouldUseYarn() { - try { - execSync('yarnpkg --version', { stdio: 'ignore' }); - return true; - } catch (e) { - return false; - } -} - -function shouldUseNpmConcurrently() { - try { - const versionString = execSync('npm --version'); - const m = /^(\d+)[.]/.exec(versionString); - // NPM >= 5 support concurrent installs - return Number(m[1]) >= 5; - } catch (e) { - return false; - } -} - -const yarn = shouldUseYarn(); -const windows = platform() === 'win32'; -const lerna = resolve( - __dirname, - 'node_modules', - '.bin', - windows ? 'lerna.cmd' : 'lerna' -); - -if (!existsSync(lerna)) { - if (yarn) { - console.log('Cannot find lerna. Please run `yarn --check-files`.'); - } else { - console.log( - 'Cannot find lerna. Please remove `node_modules` and run `npm install`.' - ); - } - process.exit(1); -} - -let child; -if (yarn) { - // Yarn does not support concurrency - child = spawn(lerna, ['bootstrap', '--npm-client=yarn', '--concurrency=1'], { - stdio: 'inherit', - }); -} else { - let args = ['bootstrap']; - if ( - // The Windows filesystem does not handle concurrency well - windows || - // Only newer npm versions support concurrency - !shouldUseNpmConcurrently() - ) { - args.push('--concurrency=1'); - } - child = spawn(lerna, args, { stdio: 'inherit' }); -} - -child.on('close', code => process.exit(code)); diff --git a/packages/react-scripts/config/env.js b/config/env.js similarity index 100% rename from packages/react-scripts/config/env.js rename to config/env.js diff --git a/packages/react-scripts/config/jest/babelTransform.js b/config/jest/babelTransform.js similarity index 100% rename from packages/react-scripts/config/jest/babelTransform.js rename to config/jest/babelTransform.js diff --git a/packages/react-scripts/config/jest/cssTransform.js b/config/jest/cssTransform.js similarity index 100% rename from packages/react-scripts/config/jest/cssTransform.js rename to config/jest/cssTransform.js diff --git a/packages/react-scripts/config/jest/fileTransform.js b/config/jest/fileTransform.js similarity index 100% rename from packages/react-scripts/config/jest/fileTransform.js rename to config/jest/fileTransform.js diff --git a/packages/react-scripts/config/jest/typescriptTransform.js b/config/jest/typescriptTransform.js similarity index 100% rename from packages/react-scripts/config/jest/typescriptTransform.js rename to config/jest/typescriptTransform.js diff --git a/packages/react-scripts/config/paths.js b/config/paths.js similarity index 100% rename from packages/react-scripts/config/paths.js rename to config/paths.js diff --git a/packages/react-scripts/config/polyfills.js b/config/polyfills.js similarity index 100% rename from packages/react-scripts/config/polyfills.js rename to config/polyfills.js diff --git a/packages/react-scripts/config/webpack.config.dev.js b/config/webpack.config.dev.js similarity index 100% rename from packages/react-scripts/config/webpack.config.dev.js rename to config/webpack.config.dev.js diff --git a/packages/react-scripts/config/webpack.config.prod.js b/config/webpack.config.prod.js similarity index 100% rename from packages/react-scripts/config/webpack.config.prod.js rename to config/webpack.config.prod.js diff --git a/packages/react-scripts/config/webpackDevServer.config.js b/config/webpackDevServer.config.js similarity index 100% rename from packages/react-scripts/config/webpackDevServer.config.js rename to config/webpackDevServer.config.js diff --git a/packages/react-scripts/eslintrc b/eslintrc similarity index 100% rename from packages/react-scripts/eslintrc rename to eslintrc diff --git a/packages/react-scripts/fixtures/kitchensink/.babelrc b/fixtures/kitchensink/.babelrc similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.babelrc rename to fixtures/kitchensink/.babelrc diff --git a/packages/react-scripts/fixtures/kitchensink/.env b/fixtures/kitchensink/.env similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.env rename to fixtures/kitchensink/.env diff --git a/packages/react-scripts/fixtures/kitchensink/.env.development b/fixtures/kitchensink/.env.development similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.env.development rename to fixtures/kitchensink/.env.development diff --git a/packages/react-scripts/fixtures/kitchensink/.env.local b/fixtures/kitchensink/.env.local similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.env.local rename to fixtures/kitchensink/.env.local diff --git a/packages/react-scripts/fixtures/kitchensink/.env.production b/fixtures/kitchensink/.env.production similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.env.production rename to fixtures/kitchensink/.env.production diff --git a/packages/react-scripts/fixtures/kitchensink/.flowconfig b/fixtures/kitchensink/.flowconfig similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.flowconfig rename to fixtures/kitchensink/.flowconfig diff --git a/packages/react-scripts/fixtures/kitchensink/.template.dependencies.json b/fixtures/kitchensink/.template.dependencies.json similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/.template.dependencies.json rename to fixtures/kitchensink/.template.dependencies.json diff --git a/packages/react-scripts/fixtures/kitchensink/README.md b/fixtures/kitchensink/README.md similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/README.md rename to fixtures/kitchensink/README.md diff --git a/packages/react-scripts/fixtures/kitchensink/gitignore b/fixtures/kitchensink/gitignore similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/gitignore rename to fixtures/kitchensink/gitignore diff --git a/packages/react-scripts/fixtures/kitchensink/integration/env.test.js b/fixtures/kitchensink/integration/env.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/integration/env.test.js rename to fixtures/kitchensink/integration/env.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js b/fixtures/kitchensink/integration/initDOM.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/integration/initDOM.js rename to fixtures/kitchensink/integration/initDOM.js diff --git a/packages/react-scripts/fixtures/kitchensink/integration/syntax.test.js b/fixtures/kitchensink/integration/syntax.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/integration/syntax.test.js rename to fixtures/kitchensink/integration/syntax.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/integration/webpack.test.js b/fixtures/kitchensink/integration/webpack.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/integration/webpack.test.js rename to fixtures/kitchensink/integration/webpack.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/public/favicon.ico b/fixtures/kitchensink/public/favicon.ico similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/public/favicon.ico rename to fixtures/kitchensink/public/favicon.ico diff --git a/packages/react-scripts/fixtures/kitchensink/public/index.html b/fixtures/kitchensink/public/index.html similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/public/index.html rename to fixtures/kitchensink/public/index.html diff --git a/packages/react-scripts/fixtures/kitchensink/src/App.js b/fixtures/kitchensink/src/App.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/App.js rename to fixtures/kitchensink/src/App.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/absoluteLoad.js b/fixtures/kitchensink/src/absoluteLoad.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/absoluteLoad.js rename to fixtures/kitchensink/src/absoluteLoad.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/ExpandEnvVariables.js b/fixtures/kitchensink/src/features/env/ExpandEnvVariables.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/ExpandEnvVariables.js rename to fixtures/kitchensink/src/features/env/ExpandEnvVariables.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/ExpandEnvVariables.test.js b/fixtures/kitchensink/src/features/env/ExpandEnvVariables.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/ExpandEnvVariables.test.js rename to fixtures/kitchensink/src/features/env/ExpandEnvVariables.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.js b/fixtures/kitchensink/src/features/env/FileEnvVariables.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.js rename to fixtures/kitchensink/src/features/env/FileEnvVariables.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.test.js b/fixtures/kitchensink/src/features/env/FileEnvVariables.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.test.js rename to fixtures/kitchensink/src/features/env/FileEnvVariables.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.js b/fixtures/kitchensink/src/features/env/NodePath.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.js rename to fixtures/kitchensink/src/features/env/NodePath.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.test.js b/fixtures/kitchensink/src/features/env/NodePath.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/NodePath.test.js rename to fixtures/kitchensink/src/features/env/NodePath.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.js b/fixtures/kitchensink/src/features/env/PublicUrl.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.js rename to fixtures/kitchensink/src/features/env/PublicUrl.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.test.js b/fixtures/kitchensink/src/features/env/PublicUrl.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/PublicUrl.test.js rename to fixtures/kitchensink/src/features/env/PublicUrl.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js b/fixtures/kitchensink/src/features/env/ShellEnvVariables.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js rename to fixtures/kitchensink/src/features/env/ShellEnvVariables.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.test.js b/fixtures/kitchensink/src/features/env/ShellEnvVariables.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.test.js rename to fixtures/kitchensink/src/features/env/ShellEnvVariables.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js b/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js rename to fixtures/kitchensink/src/features/syntax/ArrayDestructuring.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.test.js b/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArrayDestructuring.test.js rename to fixtures/kitchensink/src/features/syntax/ArrayDestructuring.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js b/fixtures/kitchensink/src/features/syntax/ArraySpread.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.js rename to fixtures/kitchensink/src/features/syntax/ArraySpread.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.test.js b/fixtures/kitchensink/src/features/syntax/ArraySpread.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ArraySpread.test.js rename to fixtures/kitchensink/src/features/syntax/ArraySpread.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.js b/fixtures/kitchensink/src/features/syntax/AsyncAwait.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.js rename to fixtures/kitchensink/src/features/syntax/AsyncAwait.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.test.js b/fixtures/kitchensink/src/features/syntax/AsyncAwait.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/AsyncAwait.test.js rename to fixtures/kitchensink/src/features/syntax/AsyncAwait.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.js b/fixtures/kitchensink/src/features/syntax/ClassProperties.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.js rename to fixtures/kitchensink/src/features/syntax/ClassProperties.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.test.js b/fixtures/kitchensink/src/features/syntax/ClassProperties.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ClassProperties.test.js rename to fixtures/kitchensink/src/features/syntax/ClassProperties.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.js b/fixtures/kitchensink/src/features/syntax/ComputedProperties.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.js rename to fixtures/kitchensink/src/features/syntax/ComputedProperties.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.test.js b/fixtures/kitchensink/src/features/syntax/ComputedProperties.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.test.js rename to fixtures/kitchensink/src/features/syntax/ComputedProperties.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js b/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/CustomInterpolation.js rename to fixtures/kitchensink/src/features/syntax/CustomInterpolation.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/CustomInterpolation.test.js b/fixtures/kitchensink/src/features/syntax/CustomInterpolation.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/CustomInterpolation.test.js rename to fixtures/kitchensink/src/features/syntax/CustomInterpolation.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/DefaultParameters.js b/fixtures/kitchensink/src/features/syntax/DefaultParameters.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/DefaultParameters.js rename to fixtures/kitchensink/src/features/syntax/DefaultParameters.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/DefaultParameters.test.js b/fixtures/kitchensink/src/features/syntax/DefaultParameters.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/DefaultParameters.test.js rename to fixtures/kitchensink/src/features/syntax/DefaultParameters.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js b/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js rename to fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.test.js b/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.test.js rename to fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.js b/fixtures/kitchensink/src/features/syntax/Generators.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.js rename to fixtures/kitchensink/src/features/syntax/Generators.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.test.js b/fixtures/kitchensink/src/features/syntax/Generators.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/Generators.test.js rename to fixtures/kitchensink/src/features/syntax/Generators.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js b/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js rename to fixtures/kitchensink/src/features/syntax/ObjectDestructuring.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.test.js b/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectDestructuring.test.js rename to fixtures/kitchensink/src/features/syntax/ObjectDestructuring.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js b/fixtures/kitchensink/src/features/syntax/ObjectSpread.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js rename to fixtures/kitchensink/src/features/syntax/ObjectSpread.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.test.js b/fixtures/kitchensink/src/features/syntax/ObjectSpread.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.test.js rename to fixtures/kitchensink/src/features/syntax/ObjectSpread.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/Promises.js b/fixtures/kitchensink/src/features/syntax/Promises.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/Promises.js rename to fixtures/kitchensink/src/features/syntax/Promises.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/Promises.test.js b/fixtures/kitchensink/src/features/syntax/Promises.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/Promises.test.js rename to fixtures/kitchensink/src/features/syntax/Promises.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.js b/fixtures/kitchensink/src/features/syntax/RestAndDefault.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.js rename to fixtures/kitchensink/src/features/syntax/RestAndDefault.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.test.js b/fixtures/kitchensink/src/features/syntax/RestAndDefault.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.test.js rename to fixtures/kitchensink/src/features/syntax/RestAndDefault.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.js b/fixtures/kitchensink/src/features/syntax/RestParameters.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.js rename to fixtures/kitchensink/src/features/syntax/RestParameters.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.test.js b/fixtures/kitchensink/src/features/syntax/RestParameters.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestParameters.test.js rename to fixtures/kitchensink/src/features/syntax/RestParameters.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js b/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js rename to fixtures/kitchensink/src/features/syntax/TemplateInterpolation.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.test.js b/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/syntax/TemplateInterpolation.test.js rename to fixtures/kitchensink/src/features/syntax/TemplateInterpolation.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.js b/fixtures/kitchensink/src/features/webpack/CssInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.js rename to fixtures/kitchensink/src/features/webpack/CssInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.test.js b/fixtures/kitchensink/src/features/webpack/CssInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/CssInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js b/fixtures/kitchensink/src/features/webpack/ImageInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js rename to fixtures/kitchensink/src/features/webpack/ImageInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.test.js b/fixtures/kitchensink/src/features/webpack/ImageInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/ImageInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/JsonInclusion.js b/fixtures/kitchensink/src/features/webpack/JsonInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/JsonInclusion.js rename to fixtures/kitchensink/src/features/webpack/JsonInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/JsonInclusion.test.js b/fixtures/kitchensink/src/features/webpack/JsonInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/JsonInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/JsonInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.js b/fixtures/kitchensink/src/features/webpack/LinkedModules.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.js rename to fixtures/kitchensink/src/features/webpack/LinkedModules.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js b/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.test.js rename to fixtures/kitchensink/src/features/webpack/LinkedModules.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/NoExtInclusion.js b/fixtures/kitchensink/src/features/webpack/NoExtInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/NoExtInclusion.js rename to fixtures/kitchensink/src/features/webpack/NoExtInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/NoExtInclusion.test.js b/fixtures/kitchensink/src/features/webpack/NoExtInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/NoExtInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/NoExtInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js b/fixtures/kitchensink/src/features/webpack/SvgInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js rename to fixtures/kitchensink/src/features/webpack/SvgInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.test.js b/fixtures/kitchensink/src/features/webpack/SvgInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/SvgInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.js b/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.js rename to fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.test.js b/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.test.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.test.js rename to fixtures/kitchensink/src/features/webpack/UnknownExtInclusion.test.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/aFileWithExt.unknown b/fixtures/kitchensink/src/features/webpack/assets/aFileWithExt.unknown similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/aFileWithExt.unknown rename to fixtures/kitchensink/src/features/webpack/assets/aFileWithExt.unknown diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/aFileWithoutExt b/fixtures/kitchensink/src/features/webpack/assets/aFileWithoutExt similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/aFileWithoutExt rename to fixtures/kitchensink/src/features/webpack/assets/aFileWithoutExt diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/abstract.json b/fixtures/kitchensink/src/features/webpack/assets/abstract.json similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/abstract.json rename to fixtures/kitchensink/src/features/webpack/assets/abstract.json diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/logo.svg b/fixtures/kitchensink/src/features/webpack/assets/logo.svg similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/logo.svg rename to fixtures/kitchensink/src/features/webpack/assets/logo.svg diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/style.css b/fixtures/kitchensink/src/features/webpack/assets/style.css similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/style.css rename to fixtures/kitchensink/src/features/webpack/assets/style.css diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/tiniest-cat.jpg b/fixtures/kitchensink/src/features/webpack/assets/tiniest-cat.jpg similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/features/webpack/assets/tiniest-cat.jpg rename to fixtures/kitchensink/src/features/webpack/assets/tiniest-cat.jpg diff --git a/packages/react-scripts/fixtures/kitchensink/src/index.js b/fixtures/kitchensink/src/index.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/index.js rename to fixtures/kitchensink/src/index.js diff --git a/packages/react-scripts/fixtures/kitchensink/src/subfolder/lol.js b/fixtures/kitchensink/src/subfolder/lol.js similarity index 100% rename from packages/react-scripts/fixtures/kitchensink/src/subfolder/lol.js rename to fixtures/kitchensink/src/subfolder/lol.js diff --git a/lerna.json b/lerna.json deleted file mode 100644 index f1d78d84b..000000000 --- a/lerna.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "lerna": "2.6.0", - "npmClient": "yarn", - "useWorkspaces": true, - "version": "independent", - "changelog": { - "repo": "facebookincubator/create-react-app", - "labels": { - "tag: new feature": ":rocket: New Feature", - "tag: breaking change": ":boom: Breaking Change", - "tag: bug fix": ":bug: Bug Fix", - "tag: enhancement": ":nail_care: Enhancement", - "tag: documentation": ":memo: Documentation", - "tag: internal": ":house: Internal" - }, - "cacheDir": ".changelog" - } -} diff --git a/package.json b/package.json index e02a51dba..72983c264 100644 --- a/package.json +++ b/package.json @@ -1,40 +1,73 @@ { - "private": true, - "workspaces": [ - "packages/*" + "name": "react-scripts-ts", + "version": "2.17.0", + "description": "Configuration and scripts for Create React App.", + "repository": "wmonk/create-react-app", + "license": "BSD-3-Clause", + "engines": { + "node": ">=6" + }, + "bugs": { + "url": "https://github.com/wmonk/create-react-app/issues" + }, + "files": [ + "bin", + "config", + "scripts", + "template", + "utils" ], - "scripts": { - "build": "cd packages/react-scripts && node scripts/build.js", - "changelog": "lerna-changelog", - "create-react-app": "node tasks/cra.js", - "e2e": "tasks/e2e-simple.sh", - "e2e:docker": "tasks/local-test.sh", - "postinstall": "cd packages/react-error-overlay/ && yarn build:prod", - "publish": "tasks/publish.sh", - "start": "cd packages/react-scripts && node scripts/start.js", - "test": "cd packages/react-scripts && node scripts/test.js --env=jsdom", - "format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'", - "precommit": "lint-staged" + "bin": { + "react-scripts-ts": "./bin/react-scripts-ts.js" + }, + "dependencies": { + "autoprefixer": "7.1.6", + "babel-jest": "^22.1.0", + "babel-loader": "^7.1.2", + "babel-preset-react-app": "^3.1.1", + "case-sensitive-paths-webpack-plugin": "2.1.1", + "chalk": "1.1.3", + "css-loader": "0.28.7", + "dotenv": "4.0.0", + "dotenv-expand": "4.2.0", + "extract-text-webpack-plugin": "3.0.2", + "file-loader": "0.11.2", + "fork-ts-checker-webpack-plugin": "^0.2.8", + "fs-extra": "3.0.1", + "html-webpack-plugin": "2.29.0", + "jest": "22.4.2", + "object-assign": "4.1.1", + "postcss-flexbugs-fixes": "3.2.0", + "postcss-loader": "2.0.8", + "promise": "8.0.1", + "raf": "3.4.0", + "source-map-loader": "^0.2.1", + "react-dev-utils": "^5.0.1", + "resolve": "1.6.0", + "style-loader": "0.19.0", + "sw-precache-webpack-plugin": "0.11.4", + "ts-jest": "22.0.1", + "ts-loader": "^2.3.7", + "tsconfig-paths-webpack-plugin": "^2.0.0", + "tslint": "^5.7.0", + "tslint-config-prettier": "^1.10.0", + "tslint-react": "^3.2.0", + "uglifyjs-webpack-plugin": "^1.1.8", + "url-loader": "0.6.2", + "webpack": "3.8.1", + "webpack-dev-server": "2.9.4", + "webpack-manifest-plugin": "1.3.2", + "whatwg-fetch": "2.0.3" }, "devDependencies": { - "@types/jest": "^20.0.4", - "@types/node": "^7.0.21", - "@types/react": "^15.6.1", - "@types/react-dom": "^15.5.0", - "eslint": "^4.4.1", - "husky": "^0.13.2", - "lerna": "2.6.0", - "lerna-changelog": "^0.6.0", - "lint-staged": "^3.3.1", - "prettier": "1.6.1" + "react": "^15.5.4", + "react-dom": "^15.5.4", + "typescript": "^2.7.1" + }, + "peerDependencies": { + "typescript": "2.x" }, - "lint-staged": { - "*.js": [ - "prettier --trailing-comma es5 --single-quote --write", - "git add" - ], - "yarn.lock": [ - "git rm --cached" - ] + "optionalDependencies": { + "fsevents": "^1.1.3" } } diff --git a/packages/babel-preset-react-app/README.md b/packages/babel-preset-react-app/README.md deleted file mode 100644 index 5653831ac..000000000 --- a/packages/babel-preset-react-app/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-preset-react-app - -This package includes the Babel preset used by [Create React App](https://github.com/facebookincubator/create-react-app).
-Please refer to its documentation: - -* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. - -## Usage in Create React App Projects - -The easiest way to use this configuration is with [Create React App](https://github.com/facebookincubator/create-react-app), which includes it by default. **You don’t need to install it separately in Create React App projects.** - -## Usage Outside of Create React App - -If you want to use this Babel preset in a project not built with Create React App, you can install it with following steps. - -First, [install Babel](https://babeljs.io/docs/setup/). - -Then install babel-preset-react-app. - -```sh -npm install babel-preset-react-app --save-dev -``` - -Then create a file named `.babelrc` with following contents in the root folder of your project: - - ```js - { - "presets": ["react-app"] - } - ``` - -This preset uses the `useBuiltIns` option with [transform-object-rest-spread](http://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](http://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled. diff --git a/packages/babel-preset-react-app/index.js b/packages/babel-preset-react-app/index.js deleted file mode 100644 index d90fb6af5..000000000 --- a/packages/babel-preset-react-app/index.js +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ -'use strict'; - -const plugins = [ - // Necessary to include regardless of the environment because - // in practice some other transforms (such as object-rest-spread) - // don't work without it: https://github.com/babel/babel/issues/7215 - require.resolve('babel-plugin-transform-es2015-destructuring'), - // class { handleClick = () => { } } - require.resolve('babel-plugin-transform-class-properties'), - // The following two plugins use Object.assign directly, instead of Babel's - // extends helper. Note that this assumes `Object.assign` is available. - // { ...todo, completed: true } - [ - require.resolve('babel-plugin-transform-object-rest-spread'), - { - useBuiltIns: true, - }, - ], - // Transforms JSX - [ - require.resolve('babel-plugin-transform-react-jsx'), - { - useBuiltIns: true, - }, - ], - // Polyfills the runtime needed for async/await and generators - [ - require.resolve('babel-plugin-transform-runtime'), - { - helpers: false, - polyfill: false, - regenerator: true, - }, - ], -]; - -// This is similar to how `env` works in Babel: -// https://babeljs.io/docs/usage/babelrc/#env-option -// We are not using `env` because it’s ignored in versions > babel-core@6.10.4: -// https://github.com/babel/babel/issues/4539 -// https://github.com/facebookincubator/create-react-app/issues/720 -// It’s also nice that we can enforce `NODE_ENV` being specified. -var env = process.env.BABEL_ENV || process.env.NODE_ENV; -if (env !== 'development' && env !== 'test' && env !== 'production') { - throw new Error( - 'Using `babel-preset-react-app` requires that you specify `NODE_ENV` or ' + - '`BABEL_ENV` environment variables. Valid values are "development", ' + - '"test", and "production". Instead, received: ' + - JSON.stringify(env) + - '.' - ); -} - -if (env === 'development' || env === 'test') { - // The following two plugins are currently necessary to make React warnings - // include more valuable information. They are included here because they are - // currently not enabled in babel-preset-react. See the below threads for more info: - // https://github.com/babel/babel/issues/4702 - // https://github.com/babel/babel/pull/3540#issuecomment-228673661 - // https://github.com/facebookincubator/create-react-app/issues/989 - plugins.push.apply(plugins, [ - // Adds component stack to warning messages - require.resolve('babel-plugin-transform-react-jsx-source'), - // Adds __self attribute to JSX which React will use for some warnings - require.resolve('babel-plugin-transform-react-jsx-self'), - ]); -} - -if (env === 'test') { - module.exports = { - presets: [ - // ES features necessary for user's Node version - [ - require('babel-preset-env').default, - { - targets: { - node: 'current', - }, - }, - ], - // JSX, Flow - require.resolve('babel-preset-react'), - ], - plugins: plugins.concat([ - // Compiles import() to a deferred require() - require.resolve('babel-plugin-dynamic-import-node'), - ]), - }; -} else { - module.exports = { - presets: [ - // Latest stable ECMAScript features - [ - require.resolve('babel-preset-env'), - { - targets: { - // React parses on ie 9, so we should too - ie: 9, - // We currently minify with uglify - // Remove after https://github.com/mishoo/UglifyJS2/issues/448 - uglify: true, - }, - // Disable polyfill transforms - useBuiltIns: false, - // Do not transform modules to CJS - modules: false, - }, - ], - // JSX, Flow - require.resolve('babel-preset-react'), - ], - plugins: plugins.concat([ - // function* () { yield 42; yield 43; } - [ - require.resolve('babel-plugin-transform-regenerator'), - { - // Async functions are converted to generators by babel-preset-env - async: false, - }, - ], - // Adds syntax support for import() - require.resolve('babel-plugin-syntax-dynamic-import'), - ]), - }; - - if (env === 'production') { - // Optimization: hoist JSX that never changes out of render() - // Disabled because of issues: https://github.com/facebookincubator/create-react-app/issues/553 - // TODO: Enable again when these issues are resolved. - // plugins.push.apply(plugins, [ - // require.resolve('babel-plugin-transform-react-constant-elements') - // ]); - } -} diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json deleted file mode 100644 index c6a7e2944..000000000 --- a/packages/babel-preset-react-app/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "babel-preset-react-app", - "version": "3.1.1", - "description": "Babel preset used by Create React App", - "repository": "facebookincubator/create-react-app", - "license": "MIT", - "bugs": { - "url": "https://github.com/facebookincubator/create-react-app/issues" - }, - "files": [ - "index.js" - ], - "dependencies": { - "babel-plugin-dynamic-import-node": "1.1.0", - "babel-plugin-syntax-dynamic-import": "6.18.0", - "babel-plugin-transform-class-properties": "6.24.1", - "babel-plugin-transform-es2015-destructuring": "6.23.0", - "babel-plugin-transform-object-rest-spread": "6.26.0", - "babel-plugin-transform-react-constant-elements": "6.23.0", - "babel-plugin-transform-react-jsx": "6.24.1", - "babel-plugin-transform-react-jsx-self": "6.22.0", - "babel-plugin-transform-react-jsx-source": "6.22.0", - "babel-plugin-transform-regenerator": "6.26.0", - "babel-plugin-transform-runtime": "6.23.0", - "babel-preset-env": "1.6.1", - "babel-preset-react": "6.24.1" - }, - "peerDependencies": { - "babel-runtime": "^6.23.0" - } -} diff --git a/packages/create-react-app/README.md b/packages/create-react-app/README.md deleted file mode 100644 index c8fed0648..000000000 --- a/packages/create-react-app/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# create-react-app - -This package includes the global command for [Create React App](https://github.com/facebookincubator/create-react-app).
-Please refer to its documentation: - -* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js deleted file mode 100755 index 88e533664..000000000 --- a/packages/create-react-app/createReactApp.js +++ /dev/null @@ -1,722 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ - -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// /!\ DO NOT MODIFY THIS FILE /!\ -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// create-react-app is installed globally on people's computers. This means -// that it is extremely difficult to have them upgrade the version and -// because there's only one global version installed, it is very prone to -// breaking changes. -// -// The only job of create-react-app is to init the repository and then -// forward all the commands to the local version of create-react-app. -// -// If you need to add a new command, please add it to the scripts/ folder. -// -// The only reason to modify this file is to add more warnings and -// troubleshooting information for the `create-react-app` command. -// -// Do not make breaking changes! We absolutely don't want to have to -// tell people to update their global version of create-react-app. -// -// Also be careful with new language features. -// This file must work on Node 6+. -// -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// /!\ DO NOT MODIFY THIS FILE /!\ -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -'use strict'; - -const validateProjectName = require('validate-npm-package-name'); -const chalk = require('chalk'); -const commander = require('commander'); -const fs = require('fs-extra'); -const path = require('path'); -const execSync = require('child_process').execSync; -const spawn = require('cross-spawn'); -const semver = require('semver'); -const dns = require('dns'); -const tmp = require('tmp'); -const unpack = require('tar-pack').unpack; -const url = require('url'); -const hyperquest = require('hyperquest'); -const envinfo = require('envinfo'); - -const packageJson = require('./package.json'); - -let projectName; - -const program = new commander.Command(packageJson.name) - .version(packageJson.version) - .arguments('') - .usage(`${chalk.green('')} [options]`) - .action(name => { - projectName = name; - }) - .option('--verbose', 'print additional logs') - .option('--info', 'print environment debug info') - .option( - '--scripts-version ', - 'use a non-standard version of react-scripts' - ) - .option('--use-npm') - .allowUnknownOption() - .on('--help', () => { - console.log(` Only ${chalk.green('')} is required.`); - console.log(); - console.log( - ` A custom ${chalk.cyan('--scripts-version')} can be one of:` - ); - console.log(` - a specific npm version: ${chalk.green('0.8.2')}`); - console.log( - ` - a custom fork published on npm: ${chalk.green('my-react-scripts')}` - ); - console.log( - ` - a .tgz archive: ${chalk.green('https://mysite.com/my-react-scripts-0.8.2.tgz')}` - ); - console.log( - ` - a .tar.gz archive: ${chalk.green( - 'https://mysite.com/my-react-scripts-0.8.2.tar.gz' - )}` - ); - console.log( - ` It is not needed unless you specifically want to use a fork.` - ); - console.log(); - console.log( - ` If you have any problems, do not hesitate to file an issue:` - ); - console.log( - ` ${chalk.cyan('https://github.com/facebookincubator/create-react-app/issues/new')}` - ); - console.log(); - }) - .parse(process.argv); - -if (typeof projectName === 'undefined') { - if (program.info) { - envinfo.print({ - packages: ['react', 'react-dom', 'react-scripts'], - noNativeIDE: true, - duplicates: true, - }); - process.exit(0); - } - console.error('Please specify the project directory:'); - console.log( - ` ${chalk.cyan(program.name())} ${chalk.green('')}` - ); - console.log(); - console.log('For example:'); - console.log(` ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`); - console.log(); - console.log( - `Run ${chalk.cyan(`${program.name()} --help`)} to see all options.` - ); - process.exit(1); -} - -function printValidationResults(results) { - if (typeof results !== 'undefined') { - results.forEach(error => { - console.error(chalk.red(` * ${error}`)); - }); - } -} - -const hiddenProgram = new commander.Command() - .option( - '--internal-testing-template ', - '(internal usage only, DO NOT RELY ON THIS) ' + - 'use a non-standard application template' - ) - .parse(process.argv); - -createApp( - projectName, - program.verbose, - program.scriptsVersion, - program.useNpm, - hiddenProgram.internalTestingTemplate -); - -function createApp(name, verbose, version, useNpm, template) { - const root = path.resolve(name); - const appName = path.basename(root); - - checkAppName(appName); - fs.ensureDirSync(name); - if (!isSafeToCreateProjectIn(root, name)) { - process.exit(1); - } - - console.log(`Creating a new React app in ${chalk.green(root)}.`); - console.log(); - - const packageJson = { - name: appName, - version: '0.1.0', - private: true, - }; - fs.writeFileSync( - path.join(root, 'package.json'), - JSON.stringify(packageJson, null, 2) - ); - - const useYarn = useNpm ? false : shouldUseYarn(); - const originalDirectory = process.cwd(); - process.chdir(root); - if (!useYarn && !checkThatNpmCanReadCwd()) { - process.exit(1); - } - - if (!semver.satisfies(process.version, '>=6.0.0')) { - console.log( - chalk.yellow( - `You are using Node ${process.version} so the project will be bootstrapped with an old unsupported version of tools.\n\n` + - `Please update to Node 6 or higher for a better, fully supported experience.\n` - ) - ); - // Fall back to latest supported react-scripts on Node 4 - version = 'react-scripts@0.9.x'; - } - - if (!useYarn) { - const npmInfo = checkNpmVersion(); - if (!npmInfo.hasMinNpm) { - if (npmInfo.npmVersion) { - console.log( - chalk.yellow( - `You are using npm ${npmInfo.npmVersion} so the project will be boostrapped with an old unsupported version of tools.\n\n` + - `Please update to npm 3 or higher for a better, fully supported experience.\n` - ) - ); - } - // Fall back to latest supported react-scripts for npm 3 - version = 'react-scripts@0.9.x'; - } - } - run(root, appName, version, verbose, originalDirectory, template, useYarn); -} - -function shouldUseYarn() { - try { - execSync('yarnpkg --version', { stdio: 'ignore' }); - return true; - } catch (e) { - return false; - } -} - -function install(root, useYarn, dependencies, verbose, isOnline) { - return new Promise((resolve, reject) => { - let command; - let args; - if (useYarn) { - command = 'yarnpkg'; - args = ['add', '--exact']; - if (!isOnline) { - args.push('--offline'); - } - [].push.apply(args, dependencies); - - // Explicitly set cwd() to work around issues like - // https://github.com/facebookincubator/create-react-app/issues/3326. - // Unfortunately we can only do this for Yarn because npm support for - // equivalent --prefix flag doesn't help with this issue. - // This is why for npm, we run checkThatNpmCanReadCwd() early instead. - args.push('--cwd'); - args.push(root); - - if (!isOnline) { - console.log(chalk.yellow('You appear to be offline.')); - console.log(chalk.yellow('Falling back to the local Yarn cache.')); - console.log(); - } - } else { - command = 'npm'; - args = [ - 'install', - '--save', - '--save-exact', - '--loglevel', - 'error', - ].concat(dependencies); - } - - if (verbose) { - args.push('--verbose'); - } - - const child = spawn(command, args, { stdio: 'inherit' }); - child.on('close', code => { - if (code !== 0) { - reject({ - command: `${command} ${args.join(' ')}`, - }); - return; - } - resolve(); - }); - }); -} - -function run( - root, - appName, - version, - verbose, - originalDirectory, - template, - useYarn -) { - const packageToInstall = getInstallPackage(version, originalDirectory); - const allDependencies = ['react', 'react-dom', packageToInstall]; - - console.log('Installing packages. This might take a couple of minutes.'); - getPackageName(packageToInstall) - .then(packageName => checkIfOnline(useYarn).then(isOnline => ({ - isOnline: isOnline, - packageName: packageName, - }))) - .then(info => { - const isOnline = info.isOnline; - const packageName = info.packageName; - console.log( - `Installing ${chalk.cyan('react')}, ${chalk.cyan('react-dom')}, and ${chalk.cyan(packageName)}...` - ); - console.log(); - - return install(root, useYarn, allDependencies, verbose, isOnline).then( - () => packageName - ); - }) - .then(packageName => { - checkNodeVersion(packageName); - setCaretRangeForRuntimeDeps(packageName); - - const scriptsPath = path.resolve( - process.cwd(), - 'node_modules', - packageName, - 'scripts', - 'init.js' - ); - const init = require(scriptsPath); - init(root, appName, verbose, originalDirectory, template); - - if (version === 'react-scripts@0.9.x') { - console.log( - chalk.yellow( - `\nNote: the project was boostrapped with an old unsupported version of tools.\n` + - `Please update to Node >=6 and npm >=3 to get supported tools in new projects.\n` - ) - ); - } - }) - .catch(reason => { - console.log(); - console.log('Aborting installation.'); - if (reason.command) { - console.log(` ${chalk.cyan(reason.command)} has failed.`); - } else { - console.log(chalk.red('Unexpected error. Please report it as a bug:')); - console.log(reason); - } - console.log(); - - // On 'exit' we will delete these files from target directory. - const knownGeneratedFiles = [ - 'package.json', - 'npm-debug.log', - 'yarn-error.log', - 'yarn-debug.log', - 'node_modules', - ]; - const currentFiles = fs.readdirSync(path.join(root)); - currentFiles.forEach(file => { - knownGeneratedFiles.forEach(fileToMatch => { - // This will catch `(npm-debug|yarn-error|yarn-debug).log*` files - // and the rest of knownGeneratedFiles. - if ( - (fileToMatch.match(/.log/g) && file.indexOf(fileToMatch) === 0) || - file === fileToMatch - ) { - console.log(`Deleting generated file... ${chalk.cyan(file)}`); - fs.removeSync(path.join(root, file)); - } - }); - }); - const remainingFiles = fs.readdirSync(path.join(root)); - if (!remainingFiles.length) { - // Delete target folder if empty - console.log( - `Deleting ${chalk.cyan(`${appName} /`)} from ${chalk.cyan(path.resolve(root, '..'))}` - ); - process.chdir(path.resolve(root, '..')); - fs.removeSync(path.join(root)); - } - console.log('Done.'); - process.exit(1); - }); -} - -function getInstallPackage(version, originalDirectory) { - let packageToInstall = 'react-scripts'; - const validSemver = semver.valid(version); - if (validSemver) { - packageToInstall += `@${validSemver}`; - } else if (version && version.match(/^file:/)) { - packageToInstall = `file:${path.resolve( - originalDirectory, - version.match(/^file:(.*)?$/)[1] - )}`; - } else if (version) { - // for tar.gz or alternative paths - packageToInstall = version; - } - return packageToInstall; -} - -function getTemporaryDirectory() { - return new Promise((resolve, reject) => { - // Unsafe cleanup lets us recursively delete the directory if it contains - // contents; by default it only allows removal if it's empty - tmp.dir({ unsafeCleanup: true }, (err, tmpdir, callback) => { - if (err) { - reject(err); - } else { - resolve({ - tmpdir: tmpdir, - cleanup: () => { - try { - callback(); - } catch (ignored) { - // Callback might throw and fail, since it's a temp directory the - // OS will clean it up eventually... - } - }, - }); - } - }); - }); -} - -function extractStream(stream, dest) { - return new Promise((resolve, reject) => { - stream.pipe( - unpack(dest, err => { - if (err) { - reject(err); - } else { - resolve(dest); - } - }) - ); - }); -} - -// Extract package name from tarball url or path. -function getPackageName(installPackage) { - if (installPackage.match(/^.+\.(tgz|tar\.gz)$/)) { - return getTemporaryDirectory() - .then(obj => { - let stream; - if (/^http/.test(installPackage)) { - stream = hyperquest(installPackage); - } else { - stream = fs.createReadStream(installPackage); - } - return extractStream(stream, obj.tmpdir).then(() => obj); - }) - .then(obj => { - const packageName = require(path.join(obj.tmpdir, 'package.json')).name; - obj.cleanup(); - return packageName; - }) - .catch(err => { - // The package name could be with or without semver version, e.g. react-scripts-0.2.0-alpha.1.tgz - // However, this function returns package name only without semver version. - console.log( - `Could not extract the package name from the archive: ${err.message}` - ); - const assumedProjectName = installPackage.match( - /^.+\/(.+?)(?:-\d+.+)?\.(tgz|tar\.gz)$/ - )[1]; - console.log( - `Based on the filename, assuming it is "${chalk.cyan(assumedProjectName)}"` - ); - return Promise.resolve(assumedProjectName); - }); - } else if (installPackage.indexOf('git+') === 0) { - // Pull package name out of git urls e.g: - // git+https://github.com/mycompany/react-scripts.git - // git+ssh://github.com/mycompany/react-scripts.git#v1.2.3 - return Promise.resolve(installPackage.match(/([^/]+)\.git(#.*)?$/)[1]); - } else if (installPackage.match(/.+@/)) { - // Do not match @scope/ when stripping off @version or @tag - return Promise.resolve( - installPackage.charAt(0) + installPackage.substr(1).split('@')[0] - ); - } else if (installPackage.match(/^file:/)) { - const installPackagePath = installPackage.match(/^file:(.*)?$/)[1]; - const installPackageJson = require(path.join(installPackagePath, 'package.json')); - return Promise.resolve(installPackageJson.name); - } - return Promise.resolve(installPackage); -} - -function checkNpmVersion() { - let hasMinNpm = false; - let npmVersion = null; - try { - npmVersion = execSync('npm --version').toString().trim(); - hasMinNpm = semver.gte(npmVersion, '3.0.0'); - } catch (err) { - // ignore - } - return { - hasMinNpm: hasMinNpm, - npmVersion: npmVersion, - }; -} - -function checkNodeVersion(packageName) { - const packageJsonPath = path.resolve( - process.cwd(), - 'node_modules', - packageName, - 'package.json' - ); - const packageJson = require(packageJsonPath); - if (!packageJson.engines || !packageJson.engines.node) { - return; - } - - if (!semver.satisfies(process.version, packageJson.engines.node)) { - console.error( - chalk.red( - 'You are running Node %s.\n' + - 'Create React App requires Node %s or higher. \n' + - 'Please update your version of Node.' - ), - process.version, - packageJson.engines.node - ); - process.exit(1); - } -} - -function checkAppName(appName) { - const validationResult = validateProjectName(appName); - if (!validationResult.validForNewPackages) { - console.error( - `Could not create a project called ${chalk.red(`"${appName}"`)} because of npm naming restrictions:` - ); - printValidationResults(validationResult.errors); - printValidationResults(validationResult.warnings); - process.exit(1); - } - - // TODO: there should be a single place that holds the dependencies - const dependencies = ['react', 'react-dom', 'react-scripts'].sort(); - if (dependencies.indexOf(appName) >= 0) { - console.error( - chalk.red( - `We cannot create a project called ${chalk.green(appName)} because a dependency with the same name exists.\n` + - `Due to the way npm works, the following names are not allowed:\n\n` - ) + - chalk.cyan(dependencies.map(depName => ` ${depName}`).join('\n')) + - chalk.red('\n\nPlease choose a different project name.') - ); - process.exit(1); - } -} - -function makeCaretRange(dependencies, name) { - const version = dependencies[name]; - - if (typeof version === 'undefined') { - console.error(chalk.red(`Missing ${name} dependency in package.json`)); - process.exit(1); - } - - let patchedVersion = `^${version}`; - - if (!semver.validRange(patchedVersion)) { - console.error( - `Unable to patch ${name} dependency version because version ${chalk.red(version)} will become invalid ${chalk.red(patchedVersion)}` - ); - patchedVersion = version; - } - - dependencies[name] = patchedVersion; -} - -function setCaretRangeForRuntimeDeps(packageName) { - const packagePath = path.join(process.cwd(), 'package.json'); - const packageJson = require(packagePath); - - if (typeof packageJson.dependencies === 'undefined') { - console.error(chalk.red('Missing dependencies in package.json')); - process.exit(1); - } - - const packageVersion = packageJson.dependencies[packageName]; - if (typeof packageVersion === 'undefined') { - console.error(chalk.red(`Unable to find ${packageName} in package.json`)); - process.exit(1); - } - - makeCaretRange(packageJson.dependencies, 'react'); - makeCaretRange(packageJson.dependencies, 'react-dom'); - - fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)); -} - -// If project only contains files generated by GH, it’s safe. -// We also special case IJ-based products .idea because it integrates with CRA: -// https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-243446094 -function isSafeToCreateProjectIn(root, name) { - const validFiles = [ - '.DS_Store', - 'Thumbs.db', - '.git', - '.gitignore', - '.idea', - 'README.md', - 'LICENSE', - 'web.iml', - '.hg', - '.hgignore', - '.hgcheck', - '.npmignore', - 'mkdocs.yml', - 'docs', - '.travis.yml', - '.gitlab-ci.yml', - '.gitattributes', - ]; - console.log(); - - const conflicts = fs - .readdirSync(root) - .filter(file => !validFiles.includes(file)); - if (conflicts.length < 1) { - return true; - } - - console.log( - `The directory ${chalk.green(name)} contains files that could conflict:` - ); - console.log(); - for (const file of conflicts) { - console.log(` ${file}`); - } - console.log(); - console.log( - 'Either try using a new directory name, or remove the files listed above.' - ); - - return false; -} - -function getProxy() { - if (process.env.https_proxy) { - return process.env.https_proxy; - } else { - try { - // Trying to read https-proxy from .npmrc - let httpsProxy = execSync('npm config get https-proxy') - .toString() - .trim(); - return httpsProxy !== 'null' ? httpsProxy : undefined; - } catch (e) { - return; - } - } -} -function checkThatNpmCanReadCwd() { - const cwd = process.cwd(); - let childOutput = null; - try { - // Note: intentionally using spawn over exec since - // the problem doesn't reproduce otherwise. - // `npm config list` is the only reliable way I could find - // to reproduce the wrong path. Just printing process.cwd() - // in a Node process was not enough. - childOutput = spawn.sync('npm', ['config', 'list']).output.join(''); - } catch (err) { - // Something went wrong spawning node. - // Not great, but it means we can't do this check. - // We might fail later on, but let's continue. - return true; - } - if (typeof childOutput !== 'string') { - return true; - } - const lines = childOutput.split('\n'); - // `npm config list` output includes the following line: - // "; cwd = C:\path\to\current\dir" (unquoted) - // I couldn't find an easier way to get it. - const prefix = '; cwd = '; - const line = lines.find(line => line.indexOf(prefix) === 0); - if (typeof line !== 'string') { - // Fail gracefully. They could remove it. - return true; - } - const npmCWD = line.substring(prefix.length); - if (npmCWD === cwd) { - return true; - } - console.error( - chalk.red( - `Could not start an npm process in the right directory.\n\n` + - `The current directory is: ${chalk.bold(cwd)}\n` + - `However, a newly started npm process runs in: ${chalk.bold(npmCWD)}\n\n` + - `This is probably caused by a misconfigured system terminal shell.` - ) - ); - if (process.platform === 'win32') { - console.error( - chalk.red(`On Windows, this can usually be fixed by running:\n\n`) + - ` ${chalk.cyan('reg')} delete "HKCU\\Software\\Microsoft\\Command Processor" /v AutoRun /f\n` + - ` ${chalk.cyan('reg')} delete "HKLM\\Software\\Microsoft\\Command Processor" /v AutoRun /f\n\n` + - chalk.red(`Try to run the above two lines in the terminal.\n`) + - chalk.red( - `To learn more about this problem, read: https://blogs.msdn.microsoft.com/oldnewthing/20071121-00/?p=24433/` - ) - ); - } - return false; -} - -function checkIfOnline(useYarn) { - if (!useYarn) { - // Don't ping the Yarn registry. - // We'll just assume the best case. - return Promise.resolve(true); - } - - return new Promise(resolve => { - dns.lookup('registry.yarnpkg.com', err => { - let proxy; - if (err != null && (proxy = getProxy())) { - // If a proxy is defined, we likely can't resolve external hostnames. - // Try to resolve the proxy name as an indication of a connection. - dns.lookup(url.parse(proxy).hostname, proxyErr => { - resolve(proxyErr == null); - }); - } else { - resolve(err == null); - } - }); - }); -} diff --git a/packages/create-react-app/index.js b/packages/create-react-app/index.js deleted file mode 100755 index a09363660..000000000 --- a/packages/create-react-app/index.js +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env node - -/** - * Copyright (c) 2015-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. - */ - -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// /!\ DO NOT MODIFY THIS FILE /!\ -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// -// create-react-app is installed globally on people's computers. This means -// that it is extremely difficult to have them upgrade the version and -// because there's only one global version installed, it is very prone to -// breaking changes. -// -// The only job of create-react-app is to init the repository and then -// forward all the commands to the local version of create-react-app. -// -// If you need to add a new command, please add it to the scripts/ folder. -// -// The only reason to modify this file is to add more warnings and -// troubleshooting information for the `create-react-app` command. -// -// Do not make breaking changes! We absolutely don't want to have to -// tell people to update their global version of create-react-app. -// -// Also be careful with new language features. -// This file must work on Node 0.10+. -// -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// /!\ DO NOT MODIFY THIS FILE /!\ -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -'use strict'; - -var chalk = require('chalk'); - -var currentNodeVersion = process.versions.node; -var semver = currentNodeVersion.split('.'); -var major = semver[0]; - -if (major < 4) { - console.error( - chalk.red( - 'You are running Node ' + - currentNodeVersion + - '.\n' + - 'Create React App requires Node 4 or higher. \n' + - 'Please update your version of Node.' - ) - ); - process.exit(1); -} - -require('./createReactApp'); diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json deleted file mode 100644 index 4d8f4112e..000000000 --- a/packages/create-react-app/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "create-react-app", - "version": "1.5.2", - "keywords": [ - "react" - ], - "description": "Create React apps with no build configuration.", - "repository": "facebookincubator/create-react-app", - "license": "MIT", - "engines": { - "node": ">=4" - }, - "bugs": { - "url": "https://github.com/facebookincubator/create-react-app/issues" - }, - "files": [ - "index.js", - "createReactApp.js" - ], - "bin": { - "create-react-app": "./index.js" - }, - "dependencies": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "cross-spawn": "^4.0.0", - "envinfo": "3.4.2", - "fs-extra": "^1.0.0", - "hyperquest": "^2.1.2", - "semver": "^5.0.3", - "tar-pack": "^3.4.0", - "tmp": "0.0.31", - "validate-npm-package-name": "^3.0.0" - } -} diff --git a/packages/eslint-config-react-app/README.md b/packages/eslint-config-react-app/README.md deleted file mode 100644 index 777b8f46e..000000000 --- a/packages/eslint-config-react-app/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# eslint-config-react-app - -This package includes the shareable ESLint configuration used by [Create React App](https://github.com/facebookincubator/create-react-app).
-Please refer to its documentation: - -* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. - -## Usage in Create React App Projects - -The easiest way to use this configuration is with [Create React App](https://github.com/facebookincubator/create-react-app), which includes it by default. - -**You don’t need to install it separately in Create React App projects.** - -## Usage Outside of Create React App - -If you want to use this ESLint configuration in a project not built with Create React App, you can install it with following steps. - -First, install this package, ESLint and the necessary plugins. - - ```sh - npm install --save-dev eslint-config-react-app babel-eslint@^7.2.3 eslint@^4.1.1 eslint-plugin-flowtype@^2.34.1 eslint-plugin-import@^2.6.0 eslint-plugin-jsx-a11y@^5.1.1 eslint-plugin-react@^7.1.0 - ``` - -Then create a file named `.eslintrc` with following contents in the root folder of your project: - - ```js - { - "extends": "react-app" - } - ``` - - That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website. - -## Accessibility Checks - -The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) plugin are activated: - -- [accessible-emoji](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md) -- [alt-text](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md) -- [anchor-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md) -- [aria-activedescendant-has-tabindex](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md) -- [aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md) -- [aria-proptypes](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md) -- [aria-role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md) -- [aria-unsupported-elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md) -- [heading-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md) -- [href-no-hash](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/v5.1.1/docs/rules/href-no-hash.md) -- [iframe-has-title](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md) -- [img-redundant-alt](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md) -- [no-access-key](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md) -- [no-distracting-elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md) -- [no-redundant-roles](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md) -- [role-has-required-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md) -- [role-supports-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md) -- [scope](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md) - -If you want to enable even more accessibility rules, you can create an `.eslintrc` file in the root of your project with this content: - - ```json - { - "extends": ["react-app", "plugin:jsx-a11y/recommended"], - "plugins": ["jsx-a11y"] - } - ``` - -However, if you are using [Create React App](https://github.com/facebookincubator/create-react-app) and have not ejected, any additional rules will only be displayed in the [IDE integrations](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor), but not in the browser or the terminal. diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js deleted file mode 100644 index 81fbc45a5..000000000 --- a/packages/eslint-config-react-app/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ - -'use strict'; - -// Inspired by https://github.com/airbnb/javascript but less opinionated. - -// We use eslint-loader so even warnings are very visible. -// This is why we only use "WARNING" level for potential errors, -// and we don't use "ERROR" level at all. - -// In the future, we might create a separate list of rules for production. -// It would probably be more strict. - -// The ESLint browser environment defines all browser globals as valid, -// even though most people don't know some of them exist (e.g. `name` or `status`). -// This is dangerous as it hides accidentally undefined variables. -// We blacklist the globals that we deem potentially confusing. -// To use them, explicitly reference them, e.g. `window.name` or `window.status`. -var restrictedGlobals = [ - 'addEventListener', - 'blur', - 'close', - 'closed', - 'confirm', - 'defaultStatus', - 'defaultstatus', - 'event', - 'external', - 'find', - 'focus', - 'frameElement', - 'frames', - 'history', - 'innerHeight', - 'innerWidth', - 'length', - 'location', - 'locationbar', - 'menubar', - 'moveBy', - 'moveTo', - 'name', - 'onblur', - 'onerror', - 'onfocus', - 'onload', - 'onresize', - 'onunload', - 'open', - 'opener', - 'opera', - 'outerHeight', - 'outerWidth', - 'pageXOffset', - 'pageYOffset', - 'parent', - 'print', - 'removeEventListener', - 'resizeBy', - 'resizeTo', - 'screen', - 'screenLeft', - 'screenTop', - 'screenX', - 'screenY', - 'scroll', - 'scrollbars', - 'scrollBy', - 'scrollTo', - 'scrollX', - 'scrollY', - 'self', - 'status', - 'statusbar', - 'stop', - 'toolbar', - 'top', -]; - -module.exports = { - root: true, - - parser: 'babel-eslint', - - plugins: ['import', 'flowtype', 'jsx-a11y', 'react'], - - env: { - browser: true, - commonjs: true, - es6: true, - jest: true, - node: true, - }, - - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - jsx: true, - generators: true, - experimentalObjectRestSpread: true, - }, - }, - - rules: { - // http://eslint.org/docs/rules/ - 'array-callback-return': 'warn', - 'default-case': ['warn', { commentPattern: '^no default$' }], - 'dot-location': ['warn', 'property'], - eqeqeq: ['warn', 'allow-null'], - 'new-parens': 'warn', - 'no-array-constructor': 'warn', - 'no-caller': 'warn', - 'no-cond-assign': ['warn', 'except-parens'], - 'no-const-assign': 'warn', - 'no-control-regex': 'warn', - 'no-delete-var': 'warn', - 'no-dupe-args': 'warn', - 'no-dupe-class-members': 'warn', - 'no-dupe-keys': 'warn', - 'no-duplicate-case': 'warn', - 'no-empty-character-class': 'warn', - 'no-empty-pattern': 'warn', - 'no-eval': 'warn', - 'no-ex-assign': 'warn', - 'no-extend-native': 'warn', - 'no-extra-bind': 'warn', - 'no-extra-label': 'warn', - 'no-fallthrough': 'warn', - 'no-func-assign': 'warn', - 'no-implied-eval': 'warn', - 'no-invalid-regexp': 'warn', - 'no-iterator': 'warn', - 'no-label-var': 'warn', - 'no-labels': ['warn', { allowLoop: true, allowSwitch: false }], - 'no-lone-blocks': 'warn', - 'no-loop-func': 'warn', - 'no-mixed-operators': [ - 'warn', - { - groups: [ - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - allowSamePrecedence: false, - }, - ], - 'no-multi-str': 'warn', - 'no-native-reassign': 'warn', - 'no-negated-in-lhs': 'warn', - 'no-new-func': 'warn', - 'no-new-object': 'warn', - 'no-new-symbol': 'warn', - 'no-new-wrappers': 'warn', - 'no-obj-calls': 'warn', - 'no-octal': 'warn', - 'no-octal-escape': 'warn', - 'no-redeclare': 'warn', - 'no-regex-spaces': 'warn', - 'no-restricted-syntax': ['warn', 'WithStatement'], - 'no-script-url': 'warn', - 'no-self-assign': 'warn', - 'no-self-compare': 'warn', - 'no-sequences': 'warn', - 'no-shadow-restricted-names': 'warn', - 'no-sparse-arrays': 'warn', - 'no-template-curly-in-string': 'warn', - 'no-this-before-super': 'warn', - 'no-throw-literal': 'warn', - 'no-undef': 'error', - 'no-restricted-globals': ['error'].concat(restrictedGlobals), - 'no-unexpected-multiline': 'warn', - 'no-unreachable': 'warn', - 'no-unused-expressions': [ - 'warn', - { - allowShortCircuit: true, - allowTernary: true, - allowTaggedTemplates: true, - }, - ], - 'no-unused-labels': 'warn', - 'no-unused-vars': [ - 'warn', - { - args: 'none', - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': [ - 'warn', - { - functions: false, - classes: false, - variables: false, - }, - ], - 'no-useless-computed-key': 'warn', - 'no-useless-concat': 'warn', - 'no-useless-constructor': 'warn', - 'no-useless-escape': 'warn', - 'no-useless-rename': [ - 'warn', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - 'no-with': 'warn', - 'no-whitespace-before-property': 'warn', - radix: 'warn', - 'require-yield': 'warn', - 'rest-spread-spacing': ['warn', 'never'], - strict: ['warn', 'never'], - 'unicode-bom': ['warn', 'never'], - 'use-isnan': 'warn', - 'valid-typeof': 'warn', - 'no-restricted-properties': [ - 'error', - // TODO: reenable once import() is no longer slow. - // https://github.com/facebookincubator/create-react-app/issues/2176 - // { - // object: 'require', - // property: 'ensure', - // message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting', - // }, - { - object: 'System', - property: 'import', - message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting', - }, - ], - - // https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules - 'import/first': 'error', - 'import/no-amd': 'error', - 'import/no-webpack-loader-syntax': 'error', - - // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules - 'react/jsx-no-comment-textnodes': 'warn', - 'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }], - 'react/jsx-no-target-blank': 'warn', - 'react/jsx-no-undef': 'error', - 'react/jsx-pascal-case': [ - 'warn', - { - allowAllCaps: true, - ignore: [], - }, - ], - 'react/jsx-uses-react': 'warn', - 'react/jsx-uses-vars': 'warn', - 'react/no-danger-with-children': 'warn', - 'react/no-deprecated': 'warn', - 'react/no-direct-mutation-state': 'warn', - 'react/no-is-mounted': 'warn', - 'react/react-in-jsx-scope': 'error', - 'react/require-render-return': 'error', - 'react/style-prop-object': 'warn', - - // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules - 'jsx-a11y/accessible-emoji': 'warn', - 'jsx-a11y/alt-text': 'warn', - 'jsx-a11y/anchor-has-content': 'warn', - 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn', - 'jsx-a11y/aria-props': 'warn', - 'jsx-a11y/aria-proptypes': 'warn', - 'jsx-a11y/aria-role': 'warn', - 'jsx-a11y/aria-unsupported-elements': 'warn', - 'jsx-a11y/heading-has-content': 'warn', - 'jsx-a11y/href-no-hash': 'warn', - 'jsx-a11y/iframe-has-title': 'warn', - 'jsx-a11y/img-redundant-alt': 'warn', - 'jsx-a11y/no-access-key': 'warn', - 'jsx-a11y/no-distracting-elements': 'warn', - 'jsx-a11y/no-redundant-roles': 'warn', - 'jsx-a11y/role-has-required-aria-props': 'warn', - 'jsx-a11y/role-supports-aria-props': 'warn', - 'jsx-a11y/scope': 'warn', - - // https://github.com/gajus/eslint-plugin-flowtype - 'flowtype/define-flow-type': 'warn', - 'flowtype/require-valid-file-annotation': 'warn', - 'flowtype/use-flow-type': 'warn', - }, -}; diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json deleted file mode 100644 index c13b0417c..000000000 --- a/packages/eslint-config-react-app/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "eslint-config-react-app", - "version": "2.1.0", - "description": "ESLint configuration used by Create React App", - "repository": "facebookincubator/create-react-app", - "license": "MIT", - "bugs": { - "url": "https://github.com/facebookincubator/create-react-app/issues" - }, - "files": [ - "index.js" - ], - "peerDependencies": { - "babel-eslint": "^7.2.3", - "eslint": "^4.1.1", - "eslint-plugin-flowtype": "^2.34.1", - "eslint-plugin-import": "^2.6.0", - "eslint-plugin-jsx-a11y": "^5.1.1", - "eslint-plugin-react": "^7.1.0" - } -} diff --git a/packages/react-dev-utils/FileSizeReporter.js b/packages/react-dev-utils/FileSizeReporter.js deleted file mode 100644 index 4aa35ee01..000000000 --- a/packages/react-dev-utils/FileSizeReporter.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ - -'use strict'; - -var fs = require('fs'); -var path = require('path'); -var chalk = require('chalk'); -var filesize = require('filesize'); -var recursive = require('recursive-readdir'); -var stripAnsi = require('strip-ansi'); -var gzipSize = require('gzip-size').sync; - -// Prints a detailed summary of build files. -function printFileSizesAfterBuild( - webpackStats, - previousSizeMap, - buildFolder, - maxBundleGzipSize, - maxChunkGzipSize -) { - var root = previousSizeMap.root; - var sizes = previousSizeMap.sizes; - var assets = (webpackStats.stats || [webpackStats]) - .map(stats => - stats - .toJson() - .assets.filter(asset => /\.(js|css)$/.test(asset.name)) - .map(asset => { - var fileContents = fs.readFileSync(path.join(root, asset.name)); - var size = gzipSize(fileContents); - var previousSize = sizes[removeFileNameHash(root, asset.name)]; - var difference = getDifferenceLabel(size, previousSize); - return { - folder: path.join( - path.basename(buildFolder), - path.dirname(asset.name) - ), - name: path.basename(asset.name), - size: size, - sizeLabel: - filesize(size) + (difference ? ' (' + difference + ')' : '') - }; - }) - ) - .reduce((single, all) => all.concat(single), []); - assets.sort((a, b) => b.size - a.size); - var longestSizeLabelLength = Math.max.apply( - null, - assets.map(a => stripAnsi(a.sizeLabel).length) - ); - var suggestBundleSplitting = false; - assets.forEach(asset => { - var sizeLabel = asset.sizeLabel; - var sizeLength = stripAnsi(sizeLabel).length; - if (sizeLength < longestSizeLabelLength) { - var rightPadding = ' '.repeat(longestSizeLabelLength - sizeLength); - sizeLabel += rightPadding; - } - var isMainBundle = asset.name.indexOf('main.') === 0; - var maxRecommendedSize = isMainBundle - ? maxBundleGzipSize - : maxChunkGzipSize; - var isLarge = maxRecommendedSize && asset.size > maxRecommendedSize; - if (isLarge && path.extname(asset.name) === '.js') { - suggestBundleSplitting = true; - } - console.log( - ' ' + - (isLarge ? chalk.yellow(sizeLabel) : sizeLabel) + - ' ' + - chalk.dim(asset.folder + path.sep) + - chalk.cyan(asset.name) - ); - }); - if (suggestBundleSplitting) { - console.log(); - console.log( - chalk.yellow('The bundle size is significantly larger than recommended.') - ); - console.log( - chalk.yellow( - 'Consider reducing it with code splitting: https://goo.gl/9VhYWB' - ) - ); - console.log( - chalk.yellow( - 'You can also analyze the project dependencies: https://goo.gl/LeUzfb' - ) - ); - } -} - -function removeFileNameHash(buildFolder, fileName) { - return fileName - .replace(buildFolder, '') - .replace( - /\/?(.*)(\.[0-9a-f]+)(\.chunk)?(\.js|\.css)/, - (match, p1, p2, p3, p4) => p1 + p4 - ); -} - -// Input: 1024, 2048 -// Output: "(+1 KB)" -function getDifferenceLabel(currentSize, previousSize) { - var FIFTY_KILOBYTES = 1024 * 50; - var difference = currentSize - previousSize; - var fileSize = !Number.isNaN(difference) ? filesize(difference) : 0; - if (difference >= FIFTY_KILOBYTES) { - return chalk.red('+' + fileSize); - } else if (difference < FIFTY_KILOBYTES && difference > 0) { - return chalk.yellow('+' + fileSize); - } else if (difference < 0) { - return chalk.green(fileSize); - } else { - return ''; - } -} - -function measureFileSizesBeforeBuild(buildFolder) { - return new Promise(resolve => { - recursive(buildFolder, (err, fileNames) => { - var sizes; - if (!err && fileNames) { - sizes = fileNames - .filter(fileName => /\.(js|css)$/.test(fileName)) - .reduce( - (memo, fileName) => { - var contents = fs.readFileSync(fileName); - var key = removeFileNameHash(buildFolder, fileName); - memo[key] = gzipSize(contents); - return memo; - }, - {} - ); - } - resolve({ - root: buildFolder, - sizes: sizes || {}, - }); - }); - }); -} - -module.exports = { - measureFileSizesBeforeBuild: measureFileSizesBeforeBuild, - printFileSizesAfterBuild: printFileSizesAfterBuild, -}; diff --git a/packages/react-dev-utils/InterpolateHtmlPlugin.js b/packages/react-dev-utils/InterpolateHtmlPlugin.js deleted file mode 100644 index 9233bdefa..000000000 --- a/packages/react-dev-utils/InterpolateHtmlPlugin.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ - -// This Webpack plugin lets us interpolate custom variables into `index.html`. -// Usage: `new InterpolateHtmlPlugin({ 'MY_VARIABLE': 42 })` -// Then, you can use %MY_VARIABLE% in your `index.html`. - -// It works in tandem with HtmlWebpackPlugin. -// Learn more about creating plugins like this: -// https://github.com/ampedandwired/html-webpack-plugin#events - -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); - -class InterpolateHtmlPlugin { - constructor(replacements) { - this.replacements = replacements; - } - - apply(compiler) { - compiler.plugin('compilation', compilation => { - compilation.plugin( - 'html-webpack-plugin-before-html-processing', - (data, callback) => { - // Run HTML through a series of user-specified string replacements. - Object.keys(this.replacements).forEach(key => { - const value = this.replacements[key]; - data.html = data.html.replace( - new RegExp('%' + escapeStringRegexp(key) + '%', 'g'), - value - ); - }); - callback(null, data); - } - ); - }); - } -} - -module.exports = InterpolateHtmlPlugin; diff --git a/packages/react-dev-utils/ModuleScopePlugin.js b/packages/react-dev-utils/ModuleScopePlugin.js deleted file mode 100644 index 39cd89030..000000000 --- a/packages/react-dev-utils/ModuleScopePlugin.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ - -'use strict'; - -const chalk = require('chalk'); -const path = require('path'); - -class ModuleScopePlugin { - constructor(appSrc, allowedFiles = []) { - this.appSrc = appSrc; - this.allowedFiles = new Set(allowedFiles); - } - - apply(resolver) { - const { appSrc } = this; - resolver.plugin('file', (request, callback) => { - // Unknown issuer, probably webpack internals - if (!request.context.issuer) { - return callback(); - } - if ( - // If this resolves to a node_module, we don't care what happens next - request.descriptionFileRoot.indexOf('/node_modules/') !== -1 || - request.descriptionFileRoot.indexOf('\\node_modules\\') !== -1 || - // Make sure this request was manual - !request.__innerRequest_request - ) { - return callback(); - } - // Resolve the issuer from our appSrc and make sure it's one of our files - // Maybe an indexOf === 0 would be better? - const relative = path.relative(appSrc, request.context.issuer); - // If it's not in src/ or a subdirectory, not our request! - if (relative.startsWith('../') || relative.startsWith('..\\')) { - return callback(); - } - const requestFullPath = path.resolve( - path.dirname(request.context.issuer), - request.__innerRequest_request - ); - if (this.allowedFiles.has(requestFullPath)) { - return callback(); - } - // Find path from src to the requested file - // Error if in a parent directory of src/ - const requestRelative = path.relative(appSrc, requestFullPath); - if ( - requestRelative.startsWith('../') || requestRelative.startsWith('..\\') - ) { - callback( - new Error( - `You attempted to import ${chalk.cyan(request.__innerRequest_request)} which falls outside of the project ${chalk.cyan('src/')} directory. ` + - `Relative imports outside of ${chalk.cyan('src/')} are not supported. ` + - `You can either move it inside ${chalk.cyan('src/')}, or add a symlink to it from project's ${chalk.cyan('node_modules/')}.` - ), - request - ); - } else { - callback(); - } - }); - } -} - -module.exports = ModuleScopePlugin; diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md deleted file mode 100644 index 034790c22..000000000 --- a/packages/react-dev-utils/README.md +++ /dev/null @@ -1,328 +0,0 @@ -# react-dev-utils - -This package includes some utilities used by [Create React App](https://github.com/facebookincubator/create-react-app).
-Please refer to its documentation: - -* [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. - -## Usage in Create React App Projects - -These utilities come by default with [Create React App](https://github.com/facebookincubator/create-react-app), which includes it by default. **You don’t need to install it separately in Create React App projects.** - -## Usage Outside of Create React App - -If you don’t use Create React App, or if you [ejected](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-eject), you may keep using these utilities. Their development will be aligned with Create React App, so major versions of these utilities may come out relatively often. Feel free to fork or copy and paste them into your projects if you’d like to have more control over them, or feel free to use the old versions. Not all of them are React-specific, but we might make some of them more React-specific in the future. - -### Entry Points - -There is no single entry point. You can only import individual top-level modules. - -#### `new InterpolateHtmlPlugin(replacements: {[key:string]: string})` - -This Webpack plugin lets us interpolate custom variables into `index.html`.
-It works in tandem with [HtmlWebpackPlugin](https://github.com/ampedandwired/html-webpack-plugin) 2.x via its [events](https://github.com/ampedandwired/html-webpack-plugin#events). - -```js -var path = require('path'); -var HtmlWebpackPlugin = require('html-dev-plugin'); -var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); - -// Webpack config -var publicUrl = '/my-custom-url'; - -module.exports = { - output: { - // ... - publicPath: publicUrl + '/' - }, - // ... - plugins: [ - // Makes the public URL available as %PUBLIC_URL% in index.html, e.g.: - // - new InterpolateHtmlPlugin({ - PUBLIC_URL: publicUrl - // You can pass any key-value pairs, this was just an example. - // WHATEVER: 42 will replace %WHATEVER% with 42 in index.html. - }), - // Generates an `index.html` file with the