···11+#!/usr/bin/env nix-shell
22+#!nix-shell -i bash -p curl nix-update jq
33+44+# GitHub tags include many unrelated subpackage versions, making it unreliable to determine the latest mongosh version.
55+# Fetch the latest mongosh version directly from the npm registry instead.
66+version="$(curl -fsSL https://registry.npmjs.org/mongosh/latest | jq -r ".version")"
77+88+nix-update --version "$version" mongosh