From 17cc27bfeffaccb4f0ab594f5d8085b421e1ac74 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Fri, 16 Mar 2018 16:43:51 -0700 Subject: [PATCH] Fix CI for node < 8 Summary: Thanks alloy for noticing that https://github.com/facebook/relay/commit/0d24a725c7ad5e2414e755c5ab47850fb85b824c broke CI. The reason is that node < 8 does not support trailing commas for function calls which prettier adds in our configuration. This should fix it. Closes https://github.com/facebook/relay/pull/2373 Differential Revision: D7311796 Pulled By: kassens fbshipit-source-id: fcc7a172917d398e8022d3bb6f5f5f1a90f20e0d --- scripts/jest/preprocessor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/jest/preprocessor.js b/scripts/jest/preprocessor.js index 7ee8610528255..7333def199173 100644 --- a/scripts/jest/preprocessor.js +++ b/scripts/jest/preprocessor.js @@ -61,9 +61,11 @@ module.exports = { getCacheKey: createCacheKeyFunction([ __filename, testSchemaPath, + // We cannot have trailing commas in this file for node < 8 + // prettier-ignore path.join( path.dirname(require.resolve('babel-preset-fbjs')), - 'package.json', + 'package.json' ), path.join(__dirname, '..', 'getBabelOptions.js'), ]),