-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util: add null prototype support for date #25144
Conversation
24a5949
to
06e565b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since invalid dates will now be handled properly with keys as well, please also add a test for that (as well as subclassing if implemented).
43c8edf
to
435415f
Compare
2a9c063
to
5f8d3a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is LG to me if the keys.length === 0
check is removed (the original conditional was a mistake in the first place and with the current implementation it produces a weird output).
5f8d3a9
to
556713e
Compare
840315d
to
58b2aba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for guiding me here @BridgeAR. I love utils, may be few more PR's on the way! I guess we are now left with RE and Errors null proto handling. Will try out working on RE and send out a PR in a few days. |
I've had this bite me for other non-date values. Might be a good time to review other places this can happen. |
@jdalton Yes. We have already support for other types apart from Error and RE. |
Resume CI: https://ci.nodejs.org/job/node-test-pull-request/19748/ ✔️ |
@nodejs/util this could use another LG. @antsmartian this needs a rebase. |
New CI After Rebase: https://ci.nodejs.org/job/node-test-pull-request/19966/ |
Fresh CI (after rebase due to conflict): https://ci.nodejs.org/job/node-test-pull-request/20009/ |
Landed in 81b25ea 🎉 |
PR-URL: nodejs#25144 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #25144 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#25144 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Adds the support of null prototype in Date object.
cc @BridgeAR
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes