Skip to content

Commit 665347f

Browse files
committed
fixup! lib,crypto: rewire CryptoKey on the native class
Signed-off-by: Filip Skokan <[email protected]>
1 parent a9942b7 commit 665347f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/eslint.config_partial.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export default [
7272
message: 'Use `FunctionPrototypeCall` to avoid creating an ad-hoc array',
7373
},
7474
{
75-
selector: "VariableDeclarator[init.type='CallExpression'][init.callee.name='internalBinding'][init.arguments.0.value='crypto'] > ObjectPattern > Property[key.name='getCryptoKeyHandle']",
76-
message: "Use `const { getCryptoKeyHandle } = require('internal/crypto/keys');` instead of destructuring it from `internalBinding('crypto')`.",
75+
selector: "VariableDeclarator[init.type='CallExpression'][init.callee.name='internalBinding'][init.arguments.0.value='crypto'] > ObjectPattern > Property[key.name='getCryptoKeySlots']",
76+
message: "Use `const { getCryptoKeySlots } = require('internal/crypto/keys');` instead of destructuring it from `internalBinding('crypto')`.",
7777
},
7878
],
7979
'no-restricted-globals': [

lib/internal/crypto/keys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const {
1616
KeyObjectHandle,
1717
createNativeKeyObjectClass,
1818
createCryptoKeyClass,
19+
// eslint-disable-next-line no-restricted-syntax -- intended here
1920
getCryptoKeySlots: nativeGetCryptoKeySlots,
2021
kKeyTypeSecret,
2122
kKeyTypePublic,

0 commit comments

Comments
 (0)