util: add null prototype support for date#25144
util: add null prototype support for date#25144antsmartian wants to merge 1 commit intonodejs:masterfrom
Conversation
24a5949 to
06e565b
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
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
BridgeAR
left a comment
There was a problem hiding this comment.
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
|
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 <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25144 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25144 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds the support of null prototype in Date object.
cc @BridgeAR
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes