From c1fc7b2cd511ce83566f696c8880d6718e5c6885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 7 Dec 2023 14:21:01 +0100 Subject: refactor: pull 'core', 'internals', 'primordials' from ES module (#21462) This commit refactors how we access "core", "internals" and "primordials" objects coming from `deno_core`, in our internal JavaScript code. Instead of capturing them from "globalThis.__bootstrap" namespace, we import them from recently added "ext:core/mod.js" file. --- ext/node/polyfills/internal/crypto/_randomInt.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/node/polyfills/internal/crypto/_randomInt.ts') 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; -- cgit v1.2.3