Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Merge facebook v0.9.5 #53

Merged
merged 202 commits into from
Mar 30, 2017
Merged

Merge facebook v0.9.5 #53

merged 202 commits into from
Mar 30, 2017

Conversation

sverhoeven
Copy link
Member

@sverhoeven sverhoeven commented Mar 29, 2017

Used local registry with npm publish of react-scripts and tslint-config-react-app to successfully run create-react-app my-app --scripts-version @nlesc/react-scripts

Fixes #48
Fixes #46
Unblocks #38, because PR upgrades to Typescript 2.2
Fixes #22
Fixes #45
Fixes #8
Fixes #6

gaearon and others added 30 commits December 11, 2016 12:00
…#1148)

Use a 'BROWSER' environment variable with npm start to specify which
browser to open. if the value of 'BROWSER' is not valid executable file,
don't open any browser.
* Add "Changing the Page Title" to User Guide

* Add link to main README
…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.
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
Timer and others added 12 commits March 6, 2017 22:14
* 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
* Display yarn instead of yarnpkg

* Refactored displayd commands

* Removed testing directory
* 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
@sverhoeven sverhoeven requested a review from jspaaks March 29, 2017 15:03
@sverhoeven
Copy link
Member Author

sverhoeven commented Mar 29, 2017

If the relative path to tsconfig.json in webpack config and createJestConfig is set the npm run e2e goes
further till line 165 of e2e-simple.sh.
During node /tmp/tmp.QAUR3TcPkq/node_modules/create-react-app/index.js --scripts-version=XXXXXXXX/create-react-app/packages/react-scripts/nlesc-react-scripts-0.1.2.tgz test-app test first pauses with Couldn't find any versions for "@nlesc/tslint-config-react-app" that matches "=1.1.2" choice which when tslint-config-react-app has been published to local registry is passed, but then fails with:

[at-loader] Checking finished with 9 errors
Error in bail mode: [at-loader] ./src/App.tsx:4:18 
    TS2307: Cannot find module './logo.svg'.
...
e2e-simple.sh: ERROR! An error was encountered executing line 225.

e2e-simple.sh runs packages/react-scripts/scripts/build.js from root of this repo instead of from the root of a generated app.

Solutions:

  1. The path to tsconfig.json should be added to ./packages/react-scripts/config/paths.js and used in webpack config and createJestConfig (and maybe more places like tslint). Then e2e-*.sh and npm run commands use the correct tsconfig.json file instead of using a empty default.

  2. The test after line 165 of e2e-simple.sh should have the tslint-config-react-app npm linked so the local version is used instead of from the npmjs registry.

@sverhoeven
Copy link
Member Author

Solution 1 implemented.

Alternate solution for tslint-config-react-app, published [email protected] this is similar to eslint-config-react-app.

@jspaaks jspaaks merged commit 711b2fa into master Mar 30, 2017
@jspaaks jspaaks deleted the merge-facebook-v0.9.5 branch March 30, 2017 14:58
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.