File tree 5 files changed +35
-0
lines changed
packages/react-scripts/scripts
5 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 13
13
// Do this as the first thing so that any code reading it knows the right env.
14
14
process . env . NODE_ENV = 'production' ;
15
15
16
+ // Makes the script crash on unhandled rejections instead of silently
17
+ // ignoring them. In the future, promise rejections that are not handled will
18
+ // terminate the Node.js process with a non-zero exit code.
19
+ process . on ( 'unhandledRejection' , err => {
20
+ throw err ;
21
+ } ) ;
22
+
16
23
// Load environment variables from .env file. Suppress warnings using silent
17
24
// if this file is missing. dotenv will never modify any environment variables
18
25
// that have already been set.
Original file line number Diff line number Diff line change 9
9
*/
10
10
'use strict' ;
11
11
12
+ // Makes the script crash on unhandled rejections instead of silently
13
+ // ignoring them. In the future, promise rejections that are not handled will
14
+ // terminate the Node.js process with a non-zero exit code.
15
+ process . on ( 'unhandledRejection' , err => {
16
+ throw err ;
17
+ } ) ;
18
+
12
19
const fs = require ( 'fs-extra' ) ;
13
20
const path = require ( 'path' ) ;
14
21
const spawnSync = require ( 'cross-spawn' ) . sync ;
Original file line number Diff line number Diff line change 9
9
*/
10
10
'use strict' ;
11
11
12
+ // Makes the script crash on unhandled rejections instead of silently
13
+ // ignoring them. In the future, promise rejections that are not handled will
14
+ // terminate the Node.js process with a non-zero exit code.
15
+ process . on ( 'unhandledRejection' , err => {
16
+ throw err ;
17
+ } ) ;
18
+
12
19
const fs = require ( 'fs-extra' ) ;
13
20
const path = require ( 'path' ) ;
14
21
const spawn = require ( 'cross-spawn' ) ;
Original file line number Diff line number Diff line change 10
10
// @remove -on-eject-end
11
11
'use strict' ;
12
12
13
+ // Makes the script crash on unhandled rejections instead of silently
14
+ // ignoring them. In the future, promise rejections that are not handled will
15
+ // terminate the Node.js process with a non-zero exit code.
16
+ process . on ( 'unhandledRejection' , err => {
17
+ throw err ;
18
+ } ) ;
19
+
13
20
process . env . NODE_ENV = 'development' ;
14
21
15
22
// Load environment variables from .env file. Suppress warnings using silent
Original file line number Diff line number Diff line change 13
13
process . env . NODE_ENV = 'test' ;
14
14
process . env . PUBLIC_URL = '' ;
15
15
16
+ // Makes the script crash on unhandled rejections instead of silently
17
+ // ignoring them. In the future, promise rejections that are not handled will
18
+ // terminate the Node.js process with a non-zero exit code.
19
+ process . on ( 'unhandledRejection' , err => {
20
+ throw err ;
21
+ } ) ;
22
+
16
23
// Load environment variables from .env file. Suppress warnings using silent
17
24
// if this file is missing. dotenv will never modify any environment variables
18
25
// that have already been set.
You can’t perform that action at this time.
0 commit comments