Uh oh!
There was an error while loading. Please reload this page.
assert,crypto: make KeyObject and CryptoKey testable for equality - #50897
assert,crypto: make KeyObject and CryptoKey testable for equality#50897panva wants to merge 2 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0965ede to
5327861Compare5327861 to
ca444dbCompare
This comment was marked as outdated.
This comment was marked as outdated.
ca444db to
b008047Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
panva
commented
Nov 25, 2023
cc @nodejs/crypto |
nodejs-github-bot
commented
Nov 25, 2023
aduh95
left a comment
There was a problem hiding this comment.
I think the use case makes sense, and I'm not able to able to suggest a better implementation, so let's roll with this.
| const a = crypto.createSecretKey(Buffer.alloc(1, 0)); | ||
| const b = crypto.createSecretKey(Buffer.alloc(1, 1)); |
There was a problem hiding this comment.
nit: I find Buffer.from easier to understand (I had to go read the docs to get what the second argument of Buffer.alloc was for)
| consta=crypto.createSecretKey(Buffer.alloc(1,0)); | |
| constb=crypto.createSecretKey(Buffer.alloc(1,1)); | |
| consta=crypto.createSecretKey(Buffer.from([0])); | |
| constb=crypto.createSecretKey(Buffer.from([1])); |
nodejs-github-bot
commented
Dec 17, 2023
Commit Queue failed- Loading data for nodejs/node/pull/50897 ✔ Done loading data for nodejs/node/pull/50897 ----------------------------------- PR info ------------------------------------ Title assert,crypto: make KeyObject and CryptoKey testable for equality (#50897) Author Filip Skokan (@panva) Branch panva:crypto-objects-equal -> nodejs:main Labels crypto, assert, util, needs-ci, review wanted, webcrypto, commit-queue-rebase Commits 2 - crypto: update CryptoKey symbol properties - assert,crypto: make KeyObject and CryptoKey testable for equality Committers 1 - Filip Skokan PR-URL: https://github.com/nodejs/node/pull/50897 Reviewed-By: Antoine du Hamel ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/50897 Reviewed-By: Antoine du Hamel -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 24 Nov 2023 16:50:43 GMT ✔ Approvals: 1 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/50897#pullrequestreview-1785408839 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-11-25T19:19:00Z: https://ci.nodejs.org/job/node-test-pull-request/55920/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - crypto: update CryptoKey symbol properties ⚠ - assert,crypto: make KeyObject and CryptoKey testable for equality - Querying data for job/node-test-pull-request/55920/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/7237974363 |
nodejs-github-bot
commented
Dec 17, 2023
nodejs-github-bot
commented
Dec 17, 2023
nodejs-github-bot
commented
Dec 17, 2023
Landed in 154afbe...0afe731 |
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #50897 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Not sure if this is the right place to comment but I noticed a regression from v18 to v20, and this PR seems vaguely related. consta=['a'];assert.deepStrictEqual(newSet([a,['b']]),newSet([a,['b']]));
The bug seems to occur only when comparing |
aduh95
commented
Jun 9, 2024
@chharvey can you open a new issue to track this please? (FWIW I'm able to reproduce) |
chharvey
commented
Jun 10, 2024
@aduh95 thanks for your reply. I think I found the culprit and left a comment: #46593 (comment) |
panva
commented
Jun 11, 2024
@chharvey can you open a new issue to track this please? |
This makes CryptoKey and KeyObject instances testable using
assert.deepStrictEqualandassert.deepEqual.The state before was that