From ba4d9035860fc23944c12b5e39d5da4ab4faf4bf Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 6 Nov 2018 16:06:26 +0200 Subject: [PATCH] chore(i18n): fix UCD extraction for Node 10.x Previously (e.g. Node.js 8.x), the 3rd argument to `fs.writeFile()` (i.e. the callback) could be undefined. On Node.js 10.x, this throws an error. This commit fixes it by switching to `fs.writeFileSync()` which seems to have been the original intention (based on the sorrounding code). --- i18n/ucd/src/extract.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/ucd/src/extract.js b/i18n/ucd/src/extract.js index ae8493fd2b74..bc6736597d77 100644 --- a/i18n/ucd/src/extract.js +++ b/i18n/ucd/src/extract.js @@ -20,7 +20,7 @@ function main() { } catch (e) { fs.mkdirSync(__dirname + '/../../../src/ngParseExt'); } - fs.writeFile(__dirname + '/../../../src/ngParseExt/ucd.js', code); + fs.writeFileSync(__dirname + '/../../../src/ngParseExt/ucd.js', code); } }