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
28 changes: 28 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 @@ -6206,6 +6207,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/arg-parser"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6225,6 +6227,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/async-rewriter2"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6244,6 +6247,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/autocomplete"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6263,6 +6267,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "false"
mongosh_install_workspace: "@mongosh/browser-repl"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6282,6 +6287,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/browser-runtime-core"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6301,6 +6307,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/browser-runtime-electron"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6320,6 +6327,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/build"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6339,6 +6347,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/cli-repl"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6358,6 +6367,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/connectivity-tests"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6377,6 +6387,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/e2e-tests"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6396,6 +6407,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/editor"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6415,6 +6427,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/errors"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6434,6 +6447,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/history"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6453,6 +6467,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/i18n"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6472,6 +6487,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/java-shell"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6491,6 +6507,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/js-multiline-to-singleline"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6510,6 +6527,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/logging"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6529,6 +6547,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/mongosh"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6548,6 +6567,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/node-runtime-worker-thread"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6567,6 +6587,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/service-provider-core"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6586,6 +6607,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/service-provider-node-driver"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6605,6 +6627,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/shell-api"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6624,6 +6647,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/shell-bson"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6643,6 +6667,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/shell-evaluator"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6662,6 +6687,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/snippet-manager"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6681,6 +6707,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
mongosh_install_workspace: "@mongosh/testing"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand All @@ -6700,6 +6727,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "true"
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 @@ -1167,6 +1168,7 @@ tasks:
vars:
node_js_version: ${node_js_version}
puppeteer_skip_download: "<% out(usePuppeteer ? "false" : "true") %>"
mongosh_install_workspace: "@mongosh/<% out(packageName) %>"
- func: test
vars:
mongosh_server_test_version: ${mongosh_server_test_version}
Expand Down
27 changes: 22 additions & 5 deletions .evergreen/install-npm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ export BASEDIR="$PWD/.evergreen"

. "$BASEDIR/setup-env.sh"

npm ci --verbose
# Install root directories used by scripts. We should consider moving scripts to separate packages.
# Also install config workspaces since they're referenced by tsconfig.json files but not automatically linked when workspaces=false is used
npm ci -w configs/tsconfig-mongosh -w configs/eslint-config-mongosh --include-workspace-root

npm run mark-ci-required-optional-dependencies


if [[ -n "$MONGOSH_INSTALL_WORKSPACE" ]]; then
npm ci -w "$MONGOSH_INSTALL_WORKSPACE"
fi

echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'MONOGDB' to 'MONGODB' in variable name.

Copilot uses AI. Check for mistakes.

# if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version
Expand All @@ -21,14 +31,21 @@ if [[ -n "$MONOGDB_DRIVER_VERSION_OVERRIDE" ]]; then
npm i --verbose --force
fi

# if we rewrote this script in javascript using just builtin node modules we could skip the npm ci above
npm run mark-ci-required-optional-dependencies

# install again, this time with all the optional deps. If
# 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
19 changes: 14 additions & 5 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"update-evergreen-config": "npm run test-evergreen-expansions && node .evergreen/generate-evergreen-yml.js .evergreen/evergreen.yml.in > .evergreen.yml",
"update-cli-usage-text": "node scripts/update-cli-usage-text.js",
"update-security-test-summary": "ts-node scripts/generate-security-test-summary.ts > docs/security-test-summary.md",
"mark-ci-required-optional-dependencies": "ts-node scripts/mark-ci-required-optional-dependencies.ts",
"mark-ci-required-optional-dependencies": "npx ts-node@10.9.2 scripts/mark-ci-required-optional-dependencies.ts",
"write-node-js-dep": "node scripts/write-nodejs-dep > .sbom/node-js-dep.json",
"scan-node-js": "mongodb-sbom-tools scan-node-js --version=$NODE_JS_VERSION > .sbom/node-js-vuln.json",
"snyk-test": "node scripts/snyk-test.js",
Expand Down Expand Up @@ -125,7 +125,10 @@
"webpack": "^5.99.9",
"webpack-bundle-analyzer": "^4.7.0",
"webpack-cli": "^6.0.1",
"yaml": "^1.10.0"
"yaml": "^1.10.0",
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0"
},
"optionalDependencies": {
"lerna": "^8.1.8"
Expand Down
2 changes: 1 addition & 1 deletion packages/async-rewriter2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@types/babel__core": "^7.20.1",
"@types/babel__core": "^7.20.5",
"eslint": "^7.25.0",
"prettier": "^2.8.8"
}
Expand Down
10 changes: 10 additions & 0 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
"description": "MongoDB Shell i18n Project",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": {
"default": "./lib/index.js",
"types": "./lib/index.d.ts"
},
"./locales": {
"default": "./src/locales/index.ts",
"types": "./src/locales/index.d.ts"
}
},
"repository": {
"type": "git",
"url": "git://github.com/mongodb-js/mongosh.git"
Expand Down
Loading
Loading