Skip to content
Draft
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
32 changes: 8 additions & 24 deletions .depalignrc.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
{
"ignore": {
"@babel/core": [
"^7.26.10"
],
"yaml": [
"^2.3.1",
"^1.10.0"
],
"eslint-plugin-mocha": [
"^8.0.0",
"^9.0.0"
],
"@typescript-eslint/eslint-plugin": [
"^5.59.0",
"^4.33.0"
],
"@typescript-eslint/parser": [
"^5.59.0",
"^4.33.0"
],
"node-fetch": [
"^3.3.2",
"2.6.12"
]
"@babel/core": ["^7.26.10"],
"bson": ["^6.10.4", "^6.10.4 | ^7.0.0"],
"yaml": ["^2.3.1", "^1.10.0"],
"eslint-plugin-mocha": ["^8.0.0", "^9.0.0"],
"@typescript-eslint/eslint-plugin": ["^5.59.0", "^4.33.0"],
"@typescript-eslint/parser": ["^5.59.0", "^4.33.0"],
"node-fetch": ["^3.3.2", "2.6.12"]
}
}
}
27 changes: 27 additions & 0 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ functions:
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
MONGOSH_INSTALL_WORKSPACE: ${mongosh_install_workspace|}
script: |
set -e
set -x
Expand Down Expand Up @@ -5549,6 +5550,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/arg-parser"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5568,6 +5570,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/async-rewriter2"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5587,6 +5590,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/autocomplete"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5606,6 +5610,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/browser-repl"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5625,6 +5630,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/browser-runtime-core"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5644,6 +5650,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/browser-runtime-electron"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5663,6 +5670,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/build"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5682,6 +5690,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/cli-repl"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5701,6 +5710,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/connectivity-tests"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5720,6 +5730,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/e2e-tests"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5739,6 +5750,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/editor"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5758,6 +5770,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/errors"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5777,6 +5790,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/history"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5796,6 +5810,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/i18n"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5815,6 +5830,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/java-shell"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5834,6 +5850,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/js-multiline-to-singleline"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5853,6 +5870,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/logging"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5872,6 +5890,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/mongosh"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5891,6 +5910,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/node-runtime-worker-thread"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5910,6 +5930,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/service-provider-core"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5929,6 +5950,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/service-provider-node-driver"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5948,6 +5970,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/shell-api"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5967,6 +5990,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/shell-bson"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -5986,6 +6010,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/shell-evaluator"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6005,6 +6030,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/snippet-manager"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6024,6 +6050,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/types"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand Down
2 changes: 2 additions & 0 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ functions:
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
MONGOSH_INSTALL_WORKSPACE: ${mongosh_install_workspace|}
script: |
set -e
set -x
Expand Down Expand Up @@ -1166,6 +1167,7 @@ tasks:
- func: install
vars:
node_js_version: ${node_js_version}
mongosh_install_workspace: "@mongosh/<% out(packageName) %>"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand Down
20 changes: 18 additions & 2 deletions .evergreen/install-npm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ export BASEDIR="$PWD/.evergreen"

. "$BASEDIR/setup-env.sh"

npm ci --verbose
# If MONGOSH_INSTALL_WORKSPACE is set, install only that workspace
if [[ -n "$MONGOSH_INSTALL_WORKSPACE" ]]; then
echo "Installing workspace: $MONGOSH_INSTALL_WORKSPACE"
npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root --verbose
else
npm ci --verbose
fi
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"

# if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version
Expand All @@ -28,7 +34,17 @@ npm run mark-ci-required-optional-dependencies
# mongodb-client-encryption failed to install (it can't install on some
# platforms), then install again ignoring scripts so that the package installs
# along with its types, but npm wouldn't try and compile the addon
(npm ci && test -e node_modules/mongodb-client-encryption) || npm ci --ignore-scripts
if [[ -n "$MONGOSH_INSTALL_WORKSPACE" ]]; then
# Check if the workspace or root actually depends on mongodb-client-encryption
if npm ls --workspace "$MONGOSH_INSTALL_WORKSPACE" --depth=1 mongodb-client-encryption > /dev/null 2>&1; then
echo "Workspace or root depends on mongodb-client-encryption, retrying install with optional deps..."
(npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root && test -e node_modules/mongodb-client-encryption) || npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root --ignore-scripts
else
echo "Workspace does not depend on mongodb-client-encryption, skipping optional deps reinstall"
fi
else
(npm ci && test -e node_modules/mongodb-client-encryption) || npm ci --ignore-scripts
fi

echo "npm packages after installation"
npm ls || true
2 changes: 1 addition & 1 deletion configs/eslint-config-mongosh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"eslint-plugin-react-hooks": "^4.2.0"
},
"devDependencies": {
"prettier": "^2.7.1"
"prettier": "^2.8.8"
},
"scripts": {
"check": "npm run lint",
Expand Down
4 changes: 2 additions & 2 deletions configs/tsconfig-mongosh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"typescript": "^5.3.3"
},
"devDependencies": {
"@mongodb-js/prettier-config-devtools": "^1.0.0",
"prettier": "^2.7.1"
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"prettier": "^2.8.8"
},
"scripts": {
"check": "npm run lint",
Expand Down
Loading