summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal_binding
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-29 14:58:08 +0100
committerGitHub <noreply@github.com>2024-01-29 14:58:08 +0100
commit909986fa6ed3404e76590438b387391a6c213e46 (patch)
tree30eec861847dccadd83fcc65b91dc44c96af6d9e /ext/node/polyfills/internal_binding
parentaed5e4997df26c99a186fb9a5b18da3bbc594ed3 (diff)
refactor: migrate 'ext/node' extension to virtual ops module (#22157)
Follow up to https://github.com/denoland/deno/pull/22135
Diffstat (limited to 'ext/node/polyfills/internal_binding')
-rw-r--r--ext/node/polyfills/internal_binding/_libuv_winerror.ts5
-rw-r--r--ext/node/polyfills/internal_binding/stream_wrap.ts5
-rw-r--r--ext/node/polyfills/internal_binding/udp_wrap.ts5
-rw-r--r--ext/node/polyfills/internal_binding/util.ts5
4 files changed, 5 insertions, 15 deletions
diff --git a/ext/node/polyfills/internal_binding/_libuv_winerror.ts b/ext/node/polyfills/internal_binding/_libuv_winerror.ts
index 105adfb55..3ba7d9cda 100644
--- a/ext/node/polyfills/internal_binding/_libuv_winerror.ts
+++ b/ext/node/polyfills/internal_binding/_libuv_winerror.ts
@@ -1,9 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { core } from "ext:core/mod.js";
-const {
- op_node_sys_to_uv_error,
-} = core.ensureFastOps();
+import { op_node_sys_to_uv_error } from "ext:core/ops";
export function uvTranslateSysError(sysErrno: number): string {
return op_node_sys_to_uv_error(sysErrno);
diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts
index d568803bf..4915a38ca 100644
--- a/ext/node/polyfills/internal_binding/stream_wrap.ts
+++ b/ext/node/polyfills/internal_binding/stream_wrap.ts
@@ -32,10 +32,7 @@
import { core } from "ext:core/mod.js";
const { internalRidSymbol } = core;
-const {
- op_can_write_vectored,
- op_raw_write_vectored,
-} = core.ensureFastOps();
+import { op_can_write_vectored, op_raw_write_vectored } from "ext:core/ops";
import { TextEncoder } from "ext:deno_web/08_text_encoding.js";
import { Buffer } from "node:buffer";
diff --git a/ext/node/polyfills/internal_binding/udp_wrap.ts b/ext/node/polyfills/internal_binding/udp_wrap.ts
index b78f2a077..7cbd6cabe 100644
--- a/ext/node/polyfills/internal_binding/udp_wrap.ts
+++ b/ext/node/polyfills/internal_binding/udp_wrap.ts
@@ -23,11 +23,10 @@
// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials
-import { core } from "ext:core/mod.js";
-const {
+import {
op_node_unstable_net_listen_udp,
op_node_unstable_net_listen_unixpacket,
-} = core.ensureFastOps();
+} from "ext:core/ops";
import {
AsyncWrap,
diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts
index b4bcdaef4..c8fb32d8c 100644
--- a/ext/node/polyfills/internal_binding/util.ts
+++ b/ext/node/polyfills/internal_binding/util.ts
@@ -28,10 +28,7 @@
// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials
-import { core } from "ext:core/mod.js";
-const {
- op_node_guess_handle_type,
-} = core.ensureFastOps();
+import { op_node_guess_handle_type } from "ext:core/ops";
const handleTypes = ["TCP", "TTY", "UDP", "FILE", "PIPE", "UNKNOWN"];
export function guessHandleType(fd: number): string {