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

Merge upstream changes from create-react-app 0.9.x #84

Merged
merged 211 commits into from
May 16, 2017

Conversation

iamlacroix
Copy link

@iamlacroix iamlacroix commented May 3, 2017

What

Merges the 0.9.x upstream changes into our fork. Via #83

Why

Keeping up with the Kardashians.

How to test

yarn add @trunkclub/build@7.0.0-alpha.1
# or
npm install @trunkclub/build@7.0.0-alpha.1

Tested with the Following Apps

  • member_messenger_app (@iamlacroix)
  • stylist_app
  • member_profile_app
  • lama
  • onboarding_app
  • account_app
  • trunk_app

msuzoagu and others added 30 commits December 12, 2016 16:43
…nd Errors" (facebook#1260)

* Adds note on how to resolve file or directory not found errors for heroku deployments

* Style tweaks
…k#1264)

Browser launch can still be suppressed using BROWSER=none
…ook#1270)

* facebookgh-1269: Enabling nested folder paths for project name

* facebookgh-1269: Added "fs-extra" and removed "path-exists"

* facebookgh-1269: Added e2e test cases to verify nested folder names
There’s a common tool included in Hadoop that also has a `yarn` command,
which created issues for users who had Hadoop installed:
* facebook#1257
* facebook#1363

Yarn also installs the command under `yarnpkg` alias (added in
yarnpkg/yarn@cefa9a3)
so we can use `yarnpkg` instead of `yarn` to make it more reliable.

This has no effect on users who don't have Hadoop installed, but those
who have won't see errors from falsely detecting Hadoop Yarn as Yarn
the package manager, and they can now also install Yarn to make use of
our Yarn support without the Hadoop Yarn interfering.
There’s a common tool included in Hadoop that also has a `yarn` command,
which created issues for users who had Hadoop installed:
* facebook#1257
* facebook#1363

Yarn also installs the command under `yarnpkg` alias (added in
yarnpkg/yarn@cefa9a3)
so we can use `yarnpkg` instead of `yarn` to make it more reliable.

This has no effect on users who don't have Hadoop installed, but those
who have won't see errors from falsely detecting Hadoop Yarn as Yarn
the package manager, and they can now also install Yarn to make use of
our Yarn support without the Hadoop Yarn interfering.
 - create-react-app@1.0.3
 - react-scripts@0.8.5
Array.forEach is passed the following parameters:

currentValue
    The current element being processed in the array.
index
    The index of the current element being processed in the array.
array
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

console.log takes multiple arguments. We only want to print the first one, the actually message.
* Document Flow support

Projects created by Create React App use the `babel-preset-react` which includes
Flow babel plugins which introduces new syntax. This is important for users to know
as it causes what used to be syntax errors to be silently suppressed because they're
valid type annotations in Flow. For example if a user accidentally has `[foo: 'bar']`,
Babel will silently convert it to `[foo]`.

* Make it a bit clearer
)

* Use a more sophisticated template for end-to-end testing.

* Not publish integration tests to npm

* Use "commander" for  cli argv handling

* Handle different scripts version forms and exits without a name given

* Prepare the commands for testing with a template

* Fix dev "template" path

* Add various features to test

* Test various features separately

* Test language features

* Comment unused e2e.sh lines

* Add "development" tests

* Test environment variables

* Test webpack plugins

* Replace kitchensink README

* Switch integration tests from jest to mocha

* Use `fs-extra`

* Use the correct folders

* Do some cleanup

* Print a better message for `--template`

* Test `npm start` with and without https

* Separate fast e2e testing from kitchensink testing

* Hide `--internal-testing-template` (former `--template`) CLI option
* Add causes of dev server not detecting changes

Add causes of `npm start` not detecting changes to Troubleshooting chapter of User Guide

* Reworded slightly

* Update README.md
…ebook#1437)

* Added Rails link to User Guide

* docs: unify sections for rails and node backend integration

* docs: fix faulty link and indentation
Per final comment in facebook#372

`Snapshot rendering should actually be pretty stable / useable after React 15.4.1.
See this post for more info.`
…k#1458)

ATM if react-scripts is (erroneously) declared in `dependencies` instead of `devDependencies` or isn't declared at all, the `eject` script will fail half-way. This change makes it more robust, react-scripts will be removed from either, if present.
* E2E: run tests when react is ready

* Entangle e2e with callbacks

* Remove unused e2e lines
tmos and others added 14 commits April 14, 2017 22:57
* Fix npm to yarn

* yarn & npm

* Update index.html

* Switch ordering of suggestion

We should suggest NPM first for new users.
* Add linked modules test

* Keep fallback after eject
* Add note about installing watchman

* Update CONTRIBUTING.md
Pass the host from environment variable as argument of the devServer's
listen function instead of a field of options object.
Set the default host to 0.0.0.0 instead of localhost.
* Adding folder structure to help people navigate through project. It helps in resolving issues by providing brief description of each package and its purpose

* Removing unnecessary packages from Folder structure heading

* Update CONTRIBUTING.md
# Conflicts:
#	packages/eslint-config-react-app/index.js
* Node.js serving with absolute path

It’s safer to use the absolute path of the directory that you want to serve, in case you run the express app from another directory.

* Update README.md
Copy link

@jblock jblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I can't quite discern how this affects any changes we've made ourselves, but if it can build one of the internal apps with it, I think we're good 👍

Bigger question: can we/should we run the CRA e2e suite on Circle?

Copy link

@sloanelybutsurely sloanelybutsurely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on!

"dotenv": "2.0.0",
"elm-webpack-loader": "3.0.6",
"eslint": "3.8.1",
"eslint": "3.16.1",
"eslint-config-react-app": "^0.6.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use @trunkclub/eslint-config right? No need for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, I thought I removed it.

@@ -31,49 +31,51 @@
"dependencies": {
"@trunkclub/eslint-config": "3.2.0",
"@trunkclub/react-dev-utils": "1.1.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we need to update the version of @trunkclub/react-dev-utils?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch.

"progress-bar-webpack-plugin": "1.9.0",
"promise": "7.1.1",
"react-dev-utils": "^0.4.2",
"react-dev-utils": "^0.5.2",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this package right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, strange. I'll remove it.

// Point ESLint to our predefined config.
eslint: {
configFile: path.join(__dirname, '../eslintrc'),
useEslintrc: false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use emitWarning: true still? Without it, linting errors fail the dev builds entirely.
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@iamlacroix
Copy link
Author

@jblock e2e breaks right now b/c of linting discrepancies.

@sloanelybutsurely
Copy link

Getting this when running tcweb-build in account_app. Looks like this is because there's a new file in utils which hasn't been published (you'll have to do so manually) and referenced in @trunkclub/build

account_app % NODE_ENV=production yarn run build
yarn run v0.23.3
$ tcweb-build build
module.js:471
    throw err;
    ^

Error: Cannot find module '@trunkclub/react-dev-utils/FileSizeReporter'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/zach/github/trunkclub/account_app/node_modules/@trunkclub/build/scripts/build.js:33:24)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

@iamlacroix
Copy link
Author

iamlacroix commented May 3, 2017

@zperrault That's due to the utils dep not being version bumped. I'm pushing an update in a min. (worked locally b/c of lerna link)

@iamlacroix
Copy link
Author

@zperrault @jblock Ok, just published 7.0.0-alpha.1 for you to try.

Copy link

@eanplatter eanplatter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tho I admit I didn't read all of it

@iamlacroix iamlacroix merged commit 7a11edd into master May 16, 2017
@imjoshdean-tc imjoshdean-tc deleted the facebookincubator-0.9.x 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.