diff options
Diffstat (limited to 'ext/node/polyfills/internal/crypto')
-rw-r--r-- | ext/node/polyfills/internal/crypto/_randomInt.ts | 3 | ||||
-rw-r--r-- | ext/node/polyfills/internal/crypto/random.ts | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/crypto/_randomInt.ts b/ext/node/polyfills/internal/crypto/_randomInt.ts index 9f161668d..e5ab41ee7 100644 --- a/ext/node/polyfills/internal/crypto/_randomInt.ts +++ b/ext/node/polyfills/internal/crypto/_randomInt.ts @@ -3,7 +3,8 @@ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials -const ops = globalThis.Deno.core.ops; +import { core } from "ext:core/mod.js"; +const ops = core.ops; export default function randomInt(max: number): number; export default function randomInt(min: number, max: number): number; diff --git a/ext/node/polyfills/internal/crypto/random.ts b/ext/node/polyfills/internal/crypto/random.ts index e8776cdf0..4a4b68274 100644 --- a/ext/node/polyfills/internal/crypto/random.ts +++ b/ext/node/polyfills/internal/crypto/random.ts @@ -32,7 +32,7 @@ export { } from "ext:deno_node/internal/crypto/_randomFill.mjs"; export { default as randomInt } from "ext:deno_node/internal/crypto/_randomInt.ts"; -const primordials = globalThis.__bootstrap.primordials; +import { primordials } from "ext:core/mod.js"; const { StringPrototypePadStart, StringPrototypeToString } = primordials; const { core } = globalThis.__bootstrap; |