From cb1f38663c0d5227a2a7d8f82e48368e1ad99cdf Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 26 Nov 2020 14:49:16 +0100 Subject: [PATCH 1/3] feat(cli-repl): upgrade Node.js to v14.x MONGOSH-438 --- .evergreen.yml | 203 +++++++++++++++++--- .evergreen/.install_node | 1 - .evergreen/.setup_env | 1 - .evergreen/InstallNode.ps1 | 2 +- .evergreen/SetupEnv.ps1 | 3 +- CONTRIBUTING.md | 10 + packages/cli-repl/package.json | 2 +- packages/cli-repl/src/cli-repl.spec.ts | 4 + packages/cli-repl/src/cli-repl.ts | 3 + packages/mongosh/package.json | 2 +- scripts/docker/ubuntu16.04-build.Dockerfile | 4 +- scripts/generate-homebrew-formula.js | 8 +- 12 files changed, 202 insertions(+), 41 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 58122f0755..d1ad193d56 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -14,6 +14,7 @@ variables: cat < ~/release_mongosh.sh set -e cd $(pwd) + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" export EVERGREEN_EXPANSIONS_PATH="$(pwd)/../tmp/expansions.yaml" @@ -43,6 +44,7 @@ variables: bash ~/release_mongosh.sh fi + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh" echo "$MONGOSH_TEST_EXECUTABLE_PATH" @@ -55,6 +57,7 @@ variables: shell: bash script: | set -e + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env export EVERGREEN_EXPANSIONS_PATH="$(pwd)/../tmp/expansions.yaml" node scripts/download-linux-artifact @@ -69,6 +72,7 @@ variables: working_dir: src shell: powershell script: | + $Env:NODE_JS_VERSION = "${node_js_version}" $ErrorActionPreference = "Stop" .\.evergreen\SetupEnv node --version @@ -106,6 +110,7 @@ functions: working_dir: src shell: bash script: | + export NODE_JS_VERSION=${node_js_version} source .evergreen/.install_node install_win: - command: shell.exec @@ -113,6 +118,7 @@ functions: working_dir: src shell: powershell script: | + $Env:NODE_JS_VERSION = "${node_js_version}" .\.evergreen\InstallNode check: - command: shell.exec @@ -120,6 +126,7 @@ functions: working_dir: src shell: bash script: | + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env npm run check-ci check_win: @@ -128,6 +135,7 @@ functions: working_dir: src shell: powershell script: | + $Env:NODE_JS_VERSION = "${node_js_version}" .\.evergreen\SetupEnv npm run check-ci test: @@ -141,6 +149,7 @@ functions: shell: bash script: | set -e + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env export EVERGREEN_EXPANSIONS_PATH="$(pwd)/../tmp/expansions.yaml" npm run test-ci @@ -155,6 +164,7 @@ functions: shell: powershell script: | $ErrorActionPreference = "Stop" + $Env:NODE_JS_VERSION = "${node_js_version}" .\.evergreen\SetupEnv $Env:EVERGREEN_EXPANSIONS_PATH = $(Join-Path -Path '..' -ChildPath 'tmp/expansions.yaml' -Resolve) npm run test-ci @@ -166,9 +176,7 @@ functions: script: | set -e (cd scripts/docker && docker build -t ubuntu18.04-xvfb -f ubuntu18.04-xvfb.Dockerfile .) - docker run -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD \ - -e NODE_JS_VERSION \ - -e BUILD_VARIANT \ + docker run \ --rm -v $PWD:/tmp/build ubuntu18.04-xvfb \ -c 'cd /tmp/build && ./testing/test-vscode.sh' compile_and_upload_artifact: @@ -200,6 +208,7 @@ functions: shell: bash script: | set -e + export NODE_JS_VERSION=${node_js_version} source .evergreen/.setup_env export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" export EVERGREEN_EXPANSIONS_PATH="$(pwd)/../tmp/expansions.yaml" @@ -220,96 +229,217 @@ tasks: commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: check + vars: + node_js_version: "14.15.1" - name: check_win commands: - func: checkout - func: install_win + vars: + node_js_version: "14.15.1" - func: check_win - - name: test_m40x + vars: + node_js_version: "14.15.1" + - name: test_m40x_n12 + commands: + - func: checkout + - func: install + vars: + node_js_version: "12.20.0" + - func: test + vars: + mongosh_server_test_version: "4.0.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m42x_n12 + commands: + - func: checkout + - func: install + vars: + node_js_version: "12.20.0" + - func: test + vars: + mongosh_server_test_version: "4.2.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m44x_n12 + commands: + - func: checkout + - func: install + vars: + node_js_version: "12.20.0" + - func: test + vars: + mongosh_server_test_version: "4.4.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m40x_n12_win + commands: + - func: checkout + - func: install_win + vars: + node_js_version: "12.20.0" + - func: test_win + vars: + mongosh_server_test_version: "4.0.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m42x_n12_win + commands: + - func: checkout + - func: install_win + vars: + node_js_version: "12.20.0" + - func: test_win + vars: + mongosh_server_test_version: "4.2.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m44x_n12_win + commands: + - func: checkout + - func: install_win + vars: + node_js_version: "12.20.0" + - func: test_win + vars: + mongosh_server_test_version: "4.4.x" + node_js_version: "12.20.0" + mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + - name: test_m40x_n14 commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: test vars: mongosh_server_test_version: "4.0.x" - - name: test_m42x + node_js_version: "14.15.1" + - name: test_m42x_n14 commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: test vars: mongosh_server_test_version: "4.2.x" - - name: test_m44x + node_js_version: "14.15.1" + - name: test_m44x_n14 commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: test vars: mongosh_server_test_version: "4.4.x" - - name: test_m40x_win + node_js_version: "14.15.1" + - name: test_m40x_n14_win commands: - func: checkout - func: install_win + vars: + node_js_version: "14.15.1" - func: test_win vars: mongosh_server_test_version: "4.0.x" - - name: test_m42x_win + node_js_version: "14.15.1" + - name: test_m42x_n14_win commands: - func: checkout - func: install_win + vars: + node_js_version: "14.15.1" - func: test_win vars: mongosh_server_test_version: "4.2.x" - - name: test_m44x_win + node_js_version: "14.15.1" + - name: test_m44x_n14_win commands: - func: checkout - func: install_win + vars: + node_js_version: "14.15.1" - func: test_win vars: mongosh_server_test_version: "4.4.x" + node_js_version: "14.15.1" - name: test_vscode commands: - func: checkout - func: install + vars: + node_js_version: "12.20.0" - func: test_vscode - name: compile_and_upload_artifact_macos depends_on: - name: check variant: darwin - - name: test_m40x + - name: test_m40x_n12 + variant: darwin + - name: test_m42x_n12 + variant: darwin + - name: test_m44x_n12 + variant: darwin + - name: test_m40x_n14 variant: darwin - - name: test_m42x + - name: test_m42x_n14 variant: darwin - - name: test_m44x + - name: test_m44x_n14 variant: darwin commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: compile_and_upload_artifact + vars: + node_js_version: "14.15.1" - name: compile_and_upload_artifact_linux depends_on: - name: check - - name: test_m40x + - name: test_m40x_n12 + variant: linux + - name: test_m42x_n12 + variant: linux + - name: test_m44x_n12 variant: linux - - name: test_m42x + - name: test_m40x_n14 variant: linux - - name: test_m44x + - name: test_m42x_n14 + variant: linux + - name: test_m44x_n14 variant: linux commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: compile_and_upload_artifact + vars: + node_js_version: "14.15.1" - name: compile_and_upload_artifact_win depends_on: - name: check_win - - name: test_m40x_win - - name: test_m42x_win - - name: test_m44x_win + - name: test_m40x_n12_win + - name: test_m42x_n12_win + - name: test_m44x_n12_win + - name: test_m40x_n14_win + - name: test_m42x_n14_win + - name: test_m44x_n14_win commands: - func: checkout - func: install_win + vars: + node_js_version: "14.15.1" - func: compile_and_upload_artifact_win + vars: + node_js_version: "14.15.1" - name: test_linux_artifact depends_on: - name: compile_and_upload_artifact_linux @@ -317,7 +447,11 @@ tasks: commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: test_linux_artifact + vars: + node_js_version: "14.15.1" - name: release_publish depends_on: - name: compile_and_upload_artifact_win @@ -335,7 +469,11 @@ tasks: commands: - func: checkout - func: install + vars: + node_js_version: "14.15.1" - func: release_publish + vars: + node_js_version: "14.15.1" # Need to run builds for every possible build variant. buildvariants: @@ -349,17 +487,23 @@ buildvariants: run_on: macos-1014 tasks: - name: check - - name: test_m40x - - name: test_m42x - - name: test_m44x + - name: test_m40x_n12 + - name: test_m42x_n12 + - name: test_m44x_n12 + - name: test_m40x_n14 + - name: test_m42x_n14 + - name: test_m44x_n14 - name: linux display_name: "Ubuntu 18.04" run_on: ubuntu1804-test tasks: - name: check - - name: test_m40x - - name: test_m42x - - name: test_m44x + - name: test_m40x_n12 + - name: test_m42x_n12 + - name: test_m44x_n12 + - name: test_m40x_n14 + - name: test_m42x_n14 + - name: test_m44x_n14 - name: test_vscode - name: compile_and_upload_artifact_linux - name: rhel @@ -369,7 +513,7 @@ buildvariants: - name: check - name: compile_and_upload_artifact_linux - name: debian - display_name: "Ununtu 18.04 (deb target)" + display_name: "Ubuntu 18.04 (deb target)" run_on: ubuntu1804-test tasks: - name: check @@ -389,9 +533,12 @@ buildvariants: run_on: windows-64-vs2019-test tasks: - name: check_win - - name: test_m40x_win - - name: test_m42x_win - - name: test_m44x_win + - name: test_m40x_n12_win + - name: test_m42x_n12_win + - name: test_m44x_n12_win + - name: test_m40x_n14_win + - name: test_m42x_n14_win + - name: test_m44x_n14_win - name: compile_and_upload_artifact_win - name: darwin_release_publish display_name: "Publish Release" diff --git a/.evergreen/.install_node b/.evergreen/.install_node index 4c3984aabd..e331c3b94d 100644 --- a/.evergreen/.install_node +++ b/.evergreen/.install_node @@ -1,5 +1,4 @@ set -e -export NODE_JS_VERSION='12.18.4' export NVM_DIR="$HOME/.nvm" curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash diff --git a/.evergreen/.setup_env b/.evergreen/.setup_env index 876e281937..89a193e284 100755 --- a/.evergreen/.setup_env +++ b/.evergreen/.setup_env @@ -1,5 +1,4 @@ set -e -export NODE_JS_VERSION='12.18.4' export NVM_DIR="$HOME/.nvm" echo "Setting NVM environment home: $NVM_DIR" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/.evergreen/InstallNode.ps1 b/.evergreen/InstallNode.ps1 index a001fd7cbd..9095e47292 100644 --- a/.evergreen/InstallNode.ps1 +++ b/.evergreen/InstallNode.ps1 @@ -1,4 +1,4 @@ -$version = "12.18.4" +$version = "$Env:NODE_JS_VERSION" $url = "https://nodejs.org/download/release/v$version/node-v$version-win-x64.zip" $filename = "node.zip" $node_zip = "$PSScriptRoot\$filename" diff --git a/.evergreen/SetupEnv.ps1 b/.evergreen/SetupEnv.ps1 index 7ce68687bf..fcaae77a6c 100644 --- a/.evergreen/SetupEnv.ps1 +++ b/.evergreen/SetupEnv.ps1 @@ -1,6 +1,5 @@ -$version = "12.18.4" +$version = "$Env:NODE_JS_VERSION" $Env:PATH = "$PSScriptRoot\node-v$version-win-x64;C:\Python39\Scripts;C:\Python39;C:\Program Files\Git\mingw32\libexec\git-core;$Env:PATH" -$Env:NODE_JS_VERSION = "$version" echo "Using node version:" node --version diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d23802842..6510e3bb15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,3 +18,13 @@ MongoDB welcomes community contributions! If you’re interested in making a con You can report new bugs by [creating a new issue](https://jira.mongodb.org/browse/MONGOSH/). Please include as much information as possible about your environment. + +## Node.js versions + +We support Node.js 12.x+ for the individual packages, and Node.js 14.x only for +the CLI repl specifically. These versions are mentioned: + +- In the individual packages’ package.json files +- In the evergreen config +- In the homebrew generation script +- In the Docker files we use for building the binary/testing vscode diff --git a/packages/cli-repl/package.json b/packages/cli-repl/package.json index 45b6eefd49..2c09106167 100644 --- a/packages/cli-repl/package.json +++ b/packages/cli-repl/package.json @@ -32,7 +32,7 @@ "access": "public" }, "engines": { - "node": ">=12.4.0" + "node": ">=14.15.0" }, "dependencies": { "@mongosh/autocomplete": "^0.5.2", diff --git a/packages/cli-repl/src/cli-repl.spec.ts b/packages/cli-repl/src/cli-repl.spec.ts index 789d861af6..e3275b049a 100644 --- a/packages/cli-repl/src/cli-repl.spec.ts +++ b/packages/cli-repl/src/cli-repl.spec.ts @@ -108,8 +108,11 @@ describe('CliRepl', () => { }); it('verifies the Node.js version', async() => { + const origVersionCheckEnvVar = process.env.MONGOSH_SKIP_VERSION_CHECK; + delete process.env.MONGOSH_SKIP_VERSION_CHECK; delete (process as any).version; process.version = 'v8.0.0'; + try { cliRepl = new CliRepl(cliReplOptions); const onerror = once(cliRepl.bus, 'mongosh:error'); @@ -119,6 +122,7 @@ describe('CliRepl', () => { await onerror; } finally { process.version = process.versions.node; + process.env.MONGOSH_SKIP_VERSION_CHECK = origVersionCheckEnvVar; } }); }); diff --git a/packages/cli-repl/src/cli-repl.ts b/packages/cli-repl/src/cli-repl.ts index 35aba31960..67a100dc7e 100644 --- a/packages/cli-repl/src/cli-repl.ts +++ b/packages/cli-repl/src/cli-repl.ts @@ -142,6 +142,9 @@ class CliRepl { } verifyNodeVersion(): void { + if (process.env.MONGOSH_SKIP_VERSION_CHECK === 'i-will-not-complain-if-mongosh-does-not-work') { + return; + } const { engines } = require('../package.json'); // Strip -rc.0, -pre, etc. from the Node.js version because semver rejects those otherwise. const baseNodeVersion = process.version.replace(/-.*$/, ''); diff --git a/packages/mongosh/package.json b/packages/mongosh/package.json index 92fdbea464..1c5c0ddc3b 100644 --- a/packages/mongosh/package.json +++ b/packages/mongosh/package.json @@ -34,6 +34,6 @@ "access": "public" }, "engines": { - "node": ">=12.4.0" + "node": ">=14.15.0" } } diff --git a/scripts/docker/ubuntu16.04-build.Dockerfile b/scripts/docker/ubuntu16.04-build.Dockerfile index 433cdd367b..91b8548a36 100644 --- a/scripts/docker/ubuntu16.04-build.Dockerfile +++ b/scripts/docker/ubuntu16.04-build.Dockerfile @@ -5,8 +5,8 @@ RUN apt-get -y -qq install build-essential python2.7 curl apt-transport-https ca # Add Node.js RUN curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - -RUN echo "deb https://deb.nodesource.com/node_12.x xenial main" | tee /etc/apt/sources.list.d/nodesource.list -RUN echo "deb-src https://deb.nodesource.com/node_12.x xenial main" | tee -a /etc/apt/sources.list.d/nodesource.list +RUN echo "deb https://deb.nodesource.com/node_14.x xenial main" | tee /etc/apt/sources.list.d/nodesource.list +RUN echo "deb-src https://deb.nodesource.com/node_14.x xenial main" | tee -a /etc/apt/sources.list.d/nodesource.list # Add sufficiently recent compiler toolchain RUN add-apt-repository ppa:ubuntu-toolchain-r/test diff --git a/scripts/generate-homebrew-formula.js b/scripts/generate-homebrew-formula.js index 54925adb63..3946304db4 100644 --- a/scripts/generate-homebrew-formula.js +++ b/scripts/generate-homebrew-formula.js @@ -31,11 +31,11 @@ class Mongosh < Formula # curl -s https://registry.npmjs.org/@mongosh/cli-repl/-/cli-repl-${context.version}.tgz | shasum -a 256 sha256 "${context.sha}" - depends_on "node@12" + depends_on "node@14" def install - system "#{Formula["node@12"].bin}/npm", "install", *Language::Node.std_npm_install_args(libexec) - (bin/"mongosh").write_env_script libexec/"bin/mongosh", :PATH => "#{Formula["node@12"].opt_bin}:$PATH" + system "#{Formula["node@14"].bin}/npm", "install", *Language::Node.std_npm_install_args(libexec) + (bin/"mongosh").write_env_script libexec/"bin/mongosh", :PATH => "#{Formula["node@14"].opt_bin}:$PATH" end test do @@ -96,4 +96,4 @@ if (require.main === module) { ); } else { module.exports = generateHomebrewFormula; -} \ No newline at end of file +} From 8a115af7a8efee9250cd43e727007f9eb24e8674 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 27 Nov 2020 13:36:16 +0100 Subject: [PATCH 2/3] fixup! feat(cli-repl): upgrade Node.js to v14.x MONGOSH-438 --- .evergreen.yml | 12 ++++++------ packages/cli-repl/src/cli-repl.spec.ts | 6 +++--- packages/cli-repl/src/cli-repl.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index d1ad193d56..5c4fb1946b 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -253,7 +253,7 @@ tasks: vars: mongosh_server_test_version: "4.0.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m42x_n12 commands: - func: checkout @@ -264,7 +264,7 @@ tasks: vars: mongosh_server_test_version: "4.2.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m44x_n12 commands: - func: checkout @@ -275,7 +275,7 @@ tasks: vars: mongosh_server_test_version: "4.4.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m40x_n12_win commands: - func: checkout @@ -286,7 +286,7 @@ tasks: vars: mongosh_server_test_version: "4.0.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m42x_n12_win commands: - func: checkout @@ -297,7 +297,7 @@ tasks: vars: mongosh_server_test_version: "4.2.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m44x_n12_win commands: - func: checkout @@ -308,7 +308,7 @@ tasks: vars: mongosh_server_test_version: "4.4.x" node_js_version: "12.20.0" - mongosh_skip_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" - name: test_m40x_n14 commands: - func: checkout diff --git a/packages/cli-repl/src/cli-repl.spec.ts b/packages/cli-repl/src/cli-repl.spec.ts index e3275b049a..878ef6559b 100644 --- a/packages/cli-repl/src/cli-repl.spec.ts +++ b/packages/cli-repl/src/cli-repl.spec.ts @@ -108,8 +108,8 @@ describe('CliRepl', () => { }); it('verifies the Node.js version', async() => { - const origVersionCheckEnvVar = process.env.MONGOSH_SKIP_VERSION_CHECK; - delete process.env.MONGOSH_SKIP_VERSION_CHECK; + const origVersionCheckEnvVar = process.env.MONGOSH_SKIP_NODE_VERSION_CHECK; + delete process.env.MONGOSH_SKIP_NODE_VERSION_CHECK; delete (process as any).version; process.version = 'v8.0.0'; @@ -122,7 +122,7 @@ describe('CliRepl', () => { await onerror; } finally { process.version = process.versions.node; - process.env.MONGOSH_SKIP_VERSION_CHECK = origVersionCheckEnvVar; + process.env.MONGOSH_SKIP_NODE_VERSION_CHECK = origVersionCheckEnvVar; } }); }); diff --git a/packages/cli-repl/src/cli-repl.ts b/packages/cli-repl/src/cli-repl.ts index 67a100dc7e..125063c6ce 100644 --- a/packages/cli-repl/src/cli-repl.ts +++ b/packages/cli-repl/src/cli-repl.ts @@ -142,7 +142,7 @@ class CliRepl { } verifyNodeVersion(): void { - if (process.env.MONGOSH_SKIP_VERSION_CHECK === 'i-will-not-complain-if-mongosh-does-not-work') { + if (process.env.MONGOSH_SKIP_NODE_VERSION_CHECK === 'i-will-not-complain-if-mongosh-does-not-work') { return; } const { engines } = require('../package.json'); From 364309c4a1db9d81fe2a1343faae3ed4b4e24a98 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 27 Nov 2020 14:08:39 +0100 Subject: [PATCH 3/3] fixup! fixup! feat(cli-repl): upgrade Node.js to v14.x MONGOSH-438 --- .evergreen.yml | 12 ++++++------ packages/cli-repl/src/cli-repl.spec.ts | 2 +- packages/cli-repl/src/cli-repl.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 5c4fb1946b..c9a3a7704d 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -253,7 +253,7 @@ tasks: vars: mongosh_server_test_version: "4.0.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m42x_n12 commands: - func: checkout @@ -264,7 +264,7 @@ tasks: vars: mongosh_server_test_version: "4.2.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m44x_n12 commands: - func: checkout @@ -275,7 +275,7 @@ tasks: vars: mongosh_server_test_version: "4.4.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m40x_n12_win commands: - func: checkout @@ -286,7 +286,7 @@ tasks: vars: mongosh_server_test_version: "4.0.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m42x_n12_win commands: - func: checkout @@ -297,7 +297,7 @@ tasks: vars: mongosh_server_test_version: "4.2.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m44x_n12_win commands: - func: checkout @@ -308,7 +308,7 @@ tasks: vars: mongosh_server_test_version: "4.4.x" node_js_version: "12.20.0" - mongosh_skip_node_version_check: "i-will-not-complain-if-mongosh-does-not-work" + mongosh_skip_node_version_check: "1" - name: test_m40x_n14 commands: - func: checkout diff --git a/packages/cli-repl/src/cli-repl.spec.ts b/packages/cli-repl/src/cli-repl.spec.ts index 878ef6559b..b876a873ad 100644 --- a/packages/cli-repl/src/cli-repl.spec.ts +++ b/packages/cli-repl/src/cli-repl.spec.ts @@ -122,7 +122,7 @@ describe('CliRepl', () => { await onerror; } finally { process.version = process.versions.node; - process.env.MONGOSH_SKIP_NODE_VERSION_CHECK = origVersionCheckEnvVar; + process.env.MONGOSH_SKIP_NODE_VERSION_CHECK = origVersionCheckEnvVar || ''; } }); }); diff --git a/packages/cli-repl/src/cli-repl.ts b/packages/cli-repl/src/cli-repl.ts index 125063c6ce..d20d365f52 100644 --- a/packages/cli-repl/src/cli-repl.ts +++ b/packages/cli-repl/src/cli-repl.ts @@ -142,7 +142,7 @@ class CliRepl { } verifyNodeVersion(): void { - if (process.env.MONGOSH_SKIP_NODE_VERSION_CHECK === 'i-will-not-complain-if-mongosh-does-not-work') { + if (process.env.MONGOSH_SKIP_NODE_VERSION_CHECK) { return; } const { engines } = require('../package.json');