Skip to content

Commit e61176d

Browse files
Elias Toivanenfacebook-github-bot
Elias Toivanen
authored andcommittedAug 23, 2018
Bugfix: Check NodeJS version successfully even for old runtimes (Fixes #20769) (#20779)
Summary: Fixes #20769 Release notes -------------- [CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`. Pull Request resolved: #20779 Differential Revision: D9468346 Pulled By: hramos fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
1 parent 9a77ff5 commit e61176d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎local-cli/server/checkNodeVersion.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @format
7+
* Be mindful that this script may be run by legacy NodeJS runtimes. Keep this
8+
* script ES5 compatible (e.g. do not insert the `@format` pragma here which
9+
* may introduce non-ES5 compatible syntax.)
10+
*
811
*/
912

1013
'use strict';
@@ -36,7 +39,7 @@ module.exports = function() {
3639
marginLeft: 1,
3740
marginRight: 1,
3841
paddingBottom: 1,
39-
}),
42+
})
4043
);
4144
process.exit(1);
4245
}

0 commit comments

Comments
 (0)
Please sign in to comment.