Message from ben.leembruggen@mongodb.com on Slack:
https://mongodb.slack.com/archives/CG1N06M1C/p1724033289601979
It seems that aligning the behaviour of ISODate in @mongodb-js/shell-bson-parser for Compass broke some customer scripts. This PR is the one that aligns the shell-bson-parser to do what mongosh does: https://github.com/mongodb-js/ejson-shell-parser/pull/199
It seems that, according to MONGOSH-354, this is the actual desired behaviour, and it should work similar as the old mongo shell.
We should investigate if we actually want to support the old behaviour and implement it.
Context from Ben:
We are currently using the ejson-shell-parser on both frontend and backend of the charts application, using this package to parse untrusted MQL provided by our users as part of the chart builder. Queries can be saved to be used as part of a chart, so any breaking change moving from ejson-shell-parser to @mongodb-js/shell-bson-parser will result in existing queries no longer being valid (breaking the customers chart). This is what has been identified since the isoDateRegex changes, any charts that contain queries with the above scenarios will now throw an error if we move to @mongodb-js/shell-bson-parser
- is related to
-
COMPASS-4655 Compass should parse ISODate correctly
- Closed
-
MONGOSH-354 ISODate not working as expected
- Closed