diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-09-07 08:09:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 09:09:16 -0400 |
commit | 3fc19dab47492e06043fc7add28e64693a4eb775 (patch) | |
tree | 855e952933662aef37bd20c084901ae0e488b2db /ext/node | |
parent | 01a761f1d4f7ff4943fbf80464a276b434d8a8f7 (diff) |
feat: support import attributes (#20342)
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/polyfills/_http_outgoing.ts | 1 | ||||
-rw-r--r-- | ext/node/polyfills/_util/std_asserts.ts | 1 | ||||
-rw-r--r-- | ext/node/polyfills/internal/async_hooks.ts | 1 | ||||
-rw-r--r-- | ext/node/polyfills/internal/crypto/random.ts | 9 | ||||
-rw-r--r-- | ext/node/polyfills/internal_binding/cares_wrap.ts | 1 | ||||
-rw-r--r-- | ext/node/polyfills/internal_binding/util.ts | 1 |
6 files changed, 6 insertions, 8 deletions
diff --git a/ext/node/polyfills/_http_outgoing.ts b/ext/node/polyfills/_http_outgoing.ts index 87932663c..50869ad82 100644 --- a/ext/node/polyfills/_http_outgoing.ts +++ b/ext/node/polyfills/_http_outgoing.ts @@ -27,7 +27,6 @@ import { defaultTriggerAsyncIdScope, symbols, } from "ext:deno_node/internal/async_hooks.ts"; -// deno-lint-ignore camelcase const { async_id_symbol } = symbols; import { ERR_HTTP_HEADERS_SENT, diff --git a/ext/node/polyfills/_util/std_asserts.ts b/ext/node/polyfills/_util/std_asserts.ts index 98eec94b7..ac5715cae 100644 --- a/ext/node/polyfills/_util/std_asserts.ts +++ b/ext/node/polyfills/_util/std_asserts.ts @@ -139,7 +139,6 @@ export function equal(c: unknown, d: unknown): boolean { })(c, d); } -// deno-lint-ignore ban-types function constructorsEqual(a: object, b: object) { return a.constructor === b.constructor || a.constructor === Object && !b.constructor || diff --git a/ext/node/polyfills/internal/async_hooks.ts b/ext/node/polyfills/internal/async_hooks.ts index 5716ac4ad..339f62b7f 100644 --- a/ext/node/polyfills/internal/async_hooks.ts +++ b/ext/node/polyfills/internal/async_hooks.ts @@ -54,7 +54,6 @@ const active_hooks: ActiveHooks = { export const registerDestroyHook = async_wrap.registerDestroyHook; const { - // deno-lint-ignore camelcase async_hook_fields, // deno-lint-ignore camelcase asyncIdFields: async_id_fields, diff --git a/ext/node/polyfills/internal/crypto/random.ts b/ext/node/polyfills/internal/crypto/random.ts index 62e564801..a02d232e8 100644 --- a/ext/node/polyfills/internal/crypto/random.ts +++ b/ext/node/polyfills/internal/crypto/random.ts @@ -2,7 +2,7 @@ // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. // TODO(petamoriken): enable prefer-primordials for node polyfills -// deno-lint-ignore-file camelcase prefer-primordials +// deno-lint-ignore-file prefer-primordials import { notImplemented } from "ext:deno_node/_utils.ts"; import randomBytes from "ext:deno_node/internal/crypto/_randomBytes.ts"; @@ -32,6 +32,9 @@ export { } from "ext:deno_node/internal/crypto/_randomFill.ts"; export { default as randomInt } from "ext:deno_node/internal/crypto/_randomInt.ts"; +const primordials = globalThis.__bootstrap.primordials; +const { StringPrototypePadStart, StringPrototypeToString } = primordials; + const { core } = globalThis.__bootstrap; const { ops } = core; const { @@ -286,8 +289,8 @@ function unsignedBigIntToBuffer(bigint: bigint, name: string) { throw new ERR_OUT_OF_RANGE(name, ">= 0", bigint); } - const hex = bigint.toString(16); - const padded = hex.padStart(hex.length + (hex.length % 2), 0); + const hex = StringPrototypeToString(bigint, 16); + const padded = StringPrototypePadStart(hex, hex.length + (hex.length % 2), 0); return Buffer.from(padded, "hex"); } diff --git a/ext/node/polyfills/internal_binding/cares_wrap.ts b/ext/node/polyfills/internal_binding/cares_wrap.ts index 130b1085f..a628f5fd0 100644 --- a/ext/node/polyfills/internal_binding/cares_wrap.ts +++ b/ext/node/polyfills/internal_binding/cares_wrap.ts @@ -34,7 +34,6 @@ import { AsyncWrap, providerType, } from "ext:deno_node/internal_binding/async_wrap.ts"; -// deno-lint-ignore camelcase import { ares_strerror } from "ext:deno_node/internal_binding/ares.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; import { isWindows } from "ext:deno_node/_util/os.ts"; diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts index 8219187ab..a2d355c1e 100644 --- a/ext/node/polyfills/internal_binding/util.ts +++ b/ext/node/polyfills/internal_binding/util.ts @@ -85,7 +85,6 @@ export function isArrayIndex(value: unknown): value is number | string { } export function getOwnNonIndexProperties( - // deno-lint-ignore ban-types obj: object, filter: number, ): (string | symbol)[] { |