Commit Graph

27 Commits

Author SHA1 Message Date
Dan Abramov
b10337697e Don't crash npm test when hg/git are missing (#5212) 2018-10-01 22:08:14 +01:00
Joe Haddad
62b0942be6 Change default test environment to jsdom (#5074) 2018-09-24 11:30:04 -04:00
Joe Haddad
50b4857ff8 Revert "Add support for yarn and lerna monorepos. (#3741)"
This reverts commit b43ad04b88.
2018-09-18 14:31:19 -04:00
Dan Abramov
3b102fe1b9 Work around Jest environment resolving bug (#4247) 2018-04-03 18:44:59 +01:00
bradfordlemley
b43ad04b88 Add support for yarn and lerna monorepos. (#3741)
* Support for multiple source paths via package.json srcPaths entry.

Initial support for yarn workspace.

Support lerna workspace, fix for when to use template files.

Remove support for specifying srcPaths in package.json.

Re-enable transpilation caching.

* Clean up, use file matching (similar to original) in webpack configs instead of matching function.

* Remove package lock files.

* Fix for eject.
Note: monorepos won't work after eject.
Can be fixed easily with JEST 22.0.?+ which has file pattern matches against realpaths.

* Filter tests to run only tests in monorepo components included by the app.
(Not sure this is desireable, might be cool to be able to easily run all tests in monorepo from one app.)

* Fix conditions for when to use template.

* Fix eject.

* Remove code that is not needed w/ Jest 22.

* Include all cra-comp tests in monorepo instead of trying to include only tests that are dependencies of app.
(tests can be easily filtered via jest cli if desired, e.g. 'npm test -- myapp comp1')

* Pin find-pkg version.

* Hopefully fix jest test file matching on windows by removing first slash.

* E2E tests for monorepo.

* Run monorepo tests in CI.

* Fix and test post-eject build.

* Fix e2e test.

* Fix test suite names in appveyor.

* Include individual package dirs as srcPaths instead of top-level monorepo root.
Fixes build/start after eject.

* Fix running tests after eject.

* Clean up test workspace, add some verifcations.

* Cleanup.

* Try to fix hang when running test on appveyor.

* Don't write babel or lint config to package.json when ejecting.

* Incorporate review comments.
* Simply monorepo pkg finder
* Only include monorepo pkgs if app itself is included in monorepo
* Check for specific tests in e2e

* Fixes for windows.

* Fix for kitchensink mocha tests compiling.

* Add lerna monorepo test.

* Fix lerna bootstrap on windows.

* Incorporate more review comments:
* remove support for lerna w/o yarn workspace
* add react and react-dom as devDeps to comp1 and comp2

* Add monorepo info to user guide.
2018-02-01 20:58:18 +00:00
Dan Abramov
19e0bb1881 Support Jest --watchAll flag (#3804)
* Support Jest --watchAll flag

* Use clearer condition

* Add comma
2018-01-15 17:49:57 +00:00
Dan Abramov
11db9af4df Add preflight check to guard against wrong versions of webpack/eslint/jest higher up the tree (#3771)
* Run real scripts in local development

* Add preflight check warning

* I know what I am doing

* Move preflight check into individual scripts

This ensures we don't try to filter NODE_PATH twice, accidentally removing the now-absolute path.

* Slightly tweak the wording

* Fix lint
2018-01-15 00:08:14 -05:00
Sophie Alpert
2e82ebb337 BSD+Patents -> MIT (#3189)
* File headers BSD+Patents -> MIT

* BSD+Patents -> MIT
2017-09-26 10:30:05 +01:00
Dan Abramov
2069e8ac43 Consistently set environment variables (#2382) 2017-05-27 12:37:07 +01:00
Valerii Sorokobatko
80a7fc391d Feature/different env config files #1343 (#1344)
* support different env configs.

* fomrat code

* Hide doc

* Slightly rework the PR

* Remove .env in default template
* Use just one entry in the paths
* Unify env.js and loadEnv.js

* Oops, forgot these folks
2017-05-12 11:30:59 +01:00
David
0ace417c45 Make scripts crash on unhandled rejections (#1819)
* Makes end-to-end testing crash on unhandled rejections

* Comment fix
2017-03-14 15:32:48 -04:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* 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
2017-03-07 19:46:10 +00:00
Dan Abramov
1bfd5dafdf Fix internal linting setup and add missing headers (#1741) 2017-03-06 14:20:29 +00:00
Daniel Grant
b88d6655eb Modularise scripts (#1433)
* Refactor start script into modules

* Move dev server config into config file

* Replace eject file whitelist with a "remove-file-on-eject" flag

* Move utils into scripts folder (for inclusion in ejection)

* Add missed changes

* Pass showInstructions as an argument

* Fix eject bug

* Don't eject babelTransform
2017-03-03 22:05:07 -05:00
Dan Abramov
2f6fac9f93 Fix npm test on Windows (#1647) 2017-02-26 13:35:24 +00:00
Joe Haddad
b609ac96fe Use posix paths for Jest config during eject (#1635)
Resolves #1417 and #1498.
2017-02-24 17:06:54 -05:00
David
ac6a4c83fd Updated react-scripts babel-jest && jest packages to 18.0.0 (#1311) 2016-12-23 12:09:39 -08:00
Dan Abramov
a13a65f1c5 Clear scrollback in test mode (#1237) 2016-12-11 03:33:34 -08:00
Benoit Averty
a60140f811 Disable jest watch mode when --coverage flag is present (#1229) 2016-12-11 02:03:19 -08:00
Brian Ng
909d938166 Fix some typos (#809) 2016-10-01 12:13:42 +03:00
Dan Abramov
e5bf5af296 Extract some utilities into a separate package (#723)
* Extract some utilities into a separate package

* Add utils dir to `files` in package.json

* Do not create an empty `utils` dir on eject
2016-09-23 20:53:08 +01:00
Dan Abramov
5b7a306cba Minor tweaks 2016-09-23 12:41:14 +01:00
Dan Abramov
9a70038b6d Preserve scripts/test.js after ejecting (#715)
Fixes #702
2016-09-23 12:35:26 +01:00
Ayrton De Craene
8e5183ac1b Load environment file in development (#695)
* Load environment file via dotenv if .env file is present

* Document loading environment variables in .env file

* Minor doc tweaks
2016-09-23 11:59:38 +01:00
Dan Abramov
ba34b0b79b Eject .babelrc instead of separate configs (#705)
Fixes #410, #674
2016-09-23 00:33:14 +01:00
Dan Abramov
bc6392afaf Add support for public/ folder (#703) 2016-09-22 21:25:34 +01:00
Ville Immonen
26464096d5 Set up a monorepo with Lerna 2016-09-19 10:52:19 +03:00