Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Merge upstream create-react-app v1.0.7 #90

Merged
merged 427 commits into from
Aug 2, 2017
Merged

Conversation

iamlacroix
Copy link

@iamlacroix iamlacroix commented Jun 30, 2017

New Features

  • webpack 2 (w/ tree shaking)
  • Uses an overhauled version of babel-preset-trunkclub behind the scenes which is based on the latest babel-preset-create-react-app (separate PR TBD). This new preset switches us to babel-preset-env.

Docs

  • Added an upgrade guide. This should help with a lot of the gotchas that might be encountered.

Breaking Changes

  • Babel no longer rewrites import states to require() functions since webpack 2 handles this now. This means you can't use module.exports in a file if you have used one or more import statements.
  • webpack 2 expects explicit loader names that match the full npm module name. For example, svgo-loader and html-loader are valid, while svgo and html are NOT valid. This issue will be encountered when using inline loaders.
  • Probably more but my brain is fried.

How to Test

Install the beta to your app:

yarn upgrade @trunkclub/build@beta

Reviewers Extraordinaire

@jblock @zperrault @eanplatter @littleredninja @wSnarski @johnromas @alexbartling @amyschmidt @jasonkaskel

Yep, tagging you all ¯\_(ツ)_/¯

gaearon and others added 30 commits March 6, 2017 13:05
* fix eject for linked react-scripts

* path.resolve => resolveApp
 - create-react-app@1.3.0
 - eslint-config-react-app@0.6.1
 - react-dev-utils@0.5.2
 - react-scripts@0.9.4
* Switch to preset-env
Disables webpack modules by enabling babel modules to resolve facebook#1638

* Bump babel-core to match babel preset versions

* Add uglify to targets
* Add red box prototype

* Unmount fail node when hot-reloaded (future proofing)

* Slightly improve error reason

* Add Chrome unhandledrejection listener

* Close red box when Escape is pressed

* Construct our own source if not available

* Resolve sourcemaps for friendlier traces

* Allow error to be scrolled

