Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

fix: align ISODate with shell COMPASS-4655 #199

Merged
merged 3 commits into from
Jun 27, 2024
Merged

fix: align ISODate with shell COMPASS-4655 #199

merged 3 commits into from
Jun 27, 2024

Conversation

mcasimir
Copy link
Contributor

@mcasimir mcasimir commented Jun 25, 2024

Currently we treat IsoDate as Date.

IsoDate works differently and always construct dates ignoring the current time zone if one is not specified.

The code in the PR is copy-pasted from mongosh to make sure we address this type in the same way.

@@ -2,8 +2,8 @@
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"target": "ES2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be safe at this point? helps with regex groups

"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ejson-shell-parser",
"version": "2.0.0",
"version": "2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still do releases through npm version patch && git push origin main --tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I don't think I've released this in years, how does it relate to this line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just means we usually do the version bumps outside of PRs 🙂 Definitely not a big deal (hence the approval), you can do it whichever way you want

@mcasimir
Copy link
Contributor Author

@addaleax
Copy link
Contributor

Also yeah, CI fails https://github.com/mongodb-js/ejson-shell-parser/actions/runs/9659500397/job/26643024959

Yeah, this package uses yarn, I think the package lock/yarn lock changes here are being rejected by it 🥴

@mcasimir mcasimir merged commit 5c7f5d6 into master Jun 27, 2024
3 checks passed
@mcasimir mcasimir deleted the isodate branch June 27, 2024 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants