diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-06-27 15:18:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 15:18:22 +0900 |
commit | e16b74d792c8fcdb46ab231575fc75f29d4d7fe7 (patch) | |
tree | dd3e21da57213ba623e287bc804c8014e00de6e2 /ext/node/polyfills/internal_binding | |
parent | 814edcdd570b3fbef2001f7e6434320743a8f834 (diff) |
chore(ext/node): disable prefer-primordials on a per-file basis (#19553)
Diffstat (limited to 'ext/node/polyfills/internal_binding')
19 files changed, 65 insertions, 0 deletions
diff --git a/ext/node/polyfills/internal_binding/_listen.ts b/ext/node/polyfills/internal_binding/_listen.ts index d801b0548..ae22c22cf 100644 --- a/ext/node/polyfills/internal_binding/_listen.ts +++ b/ext/node/polyfills/internal_binding/_listen.ts @@ -1,4 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + /** * @param n Number to act on. * @return The number rounded up to the nearest power of 2. diff --git a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts index 8ac64d2ea..3857027b6 100644 --- a/ext/node/polyfills/internal_binding/_timingSafeEqual.ts +++ b/ext/node/polyfills/internal_binding/_timingSafeEqual.ts @@ -1,4 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { Buffer } from "ext:deno_node/buffer.ts"; function assert(cond) { diff --git a/ext/node/polyfills/internal_binding/_utils.ts b/ext/node/polyfills/internal_binding/_utils.ts index d21f46ef1..d543fd372 100644 --- a/ext/node/polyfills/internal_binding/_utils.ts +++ b/ext/node/polyfills/internal_binding/_utils.ts @@ -1,4 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { forgivingBase64Decode, forgivingBase64UrlEncode, diff --git a/ext/node/polyfills/internal_binding/async_wrap.ts b/ext/node/polyfills/internal_binding/async_wrap.ts index c8df985cd..5c4f1e4a9 100644 --- a/ext/node/polyfills/internal_binding/async_wrap.ts +++ b/ext/node/polyfills/internal_binding/async_wrap.ts @@ -25,6 +25,9 @@ // - https://github.com/nodejs/node/blob/master/src/async_wrap.cc // - https://github.com/nodejs/node/blob/master/src/async_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + export function registerDestroyHook( // deno-lint-ignore no-explicit-any _target: any, diff --git a/ext/node/polyfills/internal_binding/buffer.ts b/ext/node/polyfills/internal_binding/buffer.ts index 3796b5da0..ed3bbf31a 100644 --- a/ext/node/polyfills/internal_binding/buffer.ts +++ b/ext/node/polyfills/internal_binding/buffer.ts @@ -1,4 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { Encodings } from "ext:deno_node/internal_binding/_node.ts"; export function indexOfNeedle( diff --git a/ext/node/polyfills/internal_binding/cares_wrap.ts b/ext/node/polyfills/internal_binding/cares_wrap.ts index 0a7345a3d..130b1085f 100644 --- a/ext/node/polyfills/internal_binding/cares_wrap.ts +++ b/ext/node/polyfills/internal_binding/cares_wrap.ts @@ -24,6 +24,9 @@ // - https://github.com/nodejs/node/blob/master/src/cares_wrap.cc // - https://github.com/nodejs/node/blob/master/src/cares_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import type { ErrnoException } from "ext:deno_node/internal/errors.ts"; import { isIPv4 } from "ext:deno_node/internal/net.ts"; import { codeMap } from "ext:deno_node/internal_binding/uv.ts"; diff --git a/ext/node/polyfills/internal_binding/connection_wrap.ts b/ext/node/polyfills/internal_binding/connection_wrap.ts index 493d3c102..adf646884 100644 --- a/ext/node/polyfills/internal_binding/connection_wrap.ts +++ b/ext/node/polyfills/internal_binding/connection_wrap.ts @@ -24,6 +24,9 @@ // - https://github.com/nodejs/node/blob/master/src/connection_wrap.cc // - https://github.com/nodejs/node/blob/master/src/connection_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { AsyncWrap, diff --git a/ext/node/polyfills/internal_binding/handle_wrap.ts b/ext/node/polyfills/internal_binding/handle_wrap.ts index 9ba495edb..da62d297b 100644 --- a/ext/node/polyfills/internal_binding/handle_wrap.ts +++ b/ext/node/polyfills/internal_binding/handle_wrap.ts @@ -1,3 +1,6 @@ +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and other Node contributors. // @@ -24,6 +27,9 @@ // - https://github.com/nodejs/node/blob/master/src/handle_wrap.cc // - https://github.com/nodejs/node/blob/master/src/handle_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { AsyncWrap, diff --git a/ext/node/polyfills/internal_binding/mod.ts b/ext/node/polyfills/internal_binding/mod.ts index 466840098..7ed3d8e4f 100644 --- a/ext/node/polyfills/internal_binding/mod.ts +++ b/ext/node/polyfills/internal_binding/mod.ts @@ -1,4 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import * as asyncWrap from "ext:deno_node/internal_binding/async_wrap.ts"; import * as buffer from "ext:deno_node/internal_binding/buffer.ts"; import * as caresWrap from "ext:deno_node/internal_binding/cares_wrap.ts"; diff --git a/ext/node/polyfills/internal_binding/node_file.ts b/ext/node/polyfills/internal_binding/node_file.ts index c81a7d830..993eca318 100644 --- a/ext/node/polyfills/internal_binding/node_file.ts +++ b/ext/node/polyfills/internal_binding/node_file.ts @@ -25,6 +25,9 @@ // - https://github.com/nodejs/node/blob/master/src/node_file.cc // - https://github.com/nodejs/node/blob/master/src/node_file.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { assert } from "ext:deno_node/_util/asserts.ts"; import * as io from "ext:deno_io/12_io.js"; import * as fs from "ext:deno_fs/30_fs.js"; diff --git a/ext/node/polyfills/internal_binding/node_options.ts b/ext/node/polyfills/internal_binding/node_options.ts index 6109cf6db..5eb0a8874 100644 --- a/ext/node/polyfills/internal_binding/node_options.ts +++ b/ext/node/polyfills/internal_binding/node_options.ts @@ -25,6 +25,9 @@ // - https://github.com/nodejs/node/blob/master/src/node_options.cc // - https://github.com/nodejs/node/blob/master/src/node_options.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + export function getOptions() { // TODO(kt3k): Return option arguments as parsed object return { options: new Map() }; diff --git a/ext/node/polyfills/internal_binding/pipe_wrap.ts b/ext/node/polyfills/internal_binding/pipe_wrap.ts index aa1248781..98aedf80b 100644 --- a/ext/node/polyfills/internal_binding/pipe_wrap.ts +++ b/ext/node/polyfills/internal_binding/pipe_wrap.ts @@ -24,6 +24,9 @@ // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.cc // - https://github.com/nodejs/node/blob/master/src/pipe_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { notImplemented } from "ext:deno_node/_utils.ts"; import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { ConnectionWrap } from "ext:deno_node/internal_binding/connection_wrap.ts"; diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 40c72bb8f..093094a6a 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -27,6 +27,9 @@ // - https://github.com/nodejs/node/blob/master/src/stream_wrap.h // - https://github.com/nodejs/node/blob/master/src/stream_wrap.cc +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Buffer } from "ext:deno_node/buffer.ts"; import { notImplemented } from "ext:deno_node/_utils.ts"; diff --git a/ext/node/polyfills/internal_binding/symbols.ts b/ext/node/polyfills/internal_binding/symbols.ts index affa86fbe..a1ad3de35 100644 --- a/ext/node/polyfills/internal_binding/symbols.ts +++ b/ext/node/polyfills/internal_binding/symbols.ts @@ -23,5 +23,8 @@ // This module ports: // - https://github.com/nodejs/node/blob/master/src/node_symbols.cc +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + export const asyncIdSymbol: unique symbol = Symbol("asyncIdSymbol"); export const ownerSymbol: unique symbol = Symbol("ownerSymbol"); diff --git a/ext/node/polyfills/internal_binding/tcp_wrap.ts b/ext/node/polyfills/internal_binding/tcp_wrap.ts index 6f571c72c..3725b6325 100644 --- a/ext/node/polyfills/internal_binding/tcp_wrap.ts +++ b/ext/node/polyfills/internal_binding/tcp_wrap.ts @@ -24,6 +24,9 @@ // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.cc // - https://github.com/nodejs/node/blob/master/src/tcp_wrap.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { notImplemented } from "ext:deno_node/_utils.ts"; import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { ConnectionWrap } from "ext:deno_node/internal_binding/connection_wrap.ts"; diff --git a/ext/node/polyfills/internal_binding/types.ts b/ext/node/polyfills/internal_binding/types.ts index d03c342ad..28cf395f8 100644 --- a/ext/node/polyfills/internal_binding/types.ts +++ b/ext/node/polyfills/internal_binding/types.ts @@ -21,6 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + const { core } = globalThis.__bootstrap; // https://tc39.es/ecma262/#sec-object.prototype.tostring diff --git a/ext/node/polyfills/internal_binding/udp_wrap.ts b/ext/node/polyfills/internal_binding/udp_wrap.ts index 2b25ccb42..870a5d479 100644 --- a/ext/node/polyfills/internal_binding/udp_wrap.ts +++ b/ext/node/polyfills/internal_binding/udp_wrap.ts @@ -20,6 +20,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + const core = globalThis.Deno.core; const ops = core.ops; import { diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts index f2d23d4f3..8219187ab 100644 --- a/ext/node/polyfills/internal_binding/util.ts +++ b/ext/node/polyfills/internal_binding/util.ts @@ -25,6 +25,9 @@ // - https://github.com/nodejs/node/blob/master/src/util.cc // - https://github.com/nodejs/node/blob/master/src/util.h +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { notImplemented } from "ext:deno_node/_utils.ts"; export function guessHandleType(_fd: number): string { diff --git a/ext/node/polyfills/internal_binding/uv.ts b/ext/node/polyfills/internal_binding/uv.ts index bc295fa65..c08d44565 100644 --- a/ext/node/polyfills/internal_binding/uv.ts +++ b/ext/node/polyfills/internal_binding/uv.ts @@ -26,6 +26,9 @@ // // See also: http://docs.libuv.org/en/v1.x/errors.html#error-constants +// TODO(petamoriken): enable prefer-primordials for node polyfills +// deno-lint-ignore-file prefer-primordials + import { unreachable } from "ext:deno_node/_util/asserts.ts"; import { osType } from "ext:deno_node/_util/os.ts"; import { uvTranslateSysError } from "ext:deno_node/internal_binding/_libuv_winerror.ts"; |