* Only utilize sourcemaps, not the magic. :(

* Make view similar to React Native

* Fix an uncaught syntax error

* Add workaround for Firefox 50

* Add a hint for closing the prompt

* Multiple error support
When there's multiple errors, simply state that there are more instead of re-rendering

* Log any renderer error

* Dim node_modules in display

* Override chrome stack trace limit

* Magic: show me some source!

* Add ability to toggle internal calls

* Switch text from show -> hide

* Change color scheme to something easier on the eyes

* Change UI to be friendlier (thanks @nicinabox)
facebook#1101 (comment)
facebook#1101 (comment)

* Update styles

* Add container inside overlay

* Apply pre style

* Add line highlight

* Add omitted frames ui

* Move yellow to var

* Do all function names in black

* Adapt container based on screen size

* Extract ansiHTML

Use base16-github theme

* Linting

* Add syntax highlighting of errors

* Linting

* Remove white background

* Append new files to package.json

* Target exact version

* White is a little harsh, use same color as red box.

* Fix a bug where omitted frames would never be rendered
(under certain circumstances)

* Show local file path instead of confusing webpack://

* Do not require the entire file

* Remove css file

* Use context size, not a magic variable.

* Fix title regression

* Update dependency

* Do not center text for internal calls

* Temporarily disable links

* Switch internal toggle to 'i'

* Remove unnecessary rules from container style

* Reduce omitted frames font size

* Fix font family in pre > code

* Re-introduce line highlighting

* Object.<anonymous> -> (anonymous function)

* Add ability to see script source

* Add missing ansi mappings

* Remove SIAF

* Skip native functions

* Extract hints div function

* Extract renderers

* Refacor var names

* If source is disabled, don't use the line.

* Allow toggle between source

* Allow bundles to be expanded

* Wow, how did I let this one slip?

* Toggle text for UX/DX

* Make it so clicking Close unmounts the error component

* Do not allow hot reloading once an error is thrown

* Do not wrap lines for small displays

* Fix toggle when additional errors happen

* Make the close a button

* Capture and store errors

* Dispose on render; move additional logic

* Only make code not wrap

* Switch to a view-by-index method

* Allow user to switch between errors with arrow keys

* Fix text while switching between errors

* Update close button style

* Render additional errors at top

* Add left and right arrows

* Make frames pointy

* UTF-8 arrows

* Don't mount unneeded DOM node

* Switch to single changing text for compiled <-> source

* Don't display arrows with only one error.

* Collapsed and expanded

* Make sure the last collapse toggle is appended

* Do not show the stack trace if it doesn't resolve to a file we wrote

* Style container with media queries

* Do not allow x overflow; break words by default.

* Trim off whitespace of lines

* Remove padding since it's not outer-most

* Add footer message

* Extract css file to JS

* Only inject the css when the overlay is up

* Extract red variable

* Remove env

* Update babel-code-frame

* Set force color to true

* Extract out collapse div logic

* Remove arrow field

* Insert a top collapse

* Make browser friendlier

* Absolutify ^

* Make arrows buttons

* Accessify

* Let there be ES5

* Pretty css

* Use forEach where we can ...

* Remove extracted loop

* Fix IE compatibility

* Capture React warnings

* Add source override via React output parsing

* Whoops, fix arguments to crash.

* es5-ify

* Re-enable e2e-install directory test

* Only rewrite line number if it was resolved and leaves a line at bottom

* Rename failFast to crashOverlay

* Disable console proxy

* Appease linter

* Appease more
* Whitelist files that can be embedded through url-loader

Change the current catch-all loader to use file-loader instead of
url-loader, and exclude common image file extensons. Add another url-loader
for images, configured identically to the original catch-all loader.

Part of issue facebook#1293.

* Update tests to reflect change in loader config

* Integration test fix

* More CI fixes

* Work around broken loader-utils behaviour in integration tests

* Revise the documentation around file loading

* Documentation tweaks

* Docs tweak

* Update test now that webpack/loader-utils has been updated

* Update react-scripts to depend on babel-loader@7.0.0-alpha.2

* Bump deps
* Display yarn instead of yarnpkg

* Refactored displayd commands

* Removed testing directory
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
* Update configuration philosophy

* Remove explanation
* Suggest `serve` for serving the `build` directory

* How to handle it with Node in prod (or other platforms)

* Pretty newline added

* Adjusted default port of static server

* Remove `open` command from output

* Removed constant assignment

* Better explanation for not using having to use a static server

* Cute newline added

* Style nits
Iterating over an object's keys using `for/in` is idiomatic and it's safe (in all modern browsers) to not check hasOwnProperty as long as the object is a plain object. Can we remove this lint rule?
…acebook#1783)

* Run CI on Node 7

* Bump detect-port: 1.0.1 -> 1.1.0

* Run AppVeyor CI on Node 7
* Add 0.9.5 changelog

* Update CHANGELOG.md
* docs: replace TDLR with a meaningful heading

* docs: insert section No additional build tools

* Tweak wording
* Fix for issue facebook#1798: Suggested 'yarn build' versus 'yarn run build'

* remove 'run' from 'yarn test' command as well

* conditionally show 'run' if Yarn is not available
* Fixes a silent crash when ejecting

* Delete unnecessary files

* Remove references to eslintrc in Webpack config

* Fix lint

* Correct ESLint CLI options
Timer and others added 28 commits May 24, 2017 11:00
* Don't resolve if on network

* Update WebpackDevServerUtils.js
* Upgraded eslint-plugin-jsx-a11y to 5.0.3 to take advantage of
  d70ac7d7975819e7a52b85465ec67a0d93eb962a
* Add navigateFallbackWhitelist /__* to SW Precache config

* Add comments
 - eslint-config-react-app@1.0.4
 - react-dev-utils@2.0.1
 - react-error-overlay@1.0.6
 - react-scripts@1.0.6
* Print file sizes with correct build folder path.

* Just use the print the basename.
Simplified steps for deploying app to `now` as a static site. No need to `serve` script in `package.json` file. As of May 15, 2017, all static deployments on `now` are free and unlimited.
…book#2379)

* Disable a micro-option in uglify that appears to be buggy

See facebook#2376

* wrong plugin

* Add a comment
 - react-dev-utils@3.0.0
 - react-error-overlay@1.0.7
 - react-scripts@1.0.7
@iamlacroix iamlacroix merged commit 6f3e256 into master Aug 2, 2017
@imjoshdean-tc imjoshdean-tc deleted the merge-upstream-107 branch January 28, 2019 21:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet