1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p curl nix-update jq
3
4# GitHub tags include many unrelated subpackage versions, making it unreliable to determine the latest mongosh version.
5# Fetch the latest mongosh version directly from the npm registry instead.
6version="$(curl -fsSL https://registry.npmjs.org/mongosh/latest | jq -r ".version")"
7
8nix-update --version "$version" mongosh