Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ variables:
shell: powershell
script: |
.\.evergreen\SetupEnv
node --version
npm --version
$Env:PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "true"
$Env:EVERGREEN_EXPANSIONS_PATH = $(Join-Path -Path '..' -ChildPath 'tmp/expansions.yaml' -Resolve)
npm run release
Expand Down
48 changes: 17 additions & 31 deletions .evergreen/.install_node
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
export NODE_JS_VERSION='12.4.0'

if [[ $OSTYPE == "cygwin" ]]; then
echo "Installing nodejs v$NODE_JS_VERSION for windows..."
mkdir .deps
curl -fs \
-o ".deps/node-v$NODE_JS_VERSION-win-x64.zip" \
--url "https://nodejs.org/download/release/v$NODE_JS_VERSION/node-v$NODE_JS_VERSION-win-x64.zip"
cd .deps
unzip -q node-v$NODE_JS_VERSION-win-x64.zip
mv node-v$NODE_JS_VERSION-win-x64/* .
rm -rf node-v$NODE_JS_VERSION-win-x64
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"

echo "Installing npm@latest..."
rm -rf npm npx npm.cmd npx.cmd
mv node_modules/npm node_modules/npm2
chmod +x ./node.exe

./node.exe node_modules/npm2/bin/npm-cli.js i -g npm@latest
rm -rf node_modules/npm2/
chmod +x npm.cmd npm
cd ..
npm run bootstrap
else
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install $NODE_JS_VERSION
nvm alias default $NODE_JS_VERSION
npm install -g npm@latest
npm run bootstrap
fi
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

nvm install $NODE_JS_VERSION
nvm alias default $NODE_JS_VERSION
npm install -g npm@latest

echo "Using node version:"
node --version

echo "Using npm version:"
npm --version

npm run bootstrap-ci
17 changes: 9 additions & 8 deletions .evergreen/.setup_env
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
if [[ $OSTYPE == "cygwin" ]]; then
echo "Setting up Windows environment"
else
export NVM_DIR="$HOME/.nvm"
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
fi
export NVM_DIR="$HOME/.nvm"
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

echo "Using node version:"
node --version

echo "Using npm version:"
npm --version
9 changes: 7 additions & 2 deletions .evergreen/InstallNode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ Remove-Item .\npm
Remove-Item .\npm.cmd
Remove-Item .\npx
Remove-Item .\npx.cmd
Move-Item .\node_modules\npm -Destination .\node_modules\npm2
Move-Item .\node_modules\npm -Destination .\node_modules\npm2
.\node.exe .\node_modules\npm2\bin\npm-cli.js i -g npm@latest

Set-Location -Path $PSScriptRoot\..\
npm run bootstrap

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$SetupEnv = "$scriptPath\SetupEnv.ps1"

& $SetupEnv
npm run bootstrap-ci
11 changes: 8 additions & 3 deletions .evergreen/SetupEnv.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
$version = "12.4.0"
$node_path = "$PSScriptRoot\node-v$version-win-x64\node.exe"
$npm_path = "$PSScriptRoot\node-v$version-win-x64\npm.cmd"
$Env:PATH += ";$node_path;$npm_path"
$Env:PATH = "$PSScriptRoot\node-v$version-win-x64;C:\Program Files\Git\mingw32\libexec\git-core;$Env:PATH"

echo "Using node version:"
node --version

echo "Using npm version:"
npm --version

69 changes: 0 additions & 69 deletions config/karma.conf.base.js

This file was deleted.

114 changes: 5 additions & 109 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
"main": "index.js",
"bin": "packages/cli-repl/bin/mongosh.js",
"scripts": {
"prebootstrap-with-chromium": "npm install",
"bootstrap-with-chromium": "lerna bootstrap --concurrency=1",
"prebootstrap": "npm install",
"bootstrap": "lerna bootstrap --concurrency=1",
"bootstrap": "cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 lerna bootstrap --ignore-prepublish --concurrency=1",
"prebootstrap-without-compass": "npm install",
"bootstrap-without-compass": "cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 lerna bootstrap --ignore @mongodb-js/compass-shell --ignore-prepublish --concurrency=1",
"prebootstrap-ci": "npm ci",
"bootstrap-ci": "lerna bootstrap --ci --concurrency=1",
"clean": "lerna clean -y && rm -Rf node_modules",
"check": "lerna run check --since HEAD --exclude-dependents",
"check-ci": "lerna run check",
Expand Down Expand Up @@ -87,7 +93,6 @@
"node-codesign": "durran/node-codesign",
"parcel-bundler": "^1.12.4",
"pkg": "^4.4.3",
"puppeteer": "^2.0.0",
"rimraf": "^3.0.2",
"semver": "^7.3.2",
"sinon": "^7.5.0",
Expand Down
11 changes: 9 additions & 2 deletions packages/browser-repl/config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();
const setupTestBrowser = require('./setup-test-browser');
const browser = setupTestBrowser();

const webpackConfigTest = require('./webpack.config.test');

Expand Down Expand Up @@ -36,7 +37,13 @@ module.exports = (config) => {
reporters: [
'mocha'
],
browsers: [ 'ChromeHeadless' ],
customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
browsers: [ browser ],
singleRun: true,
client: {
mocha: {
Expand Down
Loading