Commit Graph

241 Commits

Author SHA1 Message Date
Andreas Cederström
4582491a8b Fix eslint complaints in build.js (#7870) 2019-10-24 12:43:21 +02:00
Joshua Robinson
a351750bc9 Add additional information for postcss errors (#6282) (#6352)
* Add additional information for postcss errors

* Add additional information for postcss errors (simplify)

* Remove chunkname from postCSS compile error

* Remove line number from postCSS compile error
2019-10-23 15:26:48 -06:00
Brody McKee
2da645c534 feat: add additional Jest keys to whitelist (#7832) 2019-10-16 20:07:13 +03:00
Ian Schmitz
e51ea135e1 Temporarily disable Windows in CI (#7773) 2019-10-02 22:11:25 -07:00
Ashrith Reddy
6b8fa00e09 Use installing package manager in README (#7687) 2019-10-02 11:23:22 +03:00
Robert van Steen
7e2b6b16df Support setting baseUrl to root directory (#7755) 2019-10-02 10:48:34 +03:00
Kyle Bebak
71946b1eba Add TSC_COMPILE_ON_ERROR setting (#6931) 2019-10-01 11:09:09 +03:00
Kent C. Dodds
9678bbb4bf Support configuring coveragePathIgnorePatterns (#7080) 2019-08-08 15:13:45 -06:00
Igor Muchychka
ae671dc9fe Specify roots in Jest config (#7480) 2019-08-06 20:42:57 -07:00
Darius Tall
30fc0bf5ed Suggest jsx: "react" in tsconfig (#7472) 2019-08-03 17:21:51 -07:00
Brody McKee
404af90d9a Add ESLint 6 support (#7415) 2019-07-28 15:05:54 +03:00
Brody McKee
cbad256a4a Add explicit check for --watchAll=false (#7433)
Resolves #7180.
2019-07-26 12:26:57 -06:00
Brody McKee
3495286f8f Allow extending config used in eslint-loader (#7036) 2019-07-16 12:17:52 +03:00
Brian Muenzenmeyer
4c0d8b64aa fix(eject): guard against empty key before access (#7289)
closes #7288
2019-07-02 20:44:03 -04:00
James Friedman
e2f43a06a6 Allow additional Jest config keys (#6055) 2019-05-12 14:30:58 +03:00
Ian Schmitz
4397d069d9 Disable default-case lint rule for TypeScript (#6937) 2019-05-03 13:22:09 -07:00
Jack Zhao
200b98b81a Remove no-watch flag in favor of watchAll=false (#6848) 2019-04-19 09:35:46 +03:00
Luiz Felipe Gonçalves
022b98418e Change Create React App version in react-scripts eject warning (#6845)
* fix: change CRA version in eject warning

* Update eject.js
2019-04-18 21:30:41 -06:00
Ian Schmitz
f5b0aac411 Relax ESLint version range (#6840)
* Relax eslint version range

* Use semver package to compare versions during preflight check

* Cleanup package.json files whitespace
2019-04-17 19:46:47 -07:00
Robert van Steen
e7a2d6168a Set baseUrl from jsconfig.json/tsconfig.json (#6656)
* Set baseUrl from jsconfig.json/tsconfig.json

* Resolve the path for loading modules

* Add tests for jsconfig.json

* Add jsconfig.json

* Update packages/react-scripts/scripts/start.js

* Move baseUrl test to config folder

* Remove alias test

* Use chalk from react-dev-utils

* Add lost absolute file for typescript baseUrl test

* Update packages/react-scripts/config/modules.js

* Update other references of useTypeScript to hasTsConfig

* Fix casing of TypeScript

* Keep respecting NODE_PATH for now to support multiple module paths.

* Add test for NODE_PATH

* Add fallback if NODE_PATH is not set.

* Fix node path behavior tests

* Remove debugging code from behavior test suite

* Remove more debugging code

* Show NODE_PATH deprecation warning during build


Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
Co-authored-by: Brody McKee <mrmckeb@users.noreply.github.com>
Co-authored-by: Jack Zhao <jzhao@fb.com>
2019-04-16 15:08:24 -06:00
Nathan Brown
207d9315b1 Update testMatch to also be compatible with Jest 24 (#6313) 2019-04-15 20:44:56 -07:00
Raphael.dev
dac046df1f Fix code comment typo (#6775) 2019-04-08 19:57:02 -07:00
Mateusz Burzyński
42640dfce1 Only suggest that tsconfig.json is incorrect when SyntaxError is caught (#6160)
Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
2019-04-04 15:18:15 -06:00
Ian Schmitz
76fea02277 Cleanup Jest config (#6654)
General cleanup after the [Jest 24 PR](#6278). 

This also includes `jsdom@14` via https://www.npmjs.com/package/jest-environment-jsdom-fourteen. Since we have a node >= 8.10 requirement, we are able to use the latest version of `jsdom` which includes additional implementations of browser APIs such as `MutationObserver` (which we had an issue filed for over at #6617).

/cc @SimenB. Is there more you recommend we do to cleanup our [Jest config](b0cbf2caa1/packages/react-scripts/scripts/utils/createJestConfig.js) for TypeScript?

Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
2019-04-04 11:00:00 -06:00
Cody Olsen
9514cb88ab Remove --coverage + --watch workaround (#4176) 2019-04-02 10:49:36 -07:00
Jack Zhao
4734d4ef21 Merge branch 'master' into master 2019-03-18 17:50:52 -07:00
Lorenzo Rapetti
3be3576304 Update to Jest 24 (#6278)
* Update to jest 24

* Add notice about pnpResolver.js

* Formatting

* Fix linting

* Update to jest 24.1.0

* Update jest-pnp-resolver

* Swap create-react-app params in e2e scripts

* Add extraGlobals to supportedKeys

* Bump jest to 24.3.1

* Bump jest to 24.4.0

* Bumb jest to 24.5.0

* Update template dependencies jest to 24.5.0

* Debug failing test

* Remove jest-pnp-resolver

* Remove console.log

* Revert yarn.lock.cached
2019-03-15 12:02:59 -06:00
Salvador Hernandez
dc133a351f Stage files for commit after ejecting (#5960)
* add command to add files to staging after eject

* update console.log message

* wrap git add in a try/catch block

* return true & update log message

* add test to check if files were staged

* Fix check for staged files
2019-03-11 22:06:37 -06:00
Ian Schmitz
3c9c21a285 Upgrade dependencies (#6614)
* Upgrade dependencies

* Upgrade a couple missed deps

* Run Prettier over codebase
2019-03-11 20:45:14 -06:00
Jannis Hell
5b77280dad Make compiler variable const instead of let (#6621)
compiler is not being reassigned, so we can use a const here
2019-03-11 12:42:20 -07:00
Mike Beaton
ed86da9ed3 Convert JSON.stringify \n to os.EOL when writing tsconfig.json (#6610) 2019-03-11 08:47:16 -07:00
Ian Sutherland
1548a0a92e Reapply "Speed up TypeScript v2 (#6406)" (#6586)
This reverts commit b2cf28b7f1 and reapplies #6406.
2019-03-06 17:46:38 -07:00
Ian Sutherland
b2cf28b7f1 Revert "Speed up TypeScript v2 (#6406)" (#6585)
This reverts commit 6a5b3cdaaa.
2019-03-06 17:33:17 -07:00
Jack Zhao
4a4d2eff4e remove argv 2019-02-21 14:39:01 -08:00
Jack Zhao
140e182e7d remove stats json 2019-02-21 14:35:34 -08:00
Jack Zhao
e7a427ad16 remove webpack-bundle-analyzer 2019-02-20 23:21:35 -08:00
Leigh Halliday
d57fd37d2d Convert all bit.ly links from http to https (#6239) 2019-02-19 09:25:19 -07:00
Ian Schmitz
6a5b3cdaaa Speed up TypeScript v2 (#6406)
* Revert "Revert "Speed up TypeScript projects (#5903)""

This reverts commit 544a5943ce.

* Move fork-ts-checker dep to react-dev-utils

* Convert WebpackDevServerUtils.createCompiler to take in options arg

* Update README.md for react-dev-utils
2019-02-18 16:31:44 -08:00
Aaron Reisman
df3e73f454 Exclude .d.ts files from TypeScript glob 2019-02-17 10:17:49 +02:00
Ian Schmitz
544a5943ce Revert "Speed up TypeScript projects (#5903)"
This reverts commit 5ce09db2b3.
2019-02-11 08:10:33 -08:00
Dan Abramov
782d71b957 Add Jest typeahead plugin (#5213)
* Add Jest typeahead plugin

* Update jest-watch-typeahead to 0.2.1
2019-02-10 08:13:27 -08:00
Tomáš Szabo
5ce09db2b3 Speed up TypeScript projects (#5903)
As a lot of [people](https://hackernoon.com/why-i-no-longer-use-typescript-with-react-and-why-you-shouldnt-either-e744d27452b4) is complaining about TypeScript performance in CRA, I decided to enable `async` mode in TypeScript checker.

These changes basically brings the JS compilation times to TS projects. So, recompilation took less than 1 second instead of 3 seconds in medium size project.

The problem with async mode is that type-errors are reported after Webpack ends up recompilation as TypeScript could be slower than Babel. PR allows to emit files compiled by Babel immediately and then wait for TS and show type errors in terminal later. Also, if there was no compilation errors and any type error occurs, we trigger a hot-reload with new errors to show error overlay in browser.

Also, I wanted to start a discussion about `skipLibCheck: false` option in default `tsconfig.json`. This makes recompilations really slow and we should consider to set it to `true` or at least give users a big warning to let them know that it could be really slow.

The following video is showing the updated workflow with a forced 2.5 second delay for type-check to give you an idea how it works.

![nov-26-2018 15-47-01](https://user-images.githubusercontent.com/5549148/49021284-9446fe80-f192-11e8-952b-8f83d77d5fbc.gif)


I'm pretty sure that PR needs some polishing and improvements but it should works as it is. Especially a "hack" with reloading the browser after type-check looks ugly to me.

cc @brunolemos as he is an initiator of an original TypeScript PR.

Should fix https://github.com/facebook/create-react-app/issues/5820
2019-02-07 19:34:52 -08:00
Rico Kahler
af339ec343 Add '--no-watch' flag for tests (#6285) 2019-02-01 17:49:52 +02:00
Matthew Holloway
fd382772a1 Ignore node_modules in verifyNoTypeScript (#6022) 2019-01-14 13:54:46 +02:00
Otávio Pace
47e9e2c7a0 Move chalk dependency to react-dev-utils (#6150)
Related to #751
2019-01-12 13:55:57 +02:00
Stephen Algeo
433d0be3b1 Improve error messaging in verifyPackageTree.js (#5974) 2018-12-06 13:39:01 +02:00
Joe Haddad
c50a7ea7de Suggest a different default for speed reasons (#5959)
Advanced users can opt into this behavior, but it's generally outside the users' control to fix and comes with performance concerns
2018-12-04 10:58:48 -05:00
Ian Sutherland
88f2b0bcfc Add pre-eject message about new features in v2 (#5954)
* Add pre-eject message about new features in v2

* Make message bold
2018-12-03 21:54:56 -05:00
Ian Schmitz
49e258b4a6 Support setupTests.ts (#5698) 2018-11-22 21:14:25 -08:00
Joe Haddad
30ee52cf3b Merge webpack configuration (#5722)
* Rename production configuration

* Upgrade lint staged

* Merge mode, bail, devtool, and entry

* Merge output settings

* Remove old comment

* Merge some trivial differences

* Disable minimize in development mode

* Only minify html and generate SW in production

* Adjust comment

* Toggle development plugins

* Add missing imports

* Scope settings

* Delete development config

* Use new config file

* Remove unnecessary config import
2018-11-07 22:11:20 -05:00