summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/_fs/_fs_common.ts1
-rw-r--r--ext/node/polyfills/_fs/_fs_open.ts4
-rw-r--r--ext/node/polyfills/_fs/_fs_readv.ts1
-rw-r--r--ext/node/polyfills/internal/crypto/keygen.ts1
-rw-r--r--ext/node/polyfills/internal/crypto/random.ts1
-rw-r--r--ext/node/polyfills/internal_binding/http_parser.ts1
-rw-r--r--ext/node/polyfills/vm.js1
7 files changed, 8 insertions, 2 deletions
diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts
index ac0bf5a55..a29548bb3 100644
--- a/ext/node/polyfills/_fs/_fs_common.ts
+++ b/ext/node/polyfills/_fs/_fs_common.ts
@@ -20,6 +20,7 @@ import {
notImplemented,
TextEncodings,
} from "ext:deno_node/_utils.ts";
+import { type Buffer } from "node:buffer";
export type CallbackWithError = (err: ErrnoException | null) => void;
diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts
index 8bd989790..31ca4bb61 100644
--- a/ext/node/polyfills/_fs/_fs_open.ts
+++ b/ext/node/polyfills/_fs/_fs_open.ts
@@ -147,8 +147,8 @@ export function open(
export function openPromise(
path: string | Buffer | URL,
- flags?: openFlags = "r",
- mode? = 0o666,
+ flags: openFlags = "r",
+ mode = 0o666,
): Promise<FileHandle> {
return new Promise((resolve, reject) => {
open(path, flags, mode, (err, fd) => {
diff --git a/ext/node/polyfills/_fs/_fs_readv.ts b/ext/node/polyfills/_fs/_fs_readv.ts
index 384f5e319..2259f029a 100644
--- a/ext/node/polyfills/_fs/_fs_readv.ts
+++ b/ext/node/polyfills/_fs/_fs_readv.ts
@@ -15,6 +15,7 @@ import { maybeCallback } from "ext:deno_node/_fs/_fs_common.ts";
import { validateInteger } from "ext:deno_node/internal/validators.mjs";
import * as io from "ext:deno_io/12_io.js";
import { op_fs_seek_async, op_fs_seek_sync } from "ext:core/ops";
+import process from "node:process";
type Callback = (
err: ErrnoException | null,
diff --git a/ext/node/polyfills/internal/crypto/keygen.ts b/ext/node/polyfills/internal/crypto/keygen.ts
index a40c76c0d..44bfd8327 100644
--- a/ext/node/polyfills/internal/crypto/keygen.ts
+++ b/ext/node/polyfills/internal/crypto/keygen.ts
@@ -29,6 +29,7 @@ import {
} from "ext:deno_node/internal/validators.mjs";
import { Buffer } from "node:buffer";
import { KeyFormat, KeyType } from "ext:deno_node/internal/crypto/types.ts";
+import process from "node:process";
import {
op_node_generate_dh_group_key,
diff --git a/ext/node/polyfills/internal/crypto/random.ts b/ext/node/polyfills/internal/crypto/random.ts
index 4219414dc..a41b86819 100644
--- a/ext/node/polyfills/internal/crypto/random.ts
+++ b/ext/node/polyfills/internal/crypto/random.ts
@@ -38,6 +38,7 @@ import {
ERR_INVALID_ARG_TYPE,
ERR_OUT_OF_RANGE,
} from "ext:deno_node/internal/errors.ts";
+import { Buffer } from "node:buffer";
export { default as randomBytes } from "ext:deno_node/internal/crypto/_randomBytes.ts";
export {
diff --git a/ext/node/polyfills/internal_binding/http_parser.ts b/ext/node/polyfills/internal_binding/http_parser.ts
index ca4f896e2..bad10d985 100644
--- a/ext/node/polyfills/internal_binding/http_parser.ts
+++ b/ext/node/polyfills/internal_binding/http_parser.ts
@@ -126,6 +126,7 @@ ObjectSetPrototypeOf(HTTPParser.prototype, AsyncWrap.prototype);
function defineProps(obj: object, props: Record<string, unknown>) {
for (const entry of new SafeArrayIterator(ObjectEntries(props))) {
ObjectDefineProperty(obj, entry[0], {
+ __proto__: null,
value: entry[1],
enumerable: true,
writable: true,
diff --git a/ext/node/polyfills/vm.js b/ext/node/polyfills/vm.js
index 183ddad2f..b64c847c5 100644
--- a/ext/node/polyfills/vm.js
+++ b/ext/node/polyfills/vm.js
@@ -182,6 +182,7 @@ function getContextOptions(options) {
let defaultContextNameIndex = 1;
export function createContext(
+ // deno-lint-ignore prefer-primordials
contextObject = {},
options = { __proto__: null },
) {