From 098e253188d8caa706da08350483468d60f0c049 Mon Sep 17 00:00:00 2001 From: Goran Gligorin Date: Wed, 17 Apr 2019 01:25:49 +0200 Subject: [PATCH] Update Node version warning message for emulator (#315) --- bin/emulator | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/emulator b/bin/emulator index b1bd86d..bc8ad15 100755 --- a/bin/emulator +++ b/bin/emulator @@ -22,8 +22,9 @@ if (!semver.satisfies(process.version, '>= 6.11.5')) { process.exit(1); } -if (semver.satisfies(process.version, '>= 7.0.0')) { - console.log(`Warning: You're using Node.js ${process.version} but Google Cloud Functions emulator only supports v6.x.`); +if (semver.satisfies(process.version, '7.x.x') || semver.satisfies(process.version, '>= 9.0.0')) { + console.log(`Warning: You're using Node.js ${process.version} but the Google Cloud Functions runtime is only available in Node.js 6 and Node.js 8.` + + ` Therefore, results from running emulated functions may not match production behavior.`); } exports.emulator = require('../src/emulator');