Skip to content

Conversation

@LijieZhang1998
Copy link
Contributor

This PR mainly implements the validation supported by old shell but not the new shell.

@LijieZhang1998
Copy link
Contributor Author

LijieZhang1998 commented Oct 21, 2025

@addaleax can you review this PR? I feel this PR may be duplicated. bson npm package + new mongosh should cover all the validation. It's just the error message will be different. I can just add unit tests to this repo. Or, I can close this PR but add int tests to asp-js-engine repo.

@addaleax
Copy link
Collaborator

@LijieZhang1998 Yeah, this PR makes sense if you're going for full compatibility. This is one of the few cases where we intentionally broke full compatibility in mongosh 2.x (compared to mongosh 1.x, which allowed the two-argument version), because the JS BSON library and the legacy shell/$function used different parameter ordering for t and i

@addaleax addaleax merged commit 38c7c26 into mongodb-labs:main Oct 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants