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 | |
parent | 01a761f1d4f7ff4943fbf80464a276b434d8a8f7 (diff) |
feat: support import attributes (#20342)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/cache/01_cache.js | 1 | ||||
-rw-r--r-- | ext/fs/30_fs.js | 2 | ||||
-rw-r--r-- | ext/http/00_serve.js | 2 | ||||
-rw-r--r-- | ext/http/01_http.js | 2 | ||||
-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 | ||||
-rw-r--r-- | ext/web/02_timers.js | 2 | ||||
-rw-r--r-- | ext/web/06_streams.js | 1 | ||||
-rw-r--r-- | ext/webidl/00_webidl.js | 2 | ||||
-rw-r--r-- | ext/webidl/internal.d.ts | 2 | ||||
-rw-r--r-- | ext/websocket/01_websocket.js | 4 | ||||
-rw-r--r-- | ext/websocket/02_websocketstream.js | 1 |
16 files changed, 9 insertions, 24 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index 2ed8a50a2..99daa4d42 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -1,5 +1,4 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase const core = globalThis.Deno.core; import * as webidl from "ext:deno_webidl/00_webidl.js"; const primordials = globalThis.__bootstrap.primordials; diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index 9c3bee6ac..d2a656a23 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -1,7 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase - const core = globalThis.Deno.core; const ops = core.ops; const { diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index 7307ab2d8..914205889 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase + const core = globalThis.Deno.core; const primordials = globalThis.__bootstrap.primordials; const internals = globalThis.__bootstrap.internals; diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 55c9a77ee..705e616e4 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -1,7 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase - const core = globalThis.Deno.core; const internals = globalThis.__bootstrap.internals; const primordials = globalThis.__bootstrap.primordials; 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)[] { diff --git a/ext/web/02_timers.js b/ext/web/02_timers.js index ade1c7123..aa7e74673 100644 --- a/ext/web/02_timers.js +++ b/ext/web/02_timers.js @@ -1,7 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase - const core = globalThis.Deno.core; const ops = core.ops; const primordials = globalThis.__bootstrap.primordials; diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js index 9dde03b7f..0f5954672 100644 --- a/ext/web/06_streams.js +++ b/ext/web/06_streams.js @@ -1,5 +1,4 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase // @ts-check /// <reference path="../webidl/internal.d.ts" /> diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js index e5726d1f8..a532c5ac4 100644 --- a/ext/webidl/00_webidl.js +++ b/ext/webidl/00_webidl.js @@ -36,9 +36,7 @@ const { Number, NumberIsFinite, NumberIsNaN, - // deno-lint-ignore camelcase NumberMAX_SAFE_INTEGER, - // deno-lint-ignore camelcase NumberMIN_SAFE_INTEGER, ObjectAssign, ObjectCreate, diff --git a/ext/webidl/internal.d.ts b/ext/webidl/internal.d.ts index 3e133cc06..38f176ab2 100644 --- a/ext/webidl/internal.d.ts +++ b/ext/webidl/internal.d.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file no-explicit-any ban-types +// deno-lint-ignore-file no-explicit-any /// <reference no-default-lib="true" /> /// <reference lib="esnext" /> diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index bb1624f22..5f0f648a7 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -1,6 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase /// <reference path="../../core/internal.d.ts" /> const core = globalThis.Deno.core; @@ -46,8 +45,7 @@ const { SymbolFor, TypedArrayPrototypeGetByteLength, } = primordials; -const op_ws_check_permission_and_cancel_handle = - core.ops.op_ws_check_permission_and_cancel_handle; +const { op_ws_check_permission_and_cancel_handle } = core.ops; const { op_ws_create, op_ws_close, diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index 281025289..f4f866c6b 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -1,6 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// deno-lint-ignore-file camelcase /// <reference path="../../core/internal.d.ts" /> const core = globalThis.Deno.core; |