File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ RUN if [ -z "$NODE_JS_VERSION" ]; then echo "Error: NODE_JS_VERSION is not defin
77ENV NODE_JS_VERSION=${NODE_JS_VERSION}
88ENV DEBIAN_FRONTEND=noninteractive
99RUN apt-get update
10- RUN apt-get -y -qq install git curl apt-transport-https ca-certificates apt-utils software-properties-common
10+ RUN apt-get -y -qq install git curl apt-transport-https ca-certificates apt-utils software-properties-common jq
1111
1212# Install Node.js using nvm (reusing pattern from .evergreen/install-node.sh)
1313ENV NVM_DIR="/root/.nvm"
Original file line number Diff line number Diff line change @@ -12,14 +12,23 @@ rm -rf "$test_root_dir" && mkdir -p "$test_root_dir"
1212cd " $test_root_dir "
1313git clone --depth=10 https://github.com/mongodb-js/vscode.git
1414cd vscode
15+ # Build overrides object for all local mongosh packages
16+ overrides=" {"
17+ for pkg_dir in " $mongosh_root_dir " /packages/* /; do
18+ if [ -f " $pkg_dir /package.json" ]; then
19+ pkg_name=$( jq -r ' .name' " $pkg_dir /package.json" )
20+ overrides=" $overrides \" $pkg_name \" :\" file:$pkg_dir \" ,"
21+ fi
22+ done
23+ # Add other required packages
24+ overrides=" $overrides \" mongodb\" :\" file:$mongosh_root_dir /node_modules/mongodb\" ,"
25+ overrides=" $overrides \" @mongodb-js/devtools-connect\" :\" file:$mongosh_root_dir /node_modules/@mongodb-js/devtools-connect\" ,"
26+ overrides=" $overrides \" @mongodb-js/devtools-proxy-support\" :\" file:$mongosh_root_dir /node_modules/@mongodb-js/devtools-proxy-support\" "
27+ overrides=" $overrides }"
28+
29+ # Add pnpm overrides to package.json
30+ jq --argjson overrides " $overrides " ' .pnpm.overrides = $overrides' package.json > package.json.tmp && mv package.json.tmp package.json
1531pnpm install
16- rm -rf node_modules/@mongosh node_modules/mongodb node_modules/@mongodb-js/devtools-connect node_modules/@mongodb-js/devtools-proxy-support
17- (cd node_modules && \
18- ln -s " $mongosh_root_dir /packages" @mongosh && \
19- ln -s " $mongosh_root_dir /node_modules/mongodb" mongodb && \
20- cd @mongodb-js && \
21- ln -s " $mongosh_root_dir /node_modules/@mongodb-js/devtools-connect" devtools-connect && \
22- ln -s " $mongosh_root_dir /node_modules/@mongodb-js/devtools-proxy-support" devtools-proxy-support)
2332# This test can require a lot of memory so we bump the maximum size.
2433NODE_OPTIONS=' --max-old-space-size=4096 --no-experimental-strip-types' pnpm test
2534cd /tmp
You can’t perform that action at this time.
0 commit comments