From 2a19d4b59f23ee7e2e7c5e27d3935a799f94b0f7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 14 Apr 2020 16:03:15 -0400 Subject: [PATCH] lint --- cli/rt.js | 654 ++++++++++++++++++++++++---------------------------- cli/tsrt.js | 375 +++++++++++++----------------- 2 files changed, 463 insertions(+), 566 deletions(-) diff --git a/cli/rt.js b/cli/rt.js index 6a8d7862a65982..0b77aadc79fa6e 100644 --- a/cli/rt.js +++ b/cli/rt.js @@ -2,8 +2,8 @@ System.register("$deno$/io.ts", [], function (exports_1, context_1) { "use strict"; - var EOF, SeekMode; - var __moduleName = context_1 && context_1.id; + let EOF, SeekMode; + const __moduleName = context_1 && context_1.id; // https://golang.org/pkg/io/#Copy async function copy(dst, src) { let n = 0; @@ -57,8 +57,8 @@ System.register("$deno$/io.ts", [], function (exports_1, context_1) { // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/util.ts", [], function (exports_2, context_2) { "use strict"; - var logDebug, logSource; - var __moduleName = context_2 && context_2.id; + let logDebug, logSource; + const __moduleName = context_2 && context_2.id; // @internal function setLogDebug(debug, source) { logDebug = debug; @@ -127,8 +127,8 @@ System.register("$deno$/util.ts", [], function (exports_2, context_2) { // Copyright (c) 2014 Jameson Little. MIT License. System.register("$deno$/web/base64.ts", [], function (exports_3, context_3) { "use strict"; - var lookup, revLookup, code; - var __moduleName = context_3 && context_3.id; + let lookup, revLookup, code; + const __moduleName = context_3 && context_3.id; function getLens(b64) { const len = b64.length; if (len % 4 > 0) { @@ -286,7 +286,7 @@ System.register("$deno$/web/decode_utf8.ts", [], function ( context_4 ) { "use strict"; - var __moduleName = context_4 && context_4.id; + const __moduleName = context_4 && context_4.id; function decodeUtf8(input, fatal, ignoreBOM) { let outString = ""; // Prepare a buffer so that we don't have to do a lot of string concats, which @@ -382,14 +382,13 @@ System.register("$deno$/web/decode_utf8.ts", [], function ( // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/core.ts", [], function (exports_5, context_5) { "use strict"; - var core; - var __moduleName = context_5 && context_5.id; + const __moduleName = context_5 && context_5.id; return { setters: [], execute: function () { // This allows us to access core in API even if we // dispose window.Deno - exports_5("core", (core = globalThis.Deno.core)); + exports_5("core", globalThis.Deno.core); }, }; }); @@ -422,7 +421,7 @@ System.register( ["$deno$/web/base64.ts", "$deno$/web/decode_utf8.ts", "$deno$/core.ts"], function (exports_6, context_6) { "use strict"; - var base64, + let base64, decode_utf8_ts_1, core_ts_1, CONTINUE, @@ -437,7 +436,7 @@ System.register( Stream, TextDecoder, TextEncoder; - var __moduleName = context_6 && context_6.id; + const __moduleName = context_6 && context_6.id; function decoderError(fatal) { if (fatal) { throw new TypeError("Decoder error."); @@ -949,8 +948,8 @@ System.register( ["$deno$/io.ts", "$deno$/util.ts", "$deno$/web/text_encoding.ts"], function (exports_7, context_7) { "use strict"; - var io_ts_1, util_ts_1, text_encoding_ts_1, MIN_READ, MAX_SIZE, Buffer; - var __moduleName = context_7 && context_7.id; + let io_ts_1, util_ts_1, text_encoding_ts_1, MIN_READ, MAX_SIZE, Buffer; + const __moduleName = context_7 && context_7.id; // `off` is the offset into `dst` where it will at which to begin writing values // from `src`. // Returns the number of bytes copied. @@ -1174,8 +1173,8 @@ System.register( // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/build.ts", [], function (exports_8, context_8) { "use strict"; - var build; - var __moduleName = context_8 && context_8.id; + let build; + const __moduleName = context_8 && context_8.id; function setBuildInfo(os, arch) { build.os = os; build.arch = arch; @@ -1198,7 +1197,7 @@ System.register("$deno$/build.ts", [], function (exports_8, context_8) { // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/errors.ts", [], function (exports_9, context_9) { "use strict"; - var ErrorKind, + let ErrorKind, NotFound, PermissionDenied, ConnectionRefused, @@ -1215,9 +1214,8 @@ System.register("$deno$/errors.ts", [], function (exports_9, context_9) { WriteZero, UnexpectedEof, BadResource, - Http, - errors; - var __moduleName = context_9 && context_9.id; + Http; + const __moduleName = context_9 && context_9.id; function getErrorClass(kind) { switch (kind) { case ErrorKind.TypeError: @@ -1393,28 +1391,25 @@ System.register("$deno$/errors.ts", [], function (exports_9, context_9) { this.name = "Http"; } }; - exports_9( - "errors", - (errors = { - NotFound: NotFound, - PermissionDenied: PermissionDenied, - ConnectionRefused: ConnectionRefused, - ConnectionReset: ConnectionReset, - ConnectionAborted: ConnectionAborted, - NotConnected: NotConnected, - AddrInUse: AddrInUse, - AddrNotAvailable: AddrNotAvailable, - BrokenPipe: BrokenPipe, - AlreadyExists: AlreadyExists, - InvalidData: InvalidData, - TimedOut: TimedOut, - Interrupted: Interrupted, - WriteZero: WriteZero, - UnexpectedEof: UnexpectedEof, - BadResource: BadResource, - Http: Http, - }) - ); + exports_9("errors", { + NotFound: NotFound, + PermissionDenied: PermissionDenied, + ConnectionRefused: ConnectionRefused, + ConnectionReset: ConnectionReset, + ConnectionAborted: ConnectionAborted, + NotConnected: NotConnected, + AddrInUse: AddrInUse, + AddrNotAvailable: AddrNotAvailable, + BrokenPipe: BrokenPipe, + AlreadyExists: AlreadyExists, + InvalidData: InvalidData, + TimedOut: TimedOut, + Interrupted: Interrupted, + WriteZero: WriteZero, + UnexpectedEof: UnexpectedEof, + BadResource: BadResource, + Http: Http, + }); }, }; }); @@ -1428,7 +1423,7 @@ System.register( ], function (exports_10, context_10) { "use strict"; - var util, + let util, core_ts_2, text_encoding_ts_2, errors_ts_1, @@ -1437,7 +1432,7 @@ System.register( decoder, scratch32, scratchBytes; - var __moduleName = context_10 && context_10.id; + const __moduleName = context_10 && context_10.id; function nextPromiseId() { return _nextPromiseId++; } @@ -1545,8 +1540,8 @@ System.register( ); System.register("$deno$/version.ts", [], function (exports_11, context_11) { "use strict"; - var version; - var __moduleName = context_11 && context_11.id; + let version; + const __moduleName = context_11 && context_11.id; function setVersions(denoVersion, v8Version, tsVersion) { version.deno = denoVersion; version.v8 = v8Version; @@ -1574,8 +1569,8 @@ System.register("$deno$/colors.ts", ["$deno$/deno.ts"], function ( context_12 ) { "use strict"; - var deno_ts_1, enabled, ANSI_PATTERN; - var __moduleName = context_12 && context_12.id; + let deno_ts_1, enabled, ANSI_PATTERN; + const __moduleName = context_12 && context_12.id; function code(open, close) { return { open: `\x1b[${open}m`, @@ -1650,8 +1645,8 @@ System.register("$deno$/colors.ts", ["$deno$/deno.ts"], function ( // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/diagnostics.ts", [], function (exports_13, context_13) { "use strict"; - var DiagnosticCategory; - var __moduleName = context_13 && context_13.id; + let DiagnosticCategory; + const __moduleName = context_13 && context_13.id; return { setters: [], execute: function () { @@ -1676,8 +1671,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_14, context_14) { "use strict"; - var dispatch_json_ts_1; - var __moduleName = context_14 && context_14.id; + let dispatch_json_ts_1; + const __moduleName = context_14 && context_14.id; function formatDiagnostics(items) { return dispatch_json_ts_1.sendSync("op_format_diagnostic", { items }); } @@ -1708,8 +1703,8 @@ System.register( ); System.register("$deno$/internals.ts", [], function (exports_15, context_15) { "use strict"; - var internalSymbol, internalObject; - var __moduleName = context_15 && context_15.id; + let internalObject; + const __moduleName = context_15 && context_15.id; // Register a field to internalObject for test access, // through Deno[Deno.symbols.internal][name]. // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -1724,7 +1719,7 @@ System.register("$deno$/internals.ts", [], function (exports_15, context_15) { setters: [], execute: function () { // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - exports_15("internalSymbol", (internalSymbol = Symbol("Deno.internal"))); + exports_15("internalSymbol", Symbol("Deno.internal")); // The object where all the internal fields for testing will be living. // eslint-disable-next-line @typescript-eslint/no-explicit-any exports_15("internalObject", (internalObject = {})); @@ -1741,8 +1736,8 @@ System.register( ], function (exports_16, context_16) { "use strict"; - var colors, errors_ts_2, util_ts_2, internals_ts_1; - var __moduleName = context_16 && context_16.id; + let colors, errors_ts_2, util_ts_2, internals_ts_1; + const __moduleName = context_16 && context_16.id; function patchCallSite(callSite, location) { return { getThis() { @@ -1993,8 +1988,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_17, context_17) { "use strict"; - var dispatch_json_ts_2; - var __moduleName = context_17 && context_17.id; + let dispatch_json_ts_2; + const __moduleName = context_17 && context_17.id; function start() { return dispatch_json_ts_2.sendSync("op_start"); } @@ -2018,8 +2013,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_18, context_18) { "use strict"; - var dispatch_json_ts_3; - var __moduleName = context_18 && context_18.id; + let dispatch_json_ts_3; + const __moduleName = context_18 && context_18.id; function stopGlobalTimer() { dispatch_json_ts_3.sendSync("op_global_timer_stop"); } @@ -2048,8 +2043,8 @@ System.register("$deno$/rbtree.ts", ["$deno$/util.ts"], function ( context_19 ) { "use strict"; - var util_ts_3, RBNode, RBTree; - var __moduleName = context_19 && context_19.id; + let util_ts_3, RBNode, RBTree; + const __moduleName = context_19 && context_19.id; function isRed(node) { return node !== null && node.red; } @@ -2270,7 +2265,7 @@ System.register( ["$deno$/util.ts", "$deno$/ops/timers.ts", "$deno$/rbtree.ts"], function (exports_20, context_20) { "use strict"; - var util_ts_4, + let util_ts_4, timers_ts_1, rbtree_ts_1, console, @@ -2281,7 +2276,7 @@ System.register( dueTree, pendingEvents, pendingFireTimers; - var __moduleName = context_20 && context_20.id; + const __moduleName = context_20 && context_20.id; function clearGlobalTimeout() { globalTimeoutDue = null; timers_ts_1.stopGlobalTimer(); @@ -2551,7 +2546,7 @@ System.register( ], function (exports_21, context_21) { "use strict"; - var core_ts_3, + let core_ts_3, dispatchMinimal, dispatchJson, util, @@ -2561,7 +2556,7 @@ System.register( runtime_ts_1, timers_ts_2, OPS_CACHE; - var __moduleName = context_21 && context_21.id; + const __moduleName = context_21 && context_21.id; function getAsyncHandler(opName) { switch (opName) { case "op_write": @@ -2633,13 +2628,13 @@ System.register( ["$deno$/util.ts", "$deno$/core.ts", "$deno$/runtime.ts", "$deno$/errors.ts"], function (exports_22, context_22) { "use strict"; - var util, + let util, core_ts_4, runtime_ts_2, errors_ts_3, promiseTable, _nextPromiseId; - var __moduleName = context_22 && context_22.id; + const __moduleName = context_22 && context_22.id; function nextPromiseId() { return _nextPromiseId++; } @@ -2726,8 +2721,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_23, context_23) { "use strict"; - var dispatch_json_ts_4; - var __moduleName = context_23 && context_23.id; + let dispatch_json_ts_4; + const __moduleName = context_23 && context_23.id; function chmodSync(path, mode) { dispatch_json_ts_4.sendSync("op_chmod", { path, mode }); } @@ -2751,8 +2746,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_24, context_24) { "use strict"; - var dispatch_json_ts_5; - var __moduleName = context_24 && context_24.id; + let dispatch_json_ts_5; + const __moduleName = context_24 && context_24.id; function chownSync(path, uid, gid) { dispatch_json_ts_5.sendSync("op_chown", { path, uid, gid }); } @@ -2777,8 +2772,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_25, context_25) { "use strict"; - var dispatch_json_ts_6; - var __moduleName = context_25 && context_25.id; + let dispatch_json_ts_6; + const __moduleName = context_25 && context_25.id; function compile(request) { return dispatch_json_ts_6.sendAsync("op_compile", request); } @@ -2803,8 +2798,8 @@ System.register( ["$deno$/util.ts", "$deno$/ops/runtime_compiler.ts"], function (exports_26, context_26) { "use strict"; - var util, runtimeCompilerOps; - var __moduleName = context_26 && context_26.id; + let util, runtimeCompilerOps; + const __moduleName = context_26 && context_26.id; function checkRelative(specifier) { return specifier.match(/^([\.\/\\]|https?:\/{2}|file:\/{2})/) ? specifier @@ -2871,7 +2866,7 @@ System.register( // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. System.register("$deno$/web/util.ts", [], function (exports_27, context_27) { "use strict"; - var __moduleName = context_27 && context_27.id; + const __moduleName = context_27 && context_27.id; // @internal function isTypedArray(x) { return ( @@ -2949,8 +2944,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_28, context_28) { "use strict"; - var dispatch_json_ts_7; - var __moduleName = context_28 && context_28.id; + let dispatch_json_ts_7; + const __moduleName = context_28 && context_28.id; function resources() { const res = dispatch_json_ts_7.sendSync("op_resources"); const resources = {}; @@ -2980,8 +2975,8 @@ System.register( ["$deno$/ops/dispatch_minimal.ts", "$deno$/io.ts", "$deno$/runtime.ts"], function (exports_29, context_29) { "use strict"; - var dispatch_minimal_ts_1, io_ts_2, runtime_ts_3, OP_READ, OP_WRITE; - var __moduleName = context_29 && context_29.id; + let dispatch_minimal_ts_1, io_ts_2, runtime_ts_3, OP_READ, OP_WRITE; + const __moduleName = context_29 && context_29.id; function readSync(rid, buffer) { if (buffer.length == 0) { return 0; @@ -3073,8 +3068,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_30, context_30) { "use strict"; - var dispatch_json_ts_8; - var __moduleName = context_30 && context_30.id; + let dispatch_json_ts_8; + const __moduleName = context_30 && context_30.id; function seekSync(rid, offset, whence) { return dispatch_json_ts_8.sendSync("op_seek", { rid, offset, whence }); } @@ -3098,8 +3093,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_31, context_31) { "use strict"; - var dispatch_json_ts_9; - var __moduleName = context_31 && context_31.id; + let dispatch_json_ts_9; + const __moduleName = context_31 && context_31.id; function openSync(path, openMode, options) { const mode = options?.mode; return dispatch_json_ts_9.sendSync("op_open", { @@ -3140,15 +3135,8 @@ System.register( ], function (exports_32, context_32) { "use strict"; - var resources_ts_1, - io_ts_3, - seek_ts_1, - open_ts_1, - File, - stdin, - stdout, - stderr; - var __moduleName = context_32 && context_32.id; + let resources_ts_1, io_ts_3, seek_ts_1, open_ts_1, File; + const __moduleName = context_32 && context_32.id; /**@internal*/ function openSync(path, modeOrOptions = "r") { let openMode = undefined; @@ -3248,9 +3236,9 @@ System.register( } }; exports_32("File", File); - exports_32("stdin", (stdin = new File(0))); - exports_32("stdout", (stdout = new File(1))); - exports_32("stderr", (stderr = new File(2))); + exports_32("stdin", new File(0)); + exports_32("stdout", new File(1)); + exports_32("stderr", new File(2)); }, }; } @@ -3262,8 +3250,8 @@ System.register( ["$deno$/web/text_encoding.ts", "$deno$/web/util.ts"], function (exports_33, context_33) { "use strict"; - var text_encoding_ts_3, util_ts_5, encoder, tableChars, colorRegExp; - var __moduleName = context_33 && context_33.id; + let text_encoding_ts_3, util_ts_5, encoder, tableChars, colorRegExp; + const __moduleName = context_33 && context_33.id; function removeColors(str) { return str.replace(colorRegExp, ""); } @@ -3355,8 +3343,8 @@ System.register( ); System.register("$deno$/web/promise.ts", [], function (exports_34, context_34) { "use strict"; - var PromiseState; - var __moduleName = context_34 && context_34.id; + let PromiseState; + const __moduleName = context_34 && context_34.id; return { setters: [], execute: function () { @@ -3381,7 +3369,7 @@ System.register( ], function (exports_35, context_35) { "use strict"; - var _a, + let _a, util_ts_6, text_encoding_ts_4, files_ts_1, @@ -3408,7 +3396,7 @@ System.register( isConsoleInstance, Console, customInspect; - var __moduleName = context_35 && context_35.id; + const __moduleName = context_35 && context_35.id; /* eslint-disable @typescript-eslint/no-use-before-define */ function cursorTo(stream, _x, _y) { const uint8 = new text_encoding_ts_4.TextEncoder().encode(CSI.kClear); @@ -4222,8 +4210,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_36, context_36) { "use strict"; - var dispatch_json_ts_10; - var __moduleName = context_36 && context_36.id; + let dispatch_json_ts_10; + const __moduleName = context_36 && context_36.id; function copyFileSync(fromPath, toPath) { dispatch_json_ts_10.sendSync("op_copy_file", { from: fromPath, @@ -4253,8 +4241,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_37, context_37) { "use strict"; - var dispatch_json_ts_11; - var __moduleName = context_37 && context_37.id; + let dispatch_json_ts_11; + const __moduleName = context_37 && context_37.id; function cwd() { return dispatch_json_ts_11.sendSync("op_cwd"); } @@ -4278,8 +4266,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/file_info.ts"], function (exports_38, context_38) { "use strict"; - var dispatch_json_ts_12, file_info_ts_1; - var __moduleName = context_38 && context_38.id; + let dispatch_json_ts_12, file_info_ts_1; + const __moduleName = context_38 && context_38.id; async function lstat(path) { const res = await dispatch_json_ts_12.sendAsync("op_stat", { path, @@ -4330,8 +4318,8 @@ System.register("$deno$/file_info.ts", ["$deno$/build.ts"], function ( context_39 ) { "use strict"; - var build_ts_2, FileInfoImpl; - var __moduleName = context_39 && context_39.id; + let build_ts_2, FileInfoImpl; + const __moduleName = context_39 && context_39.id; return { setters: [ function (build_ts_2_1) { @@ -4402,8 +4390,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/ops/resources.ts"], function (exports_40, context_40) { "use strict"; - var dispatch_json_ts_13, resources_ts_2, FsEvents; - var __moduleName = context_40 && context_40.id; + let dispatch_json_ts_13, resources_ts_2, FsEvents; + const __moduleName = context_40 && context_40.id; function fsEvents(paths, options = { recursive: true }) { return new FsEvents(Array.isArray(paths) ? paths : [paths], options); } @@ -4448,8 +4436,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_41, context_41) { "use strict"; - var dispatch_json_ts_14; - var __moduleName = context_41 && context_41.id; + let dispatch_json_ts_14; + const __moduleName = context_41 && context_41.id; function linkSync(oldpath, newpath) { dispatch_json_ts_14.sendSync("op_link", { oldpath, newpath }); } @@ -4473,8 +4461,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_42, context_42) { "use strict"; - var dispatch_json_ts_15; - var __moduleName = context_42 && context_42.id; + let dispatch_json_ts_15; + const __moduleName = context_42 && context_42.id; function makeTempDirSync(options = {}) { return dispatch_json_ts_15.sendSync("op_make_temp_dir", options); } @@ -4506,8 +4494,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_43, context_43) { "use strict"; - var dispatch_json_ts_16; - var __moduleName = context_43 && context_43.id; + let dispatch_json_ts_16; + const __moduleName = context_43 && context_43.id; function mkdirArgs(path, options) { const args = { path, recursive: false }; if (options) { @@ -4543,8 +4531,8 @@ System.register("$deno$/ops/net.ts", ["$deno$/ops/dispatch_json.ts"], function ( context_44 ) { "use strict"; - var dispatch_json_ts_17, ShutdownMode; - var __moduleName = context_44 && context_44.id; + let dispatch_json_ts_17, ShutdownMode; + const __moduleName = context_44 && context_44.id; function shutdown(rid, how) { dispatch_json_ts_17.sendSync("op_shutdown", { rid, how }); } @@ -4601,14 +4589,14 @@ System.register( ], function (exports_45, context_45) { "use strict"; - var errors_ts_4, + let errors_ts_4, io_ts_4, resources_ts_3, netOps, ConnImpl, ListenerImpl, DatagramImpl; - var __moduleName = context_45 && context_45.id; + const __moduleName = context_45 && context_45.id; function listen(options) { let res; if (options.transport === "unix" || options.transport === "unixpacket") { @@ -4761,8 +4749,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/errors.ts"], function (exports_46, context_46) { "use strict"; - var dispatch_json_ts_18, errors_ts_5; - var __moduleName = context_46 && context_46.id; + let dispatch_json_ts_18, errors_ts_5; + const __moduleName = context_46 && context_46.id; function loadavg() { return dispatch_json_ts_18.sendSync("op_loadavg"); } @@ -4832,8 +4820,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_47, context_47) { "use strict"; - var dispatch_json_ts_19; - var __moduleName = context_47 && context_47.id; + let dispatch_json_ts_19; + const __moduleName = context_47 && context_47.id; function query(desc) { return dispatch_json_ts_19.sendSync("op_query_permission", desc).state; } @@ -4861,8 +4849,8 @@ System.register( ["$deno$/ops/permissions.ts"], function (exports_48, context_48) { "use strict"; - var permissionsOps, PermissionStatus, Permissions, permissions; - var __moduleName = context_48 && context_48.id; + let permissionsOps, PermissionStatus, Permissions; + const __moduleName = context_48 && context_48.id; return { setters: [ function (permissionsOps_1) { @@ -4891,7 +4879,7 @@ System.register( } }; exports_48("Permissions", Permissions); - exports_48("permissions", (permissions = new Permissions())); + exports_48("permissions", new Permissions()); }, }; } @@ -4901,8 +4889,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_49, context_49) { "use strict"; - var dispatch_json_ts_20; - var __moduleName = context_49 && context_49.id; + let dispatch_json_ts_20; + const __moduleName = context_49 && context_49.id; function openPlugin(filename) { return dispatch_json_ts_20.sendSync("op_open_plugin", { filename }); } @@ -4922,8 +4910,8 @@ System.register( ["$deno$/ops/plugins.ts", "$deno$/core.ts"], function (exports_50, context_50) { "use strict"; - var plugins_ts_1, core_ts_5, PluginOpImpl, PluginImpl; - var __moduleName = context_50 && context_50.id; + let plugins_ts_1, core_ts_5, PluginOpImpl, PluginImpl; + const __moduleName = context_50 && context_50.id; function openPlugin(filename) { const response = plugins_ts_1.openPlugin(filename); return new PluginImpl(response.rid, response.ops); @@ -4972,8 +4960,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/util.ts", "$deno$/build.ts"], function (exports_51, context_51) { "use strict"; - var dispatch_json_ts_21, util_ts_7, build_ts_3; - var __moduleName = context_51 && context_51.id; + let dispatch_json_ts_21, util_ts_7, build_ts_3; + const __moduleName = context_51 && context_51.id; function kill(pid, signo) { if (build_ts_3.build.os === "win") { throw new Error("Not yet implemented"); @@ -5016,8 +5004,8 @@ System.register( ], function (exports_52, context_52) { "use strict"; - var files_ts_2, resources_ts_4, buffer_ts_1, process_ts_1, Process; - var __moduleName = context_52 && context_52.id; + let files_ts_2, resources_ts_4, buffer_ts_1, process_ts_1, Process; + const __moduleName = context_52 && context_52.id; async function runStatus(rid) { const res = await process_ts_1.runStatus(rid); if (res.gotSignal) { @@ -5124,8 +5112,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/file_info.ts"], function (exports_53, context_53) { "use strict"; - var dispatch_json_ts_22, file_info_ts_2; - var __moduleName = context_53 && context_53.id; + let dispatch_json_ts_22, file_info_ts_2; + const __moduleName = context_53 && context_53.id; function res(response) { return response.entries.map((statRes) => { return new file_info_ts_2.FileInfoImpl(statRes); @@ -5157,8 +5145,8 @@ System.register( ["$deno$/files.ts", "$deno$/buffer.ts"], function (exports_54, context_54) { "use strict"; - var files_ts_3, buffer_ts_2; - var __moduleName = context_54 && context_54.id; + let files_ts_3, buffer_ts_2; + const __moduleName = context_54 && context_54.id; function readFileSync(path) { const file = files_ts_3.openSync(path); const contents = buffer_ts_2.readAllSync(file); @@ -5191,8 +5179,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_55, context_55) { "use strict"; - var dispatch_json_ts_23; - var __moduleName = context_55 && context_55.id; + let dispatch_json_ts_23; + const __moduleName = context_55 && context_55.id; function readlinkSync(path) { return dispatch_json_ts_23.sendSync("op_read_link", { path }); } @@ -5216,8 +5204,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_56, context_56) { "use strict"; - var dispatch_json_ts_24; - var __moduleName = context_56 && context_56.id; + let dispatch_json_ts_24; + const __moduleName = context_56 && context_56.id; function realpathSync(path) { return dispatch_json_ts_24.sendSync("op_realpath", { path }); } @@ -5241,8 +5229,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_57, context_57) { "use strict"; - var dispatch_json_ts_25; - var __moduleName = context_57 && context_57.id; + let dispatch_json_ts_25; + const __moduleName = context_57 && context_57.id; function removeSync(path, options = {}) { dispatch_json_ts_25.sendSync("op_remove", { path, @@ -5272,8 +5260,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_58, context_58) { "use strict"; - var dispatch_json_ts_26; - var __moduleName = context_58 && context_58.id; + let dispatch_json_ts_26; + const __moduleName = context_58 && context_58.id; function renameSync(oldpath, newpath) { dispatch_json_ts_26.sendSync("op_rename", { oldpath, newpath }); } @@ -5297,8 +5285,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_59, context_59) { "use strict"; - var dispatch_json_ts_27; - var __moduleName = context_59 && context_59.id; + let dispatch_json_ts_27; + const __moduleName = context_59 && context_59.id; function bindSignal(signo) { return dispatch_json_ts_27.sendSync("op_signal_bind", { signo }); } @@ -5326,14 +5314,8 @@ System.register( ["$deno$/ops/signal.ts", "$deno$/build.ts"], function (exports_60, context_60) { "use strict"; - var signal_ts_1, - build_ts_4, - LinuxSignal, - MacOSSignal, - Signal, - signals, - SignalStream; - var __moduleName = context_60 && context_60.id; + let signal_ts_1, build_ts_4, LinuxSignal, MacOSSignal, Signal, SignalStream; + const __moduleName = context_60 && context_60.id; function setSignals() { if (build_ts_4.build.os === "mac") { Object.assign(Signal, MacOSSignal); @@ -5428,44 +5410,41 @@ System.register( MacOSSignal[(MacOSSignal["SIGUSR2"] = 31)] = "SIGUSR2"; })(MacOSSignal || (MacOSSignal = {})); exports_60("Signal", (Signal = {})); - exports_60( - "signals", - (signals = { - alarm() { - return signal(Signal.SIGALRM); - }, - child() { - return signal(Signal.SIGCHLD); - }, - hungup() { - return signal(Signal.SIGHUP); - }, - interrupt() { - return signal(Signal.SIGINT); - }, - io() { - return signal(Signal.SIGIO); - }, - pipe() { - return signal(Signal.SIGPIPE); - }, - quit() { - return signal(Signal.SIGQUIT); - }, - terminate() { - return signal(Signal.SIGTERM); - }, - userDefined1() { - return signal(Signal.SIGUSR1); - }, - userDefined2() { - return signal(Signal.SIGUSR2); - }, - windowChange() { - return signal(Signal.SIGWINCH); - }, - }) - ); + exports_60("signals", { + alarm() { + return signal(Signal.SIGALRM); + }, + child() { + return signal(Signal.SIGCHLD); + }, + hungup() { + return signal(Signal.SIGHUP); + }, + interrupt() { + return signal(Signal.SIGINT); + }, + io() { + return signal(Signal.SIGIO); + }, + pipe() { + return signal(Signal.SIGPIPE); + }, + quit() { + return signal(Signal.SIGQUIT); + }, + terminate() { + return signal(Signal.SIGTERM); + }, + userDefined1() { + return signal(Signal.SIGUSR1); + }, + userDefined2() { + return signal(Signal.SIGUSR2); + }, + windowChange() { + return signal(Signal.SIGWINCH); + }, + }); SignalStream = class SignalStream { constructor(signo) { this.#disposed = false; @@ -5514,8 +5493,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/util.ts", "$deno$/build.ts"], function (exports_61, context_61) { "use strict"; - var dispatch_json_ts_28, util, build_ts_5; - var __moduleName = context_61 && context_61.id; + let dispatch_json_ts_28, util, build_ts_5; + const __moduleName = context_61 && context_61.id; function symlinkSync(oldpath, newpath, type) { if (build_ts_5.build.os === "win" && type) { return util.notImplemented(); @@ -5551,8 +5530,8 @@ System.register("$deno$/ops/tls.ts", ["$deno$/ops/dispatch_json.ts"], function ( context_62 ) { "use strict"; - var dispatch_json_ts_29; - var __moduleName = context_62 && context_62.id; + let dispatch_json_ts_29; + const __moduleName = context_62 && context_62.id; function connectTLS(args) { return dispatch_json_ts_29.sendAsync("op_connect_tls", args); } @@ -5579,8 +5558,8 @@ System.register( ["$deno$/ops/tls.ts", "$deno$/net.ts"], function (exports_63, context_63) { "use strict"; - var tlsOps, net_ts_1, TLSListenerImpl; - var __moduleName = context_63 && context_63.id; + let tlsOps, net_ts_1, TLSListenerImpl; + const __moduleName = context_63 && context_63.id; async function connectTLS({ port, hostname = "127.0.0.1", @@ -5642,8 +5621,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_64, context_64) { "use strict"; - var dispatch_json_ts_30; - var __moduleName = context_64 && context_64.id; + let dispatch_json_ts_30; + const __moduleName = context_64 && context_64.id; function coerceLen(len) { if (!len) { return 0; @@ -5682,8 +5661,8 @@ System.register("$deno$/ops/tty.ts", ["$deno$/ops/dispatch_json.ts"], function ( context_65 ) { "use strict"; - var dispatch_json_ts_31; - var __moduleName = context_65 && context_65.id; + let dispatch_json_ts_31; + const __moduleName = context_65 && context_65.id; function isatty(rid) { return dispatch_json_ts_31.sendSync("op_isatty", { rid }); } @@ -5709,8 +5688,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_66, context_66) { "use strict"; - var dispatch_json_ts_32; - var __moduleName = context_66 && context_66.id; + let dispatch_json_ts_32; + const __moduleName = context_66 && context_66.id; function umask(mask) { return dispatch_json_ts_32.sendSync("op_umask", { mask }); } @@ -5730,8 +5709,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_67, context_67) { "use strict"; - var dispatch_json_ts_33; - var __moduleName = context_67 && context_67.id; + let dispatch_json_ts_33; + const __moduleName = context_67 && context_67.id; function toSecondsFromEpoch(v) { return v instanceof Date ? Math.trunc(v.valueOf() / 1000) : v; } @@ -5774,8 +5753,8 @@ System.register( ], function (exports_68, context_68) { "use strict"; - var stat_ts_1, files_ts_4, chmod_ts_1, buffer_ts_3, build_ts_6; - var __moduleName = context_68 && context_68.id; + let stat_ts_1, files_ts_4, chmod_ts_1, buffer_ts_3, build_ts_6; + const __moduleName = context_68 && context_68.id; function writeFileSync(path, data, options = {}) { if (options.create !== undefined) { const create = !!options.create; @@ -5855,7 +5834,7 @@ System.register( ], function (exports_69, context_69) { "use strict"; - var colors_ts_1, + let colors_ts_1, os_ts_1, console_ts_1, files_ts_5, @@ -5871,7 +5850,7 @@ System.register( TEST_REGISTRY, encoder, TestApi; - var __moduleName = context_69 && context_69.id; + const __moduleName = context_69 && context_69.id; function delay(n) { return new Promise((resolve, _) => { setTimeout(resolve, n); @@ -6174,8 +6153,8 @@ System.register( ["$deno$/internals.ts", "$deno$/web/console.ts"], function (exports_70, context_70) { "use strict"; - var internals_ts_4, console_ts_2, symbols; - var __moduleName = context_70 && context_70.id; + let internals_ts_4, console_ts_2; + const __moduleName = context_70 && context_70.id; return { setters: [ function (internals_ts_4_1) { @@ -6186,13 +6165,10 @@ System.register( }, ], execute: function () { - exports_70( - "symbols", - (symbols = { - internal: internals_ts_4.internalSymbol, - customInspect: console_ts_2.customInspect, - }) - ); + exports_70("symbols", { + internal: internals_ts_4.internalSymbol, + customInspect: console_ts_2.customInspect, + }); }, }; } @@ -6249,8 +6225,7 @@ System.register( ], function (exports_71, context_71) { "use strict"; - var args, pid, noColor; - var __moduleName = context_71 && context_71.id; + const __moduleName = context_71 && context_71.id; return { setters: [ function (buffer_ts_4_1) { @@ -6553,8 +6528,8 @@ System.register( ["$deno$/ops/dispatch_json.ts", "$deno$/util.ts"], function (exports_72, context_72) { "use strict"; - var dispatch_json_ts_34, util_ts_9; - var __moduleName = context_72 && context_72.id; + let dispatch_json_ts_34, util_ts_9; + const __moduleName = context_72 && context_72.id; function getRandomValues(typedArray) { util_ts_9.assert(typedArray !== null, "Input must not be null"); util_ts_9.assert( @@ -6590,8 +6565,8 @@ System.register("$deno$/web/streams/shared-internals.ts", [], function ( context_73 ) { "use strict"; - var state_, storedError_, objectCloneMemo, sharedArrayBufferSupported_; - var __moduleName = context_73 && context_73.id; + let objectCloneMemo, sharedArrayBufferSupported_; + const __moduleName = context_73 && context_73.id; function isInteger(value) { if (!isFinite(value)) { // covers NaN, +Infinity and -Infinity @@ -6639,7 +6614,7 @@ System.register("$deno$/web/streams/shared-internals.ts", [], function ( srcBuffer, srcByteOffset, srcLength, - cloneConstructor + _cloneConstructor ) { // this function fudges the return type but SharedArrayBuffer is disabled for a while anyway return srcBuffer.slice(srcByteOffset, srcByteOffset + srcLength); @@ -6831,8 +6806,8 @@ System.register("$deno$/web/streams/shared-internals.ts", [], function ( setters: [], execute: function () { // common stream fields - exports_73("state_", (state_ = Symbol("state_"))); - exports_73("storedError_", (storedError_ = Symbol("storedError_"))); + exports_73("state_", Symbol("state_")); + exports_73("storedError_", Symbol("storedError_")); // helper memoisation map for object values // weak so it doesn't keep memoized versions of old objects indefinitely. objectCloneMemo = new WeakMap(); @@ -6846,8 +6821,8 @@ System.register("$deno$/web/streams/queue.ts", [], function ( context_74 ) { "use strict"; - var CHUNK_SIZE, QueueImpl; - var __moduleName = context_74 && context_74.id; + let CHUNK_SIZE, QueueImpl; + const __moduleName = context_74 && context_74.id; return { setters: [], execute: function () { @@ -6902,8 +6877,8 @@ System.register( ["$deno$/web/streams/queue.ts", "$deno$/web/streams/shared-internals.ts"], function (exports_75, context_75) { "use strict"; - var queue_ts_1, shared_internals_ts_1, queue_, queueTotalSize_; - var __moduleName = context_75 && context_75.id; + let queue_ts_1, shared_internals_ts_1, queue_, queueTotalSize_; + const __moduleName = context_75 && context_75.id; function dequeueValue(container) { // Assert: container has[[queue]] and[[queueTotalSize]] internal slots. // Assert: container.[[queue]] is not empty. @@ -6974,7 +6949,7 @@ System.register( ], function (exports_76, context_76) { "use strict"; - var shared, + let shared, q, controlledReadableStream_, pullAlgorithm_, @@ -6999,7 +6974,7 @@ System.register( view_, reader_, readableStreamController_; - var __moduleName = context_76 && context_76.id; + const __moduleName = context_76 && context_76.id; // ---- Stream function initializeReadableStream(stream) { stream[shared.state_] = "readable"; @@ -8230,8 +8205,8 @@ System.register( ], function (exports_77, context_77) { "use strict"; - var rs, shared, q, ReadableStreamDefaultController; - var __moduleName = context_77 && context_77.id; + let rs, shared, q, ReadableStreamDefaultController; + const __moduleName = context_77 && context_77.id; function setUpReadableStreamDefaultControllerFromUnderlyingSource( stream, underlyingSource, @@ -8371,8 +8346,8 @@ System.register( ["$deno$/web/streams/readable-internals.ts"], function (exports_78, context_78) { "use strict"; - var rs, ReadableStreamDefaultReader; - var __moduleName = context_78 && context_78.id; + let rs, ReadableStreamDefaultReader; + const __moduleName = context_78 && context_78.id; return { setters: [ function (rs_2) { @@ -8448,8 +8423,8 @@ System.register( ["$deno$/web/streams/readable-internals.ts"], function (exports_79, context_79) { "use strict"; - var rs, ReadableStreamBYOBRequest; - var __moduleName = context_79 && context_79.id; + let rs, ReadableStreamBYOBRequest; + const __moduleName = context_79 && context_79.id; return { setters: [ function (rs_3) { @@ -8519,12 +8494,12 @@ System.register( ], function (exports_80, context_80) { "use strict"; - var rs, + let rs, q, shared, readable_stream_byob_request_ts_1, ReadableByteStreamController; - var __moduleName = context_80 && context_80.id; + const __moduleName = context_80 && context_80.id; function setUpReadableByteStreamControllerFromUnderlyingSource( stream, underlyingByteSource, @@ -8742,8 +8717,8 @@ System.register( ["$deno$/web/streams/readable-internals.ts"], function (exports_81, context_81) { "use strict"; - var rs, SDReadableStreamBYOBReader; - var __moduleName = context_81 && context_81.id; + let rs, SDReadableStreamBYOBReader; + const __moduleName = context_81 && context_81.id; return { setters: [ function (rs_5) { @@ -8842,14 +8817,14 @@ System.register( ], function (exports_82, context_82) { "use strict"; - var rs, + let rs, shared, readable_stream_default_controller_ts_1, readable_stream_default_reader_ts_1, readable_byte_stream_controller_ts_1, readable_stream_byob_reader_ts_1, SDReadableStream; - var __moduleName = context_82 && context_82.id; + const __moduleName = context_82 && context_82.id; function createReadableStream( startAlgorithm, pullAlgorithm, @@ -8933,8 +8908,8 @@ System.register( let canceled2 = false; let reason1; let reason2; - let branch1; - let branch2; + const branch1 = {}; + const branch2 = {}; let cancelResolve; const cancelPromise = new Promise((resolve) => (cancelResolve = resolve)); const pullAlgorithm = () => { @@ -9141,7 +9116,7 @@ System.register( ["$deno$/web/streams/readable-stream.ts"], function (exports_83, context_83) { "use strict"; - var __moduleName = context_83 && context_83.id; + const __moduleName = context_83 && context_83.id; return { setters: [ function (readable_stream_ts_1_1) { @@ -9163,13 +9138,8 @@ System.register( ], function (exports_84, context_84) { "use strict"; - var text_encoding_ts_6, - build_ts_8, - mod_ts_1, - bytesSymbol, - blobBytesWeakMap, - DenoBlob; - var __moduleName = context_84 && context_84.id; + let text_encoding_ts_6, build_ts_8, mod_ts_1, bytesSymbol, DenoBlob; + const __moduleName = context_84 && context_84.id; function containsOnlyASCII(str) { if (typeof str !== "string") { return false; @@ -9316,7 +9286,7 @@ System.register( exports_84("bytesSymbol", (bytesSymbol = Symbol("bytes"))); // A WeakMap holding blob to byte array mapping. // Ensures it does not impact garbage collection. - exports_84("blobBytesWeakMap", (blobBytesWeakMap = new WeakMap())); + exports_84("blobBytesWeakMap", new WeakMap()); DenoBlob = class DenoBlob { constructor(blobParts, options) { this.size = 0; @@ -9376,8 +9346,8 @@ System.register( ["$deno$/web/util.ts", "$deno$/util.ts"], function (exports_85, context_85) { "use strict"; - var util_ts_10, util_ts_11, eventData, EventImpl; - var __moduleName = context_85 && context_85.id; + let util_ts_10, util_ts_11, eventData, EventImpl; + const __moduleName = context_85 && context_85.id; // accessors for non runtime visible data function getDispatched(event) { return Boolean(eventData.get(event)?.dispatched); @@ -9705,8 +9675,8 @@ System.register( ["$deno$/web/event.ts", "$deno$/web/util.ts"], function (exports_86, context_86) { "use strict"; - var event_ts_1, util_ts_12, CustomEventImpl; - var __moduleName = context_86 && context_86.id; + let event_ts_1, util_ts_12, CustomEventImpl; + const __moduleName = context_86 && context_86.id; return { setters: [ function (event_ts_1_1) { @@ -9748,8 +9718,8 @@ System.register("$deno$/web/dom_exception.ts", [], function ( context_87 ) { "use strict"; - var DOMExceptionImpl; - var __moduleName = context_87 && context_87.id; + let DOMExceptionImpl; + const __moduleName = context_87 && context_87.id; return { setters: [], execute: function () { @@ -9772,8 +9742,8 @@ System.register("$deno$/web/dom_file.ts", ["$deno$/web/blob.ts"], function ( context_88 ) { "use strict"; - var blob, DomFileImpl; - var __moduleName = context_88 && context_88.id; + let blob, DomFileImpl; + const __moduleName = context_88 && context_88.id; return { setters: [ function (blob_1) { @@ -9804,13 +9774,13 @@ System.register( ["$deno$/web/dom_exception.ts", "$deno$/web/event.ts", "$deno$/web/util.ts"], function (exports_89, context_89) { "use strict"; - var dom_exception_ts_1, + let dom_exception_ts_1, event_ts_2, util_ts_13, DOCUMENT_FRAGMENT_NODE, eventTargetData, EventTargetImpl; - var __moduleName = context_89 && context_89.id; + const __moduleName = context_89 && context_89.id; // DOM Logic Helper functions and type guards /** Get the parent node, for event targets that have a parent. * @@ -10293,8 +10263,8 @@ System.register( ["$deno$/web/util.ts", "$deno$/internals.ts"], function (exports_90, context_90) { "use strict"; - var util_ts_14, internals_ts_5; - var __moduleName = context_90 && context_90.id; + let util_ts_14, internals_ts_5; + const __moduleName = context_90 && context_90.id; function DomIterableMixin(Base, dataSymbol) { // we have to cast `this` as `any` because there is no way to describe the // Base class in a way where the Symbol `dataSymbol` is defined. So the @@ -10380,7 +10350,7 @@ System.register( ], function (exports_91, context_91) { "use strict"; - var _a, + let _a, blob, domFile, dom_iterable_ts_1, @@ -10388,7 +10358,7 @@ System.register( dataSymbol, FormDataBase, FormDataImpl; - var __moduleName = context_91 && context_91.id; + const __moduleName = context_91 && context_91.id; return { setters: [ function (blob_2) { @@ -10543,8 +10513,8 @@ System.register( ["$deno$/ops/dispatch_json.ts"], function (exports_92, context_92) { "use strict"; - var dispatch_json_ts_35; - var __moduleName = context_92 && context_92.id; + let dispatch_json_ts_35; + const __moduleName = context_92 && context_92.id; function fetch(args, body) { let zeroCopy = undefined; if (body) { @@ -10583,7 +10553,7 @@ System.register( ], function (exports_93, context_93) { "use strict"; - var util_ts_16, + let util_ts_16, util_ts_17, text_encoding_ts_7, blob_ts_1, @@ -10595,7 +10565,7 @@ System.register( dom_file_ts_1, Body, Response; - var __moduleName = context_93 && context_93.id; + const __moduleName = context_93 && context_93.id; function getHeaderValueParams(value) { const params = new Map(); // Forced to do so for some Map constructor param mismatch @@ -11222,7 +11192,7 @@ System.register( ["$deno$/web/dom_iterable.ts", "$deno$/web/util.ts", "$deno$/web/console.ts"], function (exports_94, context_94) { "use strict"; - var dom_iterable_ts_2, + let dom_iterable_ts_2, util_ts_18, console_ts_4, invalidTokenRegex, @@ -11230,7 +11200,7 @@ System.register( headerMap, HeadersBase, HeadersImpl; - var __moduleName = context_94 && context_94.id; + const __moduleName = context_94 && context_94.id; // eslint-disable-next-line @typescript-eslint/no-explicit-any function isHeaders(value) { // eslint-disable-next-line @typescript-eslint/no-use-before-define @@ -11382,8 +11352,8 @@ System.register( ["$deno$/web/url.ts", "$deno$/web/util.ts"], function (exports_95, context_95) { "use strict"; - var url_ts_1, util_ts_19, urls, URLSearchParamsImpl; - var __moduleName = context_95 && context_95.id; + let url_ts_1, util_ts_19, urls, URLSearchParamsImpl; + const __moduleName = context_95 && context_95.id; function handleStringInitialization(searchParams, init) { // Overload: USVString // If init is a string and starts with U+003F (?), @@ -11627,7 +11597,7 @@ System.register( ], function (exports_96, context_96) { "use strict"; - var console_ts_5, + let console_ts_5, url_search_params_ts_1, get_random_values_ts_1, patterns, @@ -11637,7 +11607,7 @@ System.register( blobURLMap, parts, URLImpl; - var __moduleName = context_96 && context_96.id; + const __moduleName = context_96 && context_96.id; function parse(url) { const urlMatch = urlRegExp.exec(url); if (urlMatch) { @@ -12278,14 +12248,7 @@ System.register( ], function (exports_100, context_100) { "use strict"; - let blob, - encoding, - mod_ts_2, - TextEncoder, - TextDecoder, - DenoBlob, - BodyUsedError, - Body; + let blob, encoding, mod_ts_2, TextEncoder, TextDecoder, DenoBlob, Body; const __moduleName = context_100 && context_100.id; function validateBodyType(owner, bodySource) { if ( @@ -12391,8 +12354,7 @@ System.register( DenoBlob = blob.DenoBlob; exports_100( "BodyUsedError", - (BodyUsedError = - "Failed to execute 'clone' on 'Body': body is already used") + "Failed to execute 'clone' on 'Body': body is already used" ); Body = class Body { constructor(_bodySource, contentType) { @@ -12798,10 +12760,7 @@ System.register( performanceUtil, request, streams, - core_ts_7, - windowOrWorkerGlobalScopeMethods, - windowOrWorkerGlobalScopeProperties, - eventTargetProperties; + core_ts_7; const __moduleName = context_102 && context_102.id; function writable(value) { return { @@ -12906,57 +12865,48 @@ System.register( ], execute: function () { // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope - exports_102( - "windowOrWorkerGlobalScopeMethods", - (windowOrWorkerGlobalScopeMethods = { - atob: writable(textEncoding.atob), - btoa: writable(textEncoding.btoa), - clearInterval: writable(timers.clearInterval), - clearTimeout: writable(timers.clearTimeout), - fetch: writable(fetchTypes.fetch), - // queueMicrotask is bound in Rust - setInterval: writable(timers.setInterval), - setTimeout: writable(timers.setTimeout), - }) - ); + exports_102("windowOrWorkerGlobalScopeMethods", { + atob: writable(textEncoding.atob), + btoa: writable(textEncoding.btoa), + clearInterval: writable(timers.clearInterval), + clearTimeout: writable(timers.clearTimeout), + fetch: writable(fetchTypes.fetch), + // queueMicrotask is bound in Rust + setInterval: writable(timers.setInterval), + setTimeout: writable(timers.setTimeout), + }); // Other properties shared between WindowScope and WorkerGlobalScope - exports_102( - "windowOrWorkerGlobalScopeProperties", - (windowOrWorkerGlobalScopeProperties = { - console: writable(new consoleTypes.Console(core_ts_7.core.print)), - Blob: nonEnumerable(blob.DenoBlob), - File: nonEnumerable(domFile.DomFileImpl), - CustomEvent: nonEnumerable(customEvent.CustomEventImpl), - DOMException: nonEnumerable(domException.DOMExceptionImpl), - Event: nonEnumerable(event.EventImpl), - EventTarget: nonEnumerable(eventTarget.EventTargetImpl), - URL: nonEnumerable(url.URLImpl), - URLSearchParams: nonEnumerable(urlSearchParams.URLSearchParamsImpl), - Headers: nonEnumerable(headers.HeadersImpl), - FormData: nonEnumerable(formData.FormDataImpl), - TextEncoder: nonEnumerable(textEncoding.TextEncoder), - TextDecoder: nonEnumerable(textEncoding.TextDecoder), - ReadableStream: nonEnumerable(streams.ReadableStream), - Request: nonEnumerable(request.Request), - Response: nonEnumerable(fetchTypes.Response), - performance: writable(new performanceUtil.Performance()), - Worker: nonEnumerable(workers.WorkerImpl), - }) - ); - exports_102( - "eventTargetProperties", - (eventTargetProperties = { - addEventListener: readOnly( - eventTarget.EventTargetImpl.prototype.addEventListener - ), - dispatchEvent: readOnly( - eventTarget.EventTargetImpl.prototype.dispatchEvent - ), - removeEventListener: readOnly( - eventTarget.EventTargetImpl.prototype.removeEventListener - ), - }) - ); + exports_102("windowOrWorkerGlobalScopeProperties", { + console: writable(new consoleTypes.Console(core_ts_7.core.print)), + Blob: nonEnumerable(blob.DenoBlob), + File: nonEnumerable(domFile.DomFileImpl), + CustomEvent: nonEnumerable(customEvent.CustomEventImpl), + DOMException: nonEnumerable(domException.DOMExceptionImpl), + Event: nonEnumerable(event.EventImpl), + EventTarget: nonEnumerable(eventTarget.EventTargetImpl), + URL: nonEnumerable(url.URLImpl), + URLSearchParams: nonEnumerable(urlSearchParams.URLSearchParamsImpl), + Headers: nonEnumerable(headers.HeadersImpl), + FormData: nonEnumerable(formData.FormDataImpl), + TextEncoder: nonEnumerable(textEncoding.TextEncoder), + TextDecoder: nonEnumerable(textEncoding.TextDecoder), + ReadableStream: nonEnumerable(streams.ReadableStream), + Request: nonEnumerable(request.Request), + Response: nonEnumerable(fetchTypes.Response), + performance: writable(new performanceUtil.Performance()), + Worker: nonEnumerable(workers.WorkerImpl), + }); + exports_102("eventTargetProperties", { + addEventListener: readOnly( + eventTarget.EventTargetImpl.prototype.addEventListener + ), + dispatchEvent: readOnly( + eventTarget.EventTargetImpl.prototype.dispatchEvent + ), + removeEventListener: readOnly( + eventTarget.EventTargetImpl.prototype.removeEventListener + ), + }); }, }; } diff --git a/cli/tsrt.js b/cli/tsrt.js index 201281971809ef..ed062e4f53d193 100644 --- a/cli/tsrt.js +++ b/cli/tsrt.js @@ -1108,28 +1108,25 @@ System.register("$deno$/errors.ts", [], function (exports_7, context_7) { this.name = "Http"; } }; - exports_7( - "errors", - ({ - NotFound: NotFound, - PermissionDenied: PermissionDenied, - ConnectionRefused: ConnectionRefused, - ConnectionReset: ConnectionReset, - ConnectionAborted: ConnectionAborted, - NotConnected: NotConnected, - AddrInUse: AddrInUse, - AddrNotAvailable: AddrNotAvailable, - BrokenPipe: BrokenPipe, - AlreadyExists: AlreadyExists, - InvalidData: InvalidData, - TimedOut: TimedOut, - Interrupted: Interrupted, - WriteZero: WriteZero, - UnexpectedEof: UnexpectedEof, - BadResource: BadResource, - Http: Http, - }) - ); + exports_7("errors", { + NotFound: NotFound, + PermissionDenied: PermissionDenied, + ConnectionRefused: ConnectionRefused, + ConnectionReset: ConnectionReset, + ConnectionAborted: ConnectionAborted, + NotConnected: NotConnected, + AddrInUse: AddrInUse, + AddrNotAvailable: AddrNotAvailable, + BrokenPipe: BrokenPipe, + AlreadyExists: AlreadyExists, + InvalidData: InvalidData, + TimedOut: TimedOut, + Interrupted: Interrupted, + WriteZero: WriteZero, + UnexpectedEof: UnexpectedEof, + BadResource: BadResource, + Http: Http, + }); }, }; }); @@ -1915,11 +1912,7 @@ System.register( ], function (exports_20, context_20) { "use strict"; - let resources_ts_1, - io_ts_3, - seek_ts_1, - open_ts_1, - File; + let resources_ts_1, io_ts_3, seek_ts_1, open_ts_1, File; const __moduleName = context_20 && context_20.id; /**@internal*/ function openSync(path, modeOrOptions = "r") { @@ -2020,9 +2013,9 @@ System.register( } }; exports_20("File", File); - exports_20("stdin", (new File(0))); - exports_20("stdout", (new File(1))); - exports_20("stderr", (new File(2))); + exports_20("stdin", new File(0)); + exports_20("stdout", new File(1)); + exports_20("stderr", new File(2)); }, }; } @@ -2143,7 +2136,7 @@ System.register("$deno$/internals.ts", [], function (exports_22, context_22) { setters: [], execute: function () { // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - exports_22("internalSymbol", (Symbol("Deno.internal"))); + exports_22("internalSymbol", Symbol("Deno.internal")); // The object where all the internal fields for testing will be living. // eslint-disable-next-line @typescript-eslint/no-explicit-any exports_22("internalObject", (internalObject = {})); @@ -3749,7 +3742,7 @@ System.register( } }; exports_39("Permissions", Permissions); - exports_39("permissions", (new Permissions())); + exports_39("permissions", new Permissions()); }, }; } @@ -4184,12 +4177,7 @@ System.register( ["$deno$/ops/signal.ts", "$deno$/build.ts"], function (exports_51, context_51) { "use strict"; - let signal_ts_1, - build_ts_3, - LinuxSignal, - MacOSSignal, - Signal, - SignalStream; + let signal_ts_1, build_ts_3, LinuxSignal, MacOSSignal, Signal, SignalStream; const __moduleName = context_51 && context_51.id; function setSignals() { if (build_ts_3.build.os === "mac") { @@ -4285,44 +4273,41 @@ System.register( MacOSSignal[(MacOSSignal["SIGUSR2"] = 31)] = "SIGUSR2"; })(MacOSSignal || (MacOSSignal = {})); exports_51("Signal", (Signal = {})); - exports_51( - "signals", - ({ - alarm() { - return signal(Signal.SIGALRM); - }, - child() { - return signal(Signal.SIGCHLD); - }, - hungup() { - return signal(Signal.SIGHUP); - }, - interrupt() { - return signal(Signal.SIGINT); - }, - io() { - return signal(Signal.SIGIO); - }, - pipe() { - return signal(Signal.SIGPIPE); - }, - quit() { - return signal(Signal.SIGQUIT); - }, - terminate() { - return signal(Signal.SIGTERM); - }, - userDefined1() { - return signal(Signal.SIGUSR1); - }, - userDefined2() { - return signal(Signal.SIGUSR2); - }, - windowChange() { - return signal(Signal.SIGWINCH); - }, - }) - ); + exports_51("signals", { + alarm() { + return signal(Signal.SIGALRM); + }, + child() { + return signal(Signal.SIGCHLD); + }, + hungup() { + return signal(Signal.SIGHUP); + }, + interrupt() { + return signal(Signal.SIGINT); + }, + io() { + return signal(Signal.SIGIO); + }, + pipe() { + return signal(Signal.SIGPIPE); + }, + quit() { + return signal(Signal.SIGQUIT); + }, + terminate() { + return signal(Signal.SIGTERM); + }, + userDefined1() { + return signal(Signal.SIGUSR1); + }, + userDefined2() { + return signal(Signal.SIGUSR2); + }, + windowChange() { + return signal(Signal.SIGWINCH); + }, + }); SignalStream = class SignalStream { constructor(signo) { this.#disposed = false; @@ -5043,13 +5028,10 @@ System.register( }, ], execute: function () { - exports_61( - "symbols", - ({ - internal: internals_ts_3.internalSymbol, - customInspect: console_ts_2.customInspect, - }) - ); + exports_61("symbols", { + internal: internals_ts_3.internalSymbol, + customInspect: console_ts_2.customInspect, + }); }, }; } @@ -5399,7 +5381,7 @@ System.register( }, ], execute: function () { - exports_62("args", ([])); + exports_62("args", []); }, }; } @@ -6674,7 +6656,7 @@ System.register( MediaType[(MediaType["Unknown"] = 6)] = "Unknown"; })(MediaType || (MediaType = {})); exports_73("MediaType", MediaType); - exports_73("ASSETS", ("$asset$")); + exports_73("ASSETS", "$asset$"); /** A global cache of module source files that have been loaded. */ moduleCache = new Map(); /** A map of maps which cache source files for quicker modules resolution. */ @@ -7352,39 +7334,36 @@ System.register( })(CompilerRequestType || (CompilerRequestType = {})); exports_76("CompilerRequestType", CompilerRequestType); exports_76("OUT_DIR", (OUT_DIR = "$deno$")); - exports_76( - "ignoredDiagnostics", - ([ - // TS2306: File 'cli/tests/subdir/amd_like.js' is - // not a module. - 2306, - // TS1375: 'await' expressions are only allowed at the top level of a file - // when that file is a module, but this file has no imports or exports. - // Consider adding an empty 'export {}' to make this file a module. - 1375, - // TS1103: 'for-await-of' statement is only allowed within an async function - // or async generator. - 1103, - // TS2691: An import path cannot end with a '.ts' extension. Consider - // importing 'bad-module' instead. - 2691, - // TS5009: Cannot find the common subdirectory path for the input files. - 5009, - // TS5055: Cannot write file - // 'http://localhost:4545/cli/tests/subdir/mt_application_x_javascript.j4.js' - // because it would overwrite input file. - 5055, - // TypeScript is overly opinionated that only CommonJS modules kinds can - // support JSON imports. Allegedly this was fixed in - // Microsoft/TypeScript#26825 but that doesn't seem to be working here, - // so we will ignore complaints about this compiler setting. - 5070, - // TS7016: Could not find a declaration file for module '...'. '...' - // implicitly has an 'any' type. This is due to `allowJs` being off by - // default but importing of a JavaScript module. - 7016, - ]) - ); + exports_76("ignoredDiagnostics", [ + // TS2306: File 'cli/tests/subdir/amd_like.js' is + // not a module. + 2306, + // TS1375: 'await' expressions are only allowed at the top level of a file + // when that file is a module, but this file has no imports or exports. + // Consider adding an empty 'export {}' to make this file a module. + 1375, + // TS1103: 'for-await-of' statement is only allowed within an async function + // or async generator. + 1103, + // TS2691: An import path cannot end with a '.ts' extension. Consider + // importing 'bad-module' instead. + 2691, + // TS5009: Cannot find the common subdirectory path for the input files. + 5009, + // TS5055: Cannot write file + // 'http://localhost:4545/cli/tests/subdir/mt_application_x_javascript.j4.js' + // because it would overwrite input file. + 5055, + // TypeScript is overly opinionated that only CommonJS modules kinds can + // support JSON imports. Allegedly this was fixed in + // Microsoft/TypeScript#26825 but that doesn't seem to be working here, + // so we will ignore complaints about this compiler setting. + 5070, + // TS7016: Could not find a declaration file for module '...'. '...' + // implicitly has an 'any' type. This is due to `allowJs` being off by + // default but importing of a JavaScript module. + 7016, + ]); // Constants used by `normalizeString` and `resolvePath` exports_76("CHAR_DOT", (CHAR_DOT = 46)); /* . */ exports_76("CHAR_FORWARD_SLASH", (CHAR_FORWARD_SLASH = 47)); /* / */ @@ -7484,22 +7463,16 @@ System.register( target: ts.ScriptTarget.ESNext, }) ); - exports_77( - "defaultRuntimeCompileOptions", - ({ - outDir: undefined, - }) - ); - exports_77( - "defaultTranspileOptions", - ({ - esModuleInterop: true, - module: ts.ModuleKind.ESNext, - sourceMap: true, - scriptComments: true, - target: ts.ScriptTarget.ESNext, - }) - ); + exports_77("defaultRuntimeCompileOptions", { + outDir: undefined, + }); + exports_77("defaultTranspileOptions", { + esModuleInterop: true, + module: ts.ModuleKind.ESNext, + sourceMap: true, + scriptComments: true, + target: ts.ScriptTarget.ESNext, + }); ignoredCompilerOptions = [ "allowSyntheticDefaultImports", "baseUrl", @@ -7733,11 +7706,7 @@ System.register( ], function (exports_78, context_78) { "use strict"; - let host_ts_1, - sourcefile_ts_3, - util_ts_15, - host, - options; + let host_ts_1, sourcefile_ts_3, util_ts_15, host, options; const __moduleName = context_78 && context_78.id; return { setters: [ @@ -7792,16 +7761,13 @@ System.register( ); exports_78( "TS_SNAPSHOT_PROGRAM", - (ts.createProgram({ + ts.createProgram({ rootNames: [`${sourcefile_ts_3.ASSETS}/bootstrap.ts`], options, host, - })) - ); - exports_78( - "SYSTEM_LOADER", - (util_ts_15.getAsset("system_loader.js")) + }) ); + exports_78("SYSTEM_LOADER", util_ts_15.getAsset("system_loader.js")); }, }; } @@ -8369,8 +8335,8 @@ System.register("$deno$/web/streams/shared-internals.ts", [], function ( setters: [], execute: function () { // common stream fields - exports_81("state_", (Symbol("state_"))); - exports_81("storedError_", (Symbol("storedError_"))); + exports_81("state_", Symbol("state_")); + exports_81("storedError_", Symbol("storedError_")); // helper memoisation map for object values // weak so it doesn't keep memoized versions of old objects indefinitely. objectCloneMemo = new WeakMap(); @@ -10471,8 +10437,8 @@ System.register( let canceled2 = false; let reason1; let reason2; - const branch1; - const branch2; + const branch1 = {}; + const branch2 = {}; let cancelResolve; const cancelPromise = new Promise((resolve) => (cancelResolve = resolve)); const pullAlgorithm = () => { @@ -10701,11 +10667,7 @@ System.register( ], function (exports_92, context_92) { "use strict"; - let text_encoding_ts_8, - build_ts_8, - mod_ts_1, - bytesSymbol, - DenoBlob; + let text_encoding_ts_8, build_ts_8, mod_ts_1, bytesSymbol, DenoBlob; const __moduleName = context_92 && context_92.id; function containsOnlyASCII(str) { if (typeof str !== "string") { @@ -10853,7 +10815,7 @@ System.register( exports_92("bytesSymbol", (bytesSymbol = Symbol("bytes"))); // A WeakMap holding blob to byte array mapping. // Ensures it does not impact garbage collection. - exports_92("blobBytesWeakMap", (new WeakMap())); + exports_92("blobBytesWeakMap", new WeakMap()); DenoBlob = class DenoBlob { constructor(blobParts, options) { this.size = 0; @@ -13850,13 +13812,7 @@ System.register( ], function (exports_109, context_109) { "use strict"; - let blob, - encoding, - mod_ts_2, - TextEncoder, - TextDecoder, - DenoBlob, - Body; + let blob, encoding, mod_ts_2, TextEncoder, TextDecoder, DenoBlob, Body; const __moduleName = context_109 && context_109.id; function validateBodyType(owner, bodySource) { if ( @@ -13962,7 +13918,7 @@ System.register( DenoBlob = blob.DenoBlob; exports_109( "BodyUsedError", - ("Failed to execute 'clone' on 'Body': body is already used") + "Failed to execute 'clone' on 'Body': body is already used" ); Body = class Body { constructor(_bodySource, contentType) { @@ -14368,7 +14324,7 @@ System.register( performanceUtil, request, streams, - core_ts_8 ; + core_ts_8; const __moduleName = context_111 && context_111.id; function writable(value) { return { @@ -14473,57 +14429,48 @@ System.register( ], execute: function () { // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope - exports_111( - "windowOrWorkerGlobalScopeMethods", - ({ - atob: writable(textEncoding.atob), - btoa: writable(textEncoding.btoa), - clearInterval: writable(timers.clearInterval), - clearTimeout: writable(timers.clearTimeout), - fetch: writable(fetchTypes.fetch), - // queueMicrotask is bound in Rust - setInterval: writable(timers.setInterval), - setTimeout: writable(timers.setTimeout), - }) - ); + exports_111("windowOrWorkerGlobalScopeMethods", { + atob: writable(textEncoding.atob), + btoa: writable(textEncoding.btoa), + clearInterval: writable(timers.clearInterval), + clearTimeout: writable(timers.clearTimeout), + fetch: writable(fetchTypes.fetch), + // queueMicrotask is bound in Rust + setInterval: writable(timers.setInterval), + setTimeout: writable(timers.setTimeout), + }); // Other properties shared between WindowScope and WorkerGlobalScope - exports_111( - "windowOrWorkerGlobalScopeProperties", - ({ - console: writable(new consoleTypes.Console(core_ts_8.core.print)), - Blob: nonEnumerable(blob.DenoBlob), - File: nonEnumerable(domFile.DomFileImpl), - CustomEvent: nonEnumerable(customEvent.CustomEventImpl), - DOMException: nonEnumerable(domException.DOMExceptionImpl), - Event: nonEnumerable(event.EventImpl), - EventTarget: nonEnumerable(eventTarget.EventTargetImpl), - URL: nonEnumerable(url.URLImpl), - URLSearchParams: nonEnumerable(urlSearchParams.URLSearchParamsImpl), - Headers: nonEnumerable(headers.HeadersImpl), - FormData: nonEnumerable(formData.FormDataImpl), - TextEncoder: nonEnumerable(textEncoding.TextEncoder), - TextDecoder: nonEnumerable(textEncoding.TextDecoder), - ReadableStream: nonEnumerable(streams.ReadableStream), - Request: nonEnumerable(request.Request), - Response: nonEnumerable(fetchTypes.Response), - performance: writable(new performanceUtil.Performance()), - Worker: nonEnumerable(workers.WorkerImpl), - }) - ); - exports_111( - "eventTargetProperties", - ({ - addEventListener: readOnly( - eventTarget.EventTargetImpl.prototype.addEventListener - ), - dispatchEvent: readOnly( - eventTarget.EventTargetImpl.prototype.dispatchEvent - ), - removeEventListener: readOnly( - eventTarget.EventTargetImpl.prototype.removeEventListener - ), - }) - ); + exports_111("windowOrWorkerGlobalScopeProperties", { + console: writable(new consoleTypes.Console(core_ts_8.core.print)), + Blob: nonEnumerable(blob.DenoBlob), + File: nonEnumerable(domFile.DomFileImpl), + CustomEvent: nonEnumerable(customEvent.CustomEventImpl), + DOMException: nonEnumerable(domException.DOMExceptionImpl), + Event: nonEnumerable(event.EventImpl), + EventTarget: nonEnumerable(eventTarget.EventTargetImpl), + URL: nonEnumerable(url.URLImpl), + URLSearchParams: nonEnumerable(urlSearchParams.URLSearchParamsImpl), + Headers: nonEnumerable(headers.HeadersImpl), + FormData: nonEnumerable(formData.FormDataImpl), + TextEncoder: nonEnumerable(textEncoding.TextEncoder), + TextDecoder: nonEnumerable(textEncoding.TextDecoder), + ReadableStream: nonEnumerable(streams.ReadableStream), + Request: nonEnumerable(request.Request), + Response: nonEnumerable(fetchTypes.Response), + performance: writable(new performanceUtil.Performance()), + Worker: nonEnumerable(workers.WorkerImpl), + }); + exports_111("eventTargetProperties", { + addEventListener: readOnly( + eventTarget.EventTargetImpl.prototype.addEventListener + ), + dispatchEvent: readOnly( + eventTarget.EventTargetImpl.prototype.dispatchEvent + ), + removeEventListener: readOnly( + eventTarget.EventTargetImpl.prototype.removeEventListener + ), + }); }, }; }