mongosh: 2.9.2 -> 2.10.0 (#553501)

This commit is contained in:
Sandro
2026-08-23 20:28:39 +00:00
committed by GitHub
2 changed files with 11 additions and 21 deletions

View File

@@ -1,13 +0,0 @@
diff --git a/packages/cli-repl/src/cli-repl.ts b/packages/cli-repl/src/cli-repl.ts
index b00c52e1..7a096d6d 100644
--- a/packages/cli-repl/src/cli-repl.ts
+++ b/packages/cli-repl/src/cli-repl.ts
@@ -159,7 +159,7 @@ export class CliRepl implements MongoshIOProvider {
this.config = {
userId: id,
telemetryAnonymousId: id,
- enableTelemetry: true,
+ enableTelemetry: false,
};
this.getCryptLibraryPaths = options.getCryptLibraryPaths;

View File

@@ -2,25 +2,26 @@
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs_24,
}:
buildNpmPackage.override { nodejs = nodejs_24; } (finalAttrs: {
buildNpmPackage (finalAttrs: {
pname = "mongosh";
version = "2.9.2";
version = "2.10.0";
src = fetchFromGitHub {
owner = "mongodb-js";
repo = "mongosh";
tag = "v${finalAttrs.version}";
hash = "sha256-mwc9Mv8BJgI/7DzUH6QwHsWzgAquB8ehmnElM5+mYuI=";
hash = "sha256-SJkDBo/rtbh3rh5oPjjS5zXG6eye+PCY3pI1FN281Ps=";
};
npmDepsHash = "sha256-xI+6a0sMuZmij46N5aqsprLLiVaSZifGW8tMq189fww=";
npmDepsHash = "sha256-xmjlvncUVVp7Y+qCBpJNiuvc5n2IBKqXk715EOmWo/U=";
patches = [
./disable-telemetry.patch
];
postPatch = ''
# Disable telemetry by default; users can still opt in via enableTelemetry().
substituteInPlace packages/cli-repl/src/cli-repl.ts \
--replace-fail "enableTelemetry: true" "enableTelemetry: false"
'';
npmFlags = [
"--omit=optional"
@@ -30,9 +31,11 @@ buildNpmPackage.override { nodejs = nodejs_24; } (finalAttrs: {
dontNpmInstall = true;
installPhase = ''
runHook preInstall
npmWorkspace=packages/mongosh npmInstallHook
cp -r packages configs $out/lib/node_modules/mongosh/
rm $out/lib/node_modules/mongosh/node_modules/@mongosh/docker-build-scripts # dangling symlink
runHook postInstall
'';