diff --git a/.dprintrc.json b/.dprintrc.json index 4cdfdc6fa4..726b2a4ad5 100644 --- a/.dprintrc.json +++ b/.dprintrc.json @@ -30,7 +30,7 @@ "third_party" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.29.0.wasm", + "https://plugins.dprint.dev/typescript-0.32.1.wasm", "https://plugins.dprint.dev/json-0.7.0.wasm", "https://plugins.dprint.dev/markdown-0.4.0.wasm" ] diff --git a/Cargo.lock b/Cargo.lock index 8e1b2452dc..452f3f8352 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -565,18 +565,18 @@ dependencies = [ [[package]] name = "dprint-core" -version = "0.28.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fab44561ffc8f70d26d6c4cc81a648ecd47dd60836abecf0599253a7b9fdbf5d" +checksum = "a15e15225efcb6eccd138dea49bf7aa390248ab0faf650b1b8a7ad660a5778cc" dependencies = [ "serde", ] [[package]] name = "dprint-plugin-typescript" -version = "0.31.3" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a846ca33bcd5d4adfa4c1beac0ab426ae01c7f4fcecb5542b465aef96b92fa77" +checksum = "4b2a52a112622e8368c2e7efb0e977e8271b69862015967747d350add4298a5c" dependencies = [ "dprint-core", "serde", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 86ac0b28fe..6150fa4210 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -43,7 +43,7 @@ clap = "2.33.3" dissimilar = "1.0.2" dlopen = "0.1.8" encoding_rs = "0.8.24" -dprint-plugin-typescript = "0.31.3" +dprint-plugin-typescript = "0.32.1" filetime = "0.2.12" http = "0.2.1" indexmap = "1.6.0" diff --git a/cli/tests/005_more_imports.ts b/cli/tests/005_more_imports.ts index 52dd1df7b9..0266bf46c7 100644 --- a/cli/tests/005_more_imports.ts +++ b/cli/tests/005_more_imports.ts @@ -1,4 +1,4 @@ -import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts"; +import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts"; printHello3(); diff --git a/cli/tests/bundle_im.ts b/cli/tests/bundle_im.ts index b751aa6897..c43f6294c1 100644 --- a/cli/tests/bundle_im.ts +++ b/cli/tests/bundle_im.ts @@ -1,4 +1,4 @@ -import { returnsFoo, printHello2 } from "mod2"; +import { printHello2, returnsFoo } from "mod2"; export function returnsHi(): string { return "Hi"; diff --git a/cli/tests/lock_check_err_with_bundle.json b/cli/tests/lock_check_err_with_bundle.json index ae8f9dd9d9..b773ed0717 100644 --- a/cli/tests/lock_check_err_with_bundle.json +++ b/cli/tests/lock_check_err_with_bundle.json @@ -1,5 +1,5 @@ { - "http://127.0.0.1:4545/cli/tests/subdir/mod1.ts": "f627f1649f9853adfa096241ae2defa75e4e327cbeb6af0e82a11304b3e5c8be", + "http://127.0.0.1:4545/cli/tests/subdir/mod1.ts": "bc699ebc05dec9a4baf2109258f03e6ec8dd5498e2f8c5469b62073b3b241657", "http://127.0.0.1:4545/cli/tests/subdir/print_hello.ts": "fe7bbccaedb6579200a8b582f905139296402d06b1b91109d6e12c41a23125da", "http://127.0.0.1:4545/cli/tests/subdir/subdir2/mod2.ts": "bad" } diff --git a/cli/tests/lock_dynamic_imports.json b/cli/tests/lock_dynamic_imports.json index df77e179c0..bfc1cf7e7f 100644 --- a/cli/tests/lock_dynamic_imports.json +++ b/cli/tests/lock_dynamic_imports.json @@ -1,6 +1,6 @@ { "http://127.0.0.1:4545/cli/tests/013_dynamic_import.ts": "c875f10de49bded1ad76f1709d68e6cf2c0cfb8e8e862542a3fcb4ab09257b99", - "http://127.0.0.1:4545/cli/tests/subdir/mod1.ts": "f627f1649f9853adfa096241ae2defa75e4e327cbeb6af0e82a11304b3e5c8be", + "http://127.0.0.1:4545/cli/tests/subdir/mod1.ts": "bc699ebc05dec9a4baf2109258f03e6ec8dd5498e2f8c5469b62073b3b241657", "http://127.0.0.1:4545/cli/tests/subdir/print_hello.ts": "fe7bbccaedb6579200a8b582f905139296402d06b1b91109d6e12c41a23125da", "http://127.0.0.1:4545/cli/tests/subdir/subdir2/mod2.ts": "bad" } diff --git a/cli/tests/single_compile_with_reload_dyn.ts b/cli/tests/single_compile_with_reload_dyn.ts index 52dd1df7b9..0266bf46c7 100644 --- a/cli/tests/single_compile_with_reload_dyn.ts +++ b/cli/tests/single_compile_with_reload_dyn.ts @@ -1,4 +1,4 @@ -import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts"; +import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts"; printHello3(); diff --git a/cli/tests/subdir/mod1.ts b/cli/tests/subdir/mod1.ts index 393535588a..9a4b530214 100644 --- a/cli/tests/subdir/mod1.ts +++ b/cli/tests/subdir/mod1.ts @@ -1,4 +1,4 @@ -import { returnsFoo, printHello2 } from "./subdir2/mod2.ts"; +import { printHello2, returnsFoo } from "./subdir2/mod2.ts"; export function returnsHi(): string { return "Hi"; diff --git a/cli/tests/unit/abort_controller_test.ts b/cli/tests/unit/abort_controller_test.ts index ecc1abb881..d89bcdd445 100644 --- a/cli/tests/unit/abort_controller_test.ts +++ b/cli/tests/unit/abort_controller_test.ts @@ -1,4 +1,4 @@ -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function basicAbortController() { const controller = new AbortController(); diff --git a/cli/tests/unit/blob_test.ts b/cli/tests/unit/blob_test.ts index b1587b6dae..5bce99e18d 100644 --- a/cli/tests/unit/blob_test.ts +++ b/cli/tests/unit/blob_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; import { concat } from "../../../std/bytes/mod.ts"; import { decode } from "../../../std/encoding/utf8.ts"; diff --git a/cli/tests/unit/body_test.ts b/cli/tests/unit/body_test.ts index d9979e7035..404ae305dd 100644 --- a/cli/tests/unit/body_test.ts +++ b/cli/tests/unit/body_test.ts @@ -1,9 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { - unitTest, - assertEquals, - assert, -} from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; // just a hack to get a body object // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/cli/tests/unit/buffer_test.ts b/cli/tests/unit/buffer_test.ts index 999680be7e..6bea4684d0 100644 --- a/cli/tests/unit/buffer_test.ts +++ b/cli/tests/unit/buffer_test.ts @@ -4,8 +4,8 @@ // Copyright 2009 The Go Authors. All rights reserved. BSD license. // https://github.com/golang/go/blob/master/LICENSE import { - assertEquals, assert, + assertEquals, assertThrows, assertThrowsAsync, unitTest, diff --git a/cli/tests/unit/build_test.ts b/cli/tests/unit/build_test.ts index 987ed8d392..9a7e66f6cc 100644 --- a/cli/tests/unit/build_test.ts +++ b/cli/tests/unit/build_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert } from "./test_util.ts"; +import { assert, unitTest } from "./test_util.ts"; unitTest(function buildInfo(): void { // Deno.build is injected by rollup at compile time. Here diff --git a/cli/tests/unit/chmod_test.ts b/cli/tests/unit/chmod_test.ts index c53fe8c8b9..8fee4f5a38 100644 --- a/cli/tests/unit/chmod_test.ts +++ b/cli/tests/unit/chmod_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index 93a3feec90..acdb736cb9 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; // chown on Windows is noop for now, so ignore its testing on Windows diff --git a/cli/tests/unit/copy_file_test.ts b/cli/tests/unit/copy_file_test.ts index c45e4977b6..0492c4b8c1 100644 --- a/cli/tests/unit/copy_file_test.ts +++ b/cli/tests/unit/copy_file_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; function readFileString(filename: string | URL): string { diff --git a/cli/tests/unit/custom_event_test.ts b/cli/tests/unit/custom_event_test.ts index a8b2fcf884..72ebc75d84 100644 --- a/cli/tests/unit/custom_event_test.ts +++ b/cli/tests/unit/custom_event_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest(function customEventInitializedWithDetail(): void { const type = "touchstart"; diff --git a/cli/tests/unit/dir_test.ts b/cli/tests/unit/dir_test.ts index f9f4c94568..a6e9c594a5 100644 --- a/cli/tests/unit/dir_test.ts +++ b/cli/tests/unit/dir_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest({ perms: { read: true } }, function dirCwdNotNull(): void { assert(Deno.cwd() != null); diff --git a/cli/tests/unit/dispatch_json_test.ts b/cli/tests/unit/dispatch_json_test.ts index 29127a85c7..ce7778e2dc 100644 --- a/cli/tests/unit/dispatch_json_test.ts +++ b/cli/tests/unit/dispatch_json_test.ts @@ -1,8 +1,4 @@ -import { - assertStrictEquals, - unitTest, - assertMatch, -} from "./test_util.ts"; +import { assertMatch, assertStrictEquals, unitTest } from "./test_util.ts"; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/cli/tests/unit/dom_exception_test.ts b/cli/tests/unit/dom_exception_test.ts index 2eb7633e10..a93cbfebe5 100644 --- a/cli/tests/unit/dom_exception_test.ts +++ b/cli/tests/unit/dom_exception_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals, assert } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function testDomError() { const de = new DOMException("foo", "bar"); diff --git a/cli/tests/unit/event_target_test.ts b/cli/tests/unit/event_target_test.ts index 34f9019d31..10293a0e94 100644 --- a/cli/tests/unit/event_target_test.ts +++ b/cli/tests/unit/event_target_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest(function addEventListenerTest(): void { const document = new EventTarget(); diff --git a/cli/tests/unit/event_test.ts b/cli/tests/unit/event_test.ts index ce3076e58a..5c8766b36b 100644 --- a/cli/tests/unit/event_test.ts +++ b/cli/tests/unit/event_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals, assert } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function eventInitializedWithType(): void { const type = "click"; diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index 4bdb54d9eb..64309c2694 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, fail, + unitTest, } from "./test_util.ts"; unitTest({ perms: { net: true } }, async function fetchProtocolError(): Promise< diff --git a/cli/tests/unit/file_test.ts b/cli/tests/unit/file_test.ts index f97283b7ff..5abd0e26e8 100644 --- a/cli/tests/unit/file_test.ts +++ b/cli/tests/unit/file_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; // eslint-disable-next-line @typescript-eslint/no-explicit-any function testFirstArgument(arg1: any[], expectedSize: number): void { diff --git a/cli/tests/unit/filereader_test.ts b/cli/tests/unit/filereader_test.ts index 9b2cf1d129..e6fd1cab6a 100644 --- a/cli/tests/unit/filereader_test.ts +++ b/cli/tests/unit/filereader_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest(function fileReaderConstruct(): void { const fr = new FileReader(); diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index 873f89de05..7f0de58517 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/tests/unit/files_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest(function filesStdioFileDescriptors(): void { diff --git a/cli/tests/unit/filter_function_test.ts b/cli/tests/unit/filter_function_test.ts index dd83c1dbcb..2c1d9a7c85 100644 --- a/cli/tests/unit/filter_function_test.ts +++ b/cli/tests/unit/filter_function_test.ts @@ -1,4 +1,4 @@ -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol const { createFilterFn } = Deno[Deno.internal]; diff --git a/cli/tests/unit/form_data_test.ts b/cli/tests/unit/form_data_test.ts index 30e9a83118..b4b998a50a 100644 --- a/cli/tests/unit/form_data_test.ts +++ b/cli/tests/unit/form_data_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertStringContains, + unitTest, } from "./test_util.ts"; unitTest(function formDataHasCorrectNameProp(): void { diff --git a/cli/tests/unit/fs_events_test.ts b/cli/tests/unit/fs_events_test.ts index d730011872..0b30a070d5 100644 --- a/cli/tests/unit/fs_events_test.ts +++ b/cli/tests/unit/fs_events_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; // TODO(ry) Add more tests to specify format. diff --git a/cli/tests/unit/get_random_values_test.ts b/cli/tests/unit/get_random_values_test.ts index 69df0d44b3..1e2dd654f7 100644 --- a/cli/tests/unit/get_random_values_test.ts +++ b/cli/tests/unit/get_random_values_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertNotEquals, assertStrictEquals } from "./test_util.ts"; +import { assertNotEquals, assertStrictEquals, unitTest } from "./test_util.ts"; unitTest(function getRandomValuesInt8Array(): void { const arr = new Int8Array(32); diff --git a/cli/tests/unit/globals_test.ts b/cli/tests/unit/globals_test.ts index 5fc125296e..6c83b1b444 100644 --- a/cli/tests/unit/globals_test.ts +++ b/cli/tests/unit/globals_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert } from "./test_util.ts"; +import { assert, unitTest } from "./test_util.ts"; unitTest(function globalThisExists(): void { assert(globalThis != null); diff --git a/cli/tests/unit/headers_test.ts b/cli/tests/unit/headers_test.ts index 5dc23355cb..7ed7e1e2e3 100644 --- a/cli/tests/unit/headers_test.ts +++ b/cli/tests/unit/headers_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertStringContains, + unitTest, } from "./test_util.ts"; const { inspectArgs, diff --git a/cli/tests/unit/internals_test.ts b/cli/tests/unit/internals_test.ts index e59783e544..f8b8df6981 100644 --- a/cli/tests/unit/internals_test.ts +++ b/cli/tests/unit/internals_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert } from "./test_util.ts"; +import { assert, unitTest } from "./test_util.ts"; unitTest(function internalsExists(): void { const { diff --git a/cli/tests/unit/io_test.ts b/cli/tests/unit/io_test.ts index 0ccd83ea25..9ca03f8f62 100644 --- a/cli/tests/unit/io_test.ts +++ b/cli/tests/unit/io_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; const DEFAULT_BUF_SIZE = 32 * 1024; diff --git a/cli/tests/unit/link_test.ts b/cli/tests/unit/link_test.ts index db910ee7c1..a8399fb943 100644 --- a/cli/tests/unit/link_test.ts +++ b/cli/tests/unit/link_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest( { perms: { read: true, write: true } }, diff --git a/cli/tests/unit/make_temp_test.ts b/cli/tests/unit/make_temp_test.ts index 05a422cfd2..4f94ccb149 100644 --- a/cli/tests/unit/make_temp_test.ts +++ b/cli/tests/unit/make_temp_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest({ perms: { write: true } }, function makeTempDirSyncSuccess(): void { diff --git a/cli/tests/unit/metrics_test.ts b/cli/tests/unit/metrics_test.ts index 48ddf30d7e..0070ca7df4 100644 --- a/cli/tests/unit/metrics_test.ts +++ b/cli/tests/unit/metrics_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert } from "./test_util.ts"; +import { assert, unitTest } from "./test_util.ts"; unitTest(async function metrics(): Promise { const m1 = Deno.metrics(); diff --git a/cli/tests/unit/mkdir_test.ts b/cli/tests/unit/mkdir_test.ts index 449c79747d..9ab6dc4d2b 100644 --- a/cli/tests/unit/mkdir_test.ts +++ b/cli/tests/unit/mkdir_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; function assertDirectory(path: string, mode?: number): void { diff --git a/cli/tests/unit/net_test.ts b/cli/tests/unit/net_test.ts index 793082ced2..2c61343189 100644 --- a/cli/tests/unit/net_test.ts +++ b/cli/tests/unit/net_test.ts @@ -1,12 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, + assertNotEquals, assertThrows, assertThrowsAsync, createResolvable, - assertNotEquals, + unitTest, } from "./test_util.ts"; unitTest({ perms: { net: true } }, function netTcpListenClose(): void { diff --git a/cli/tests/unit/path_from_url_test.ts b/cli/tests/unit/path_from_url_test.ts index 047451d482..d086ce1dc5 100644 --- a/cli/tests/unit/path_from_url_test.ts +++ b/cli/tests/unit/path_from_url_test.ts @@ -1,4 +1,4 @@ -import { assertThrows, assertEquals, unitTest } from "./test_util.ts"; +import { assertEquals, assertThrows, unitTest } from "./test_util.ts"; // @ts-expect-error TypeScript (as of 3.7) does not support indexing namespaces by symbol const { pathFromURL } = Deno[Deno.internal]; diff --git a/cli/tests/unit/performance_test.ts b/cli/tests/unit/performance_test.ts index 7b2fa5cefd..2a25887dbb 100644 --- a/cli/tests/unit/performance_test.ts +++ b/cli/tests/unit/performance_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, createResolvable, + unitTest, } from "./test_util.ts"; unitTest({ perms: { hrtime: false } }, async function performanceNow(): Promise< diff --git a/cli/tests/unit/permissions_test.ts b/cli/tests/unit/permissions_test.ts index 21fa1d27b8..ed6298ee85 100644 --- a/cli/tests/unit/permissions_test.ts +++ b/cli/tests/unit/permissions_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertThrows, assertThrowsAsync } from "./test_util.ts"; +import { assertThrows, assertThrowsAsync, unitTest } from "./test_util.ts"; unitTest(async function permissionInvalidName(): Promise { await assertThrowsAsync(async () => { diff --git a/cli/tests/unit/process_test.ts b/cli/tests/unit/process_test.ts index 76b7552955..ef3f5023ef 100644 --- a/cli/tests/unit/process_test.ts +++ b/cli/tests/unit/process_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, - assertThrows, assertEquals, assertStringContains, + assertThrows, unitTest, } from "./test_util.ts"; diff --git a/cli/tests/unit/progressevent_test.ts b/cli/tests/unit/progressevent_test.ts index 4f852e4585..0080291f04 100644 --- a/cli/tests/unit/progressevent_test.ts +++ b/cli/tests/unit/progressevent_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest(function progressEventConstruct(): void { const progressEventDefs = new ProgressEvent("progressEventType", {}); diff --git a/cli/tests/unit/read_dir_test.ts b/cli/tests/unit/read_dir_test.ts index 97c45dac3b..0a1fe76d7d 100644 --- a/cli/tests/unit/read_dir_test.ts +++ b/cli/tests/unit/read_dir_test.ts @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, pathToAbsoluteFileUrl, + unitTest, } from "./test_util.ts"; function assertSameContent(files: Deno.DirEntry[]): void { diff --git a/cli/tests/unit/read_file_test.ts b/cli/tests/unit/read_file_test.ts index 06141002dd..2e9def581d 100644 --- a/cli/tests/unit/read_file_test.ts +++ b/cli/tests/unit/read_file_test.ts @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, pathToAbsoluteFileUrl, + unitTest, } from "./test_util.ts"; unitTest({ perms: { read: true } }, function readFileSyncSuccess(): void { diff --git a/cli/tests/unit/read_link_test.ts b/cli/tests/unit/read_link_test.ts index a4baeb7922..0e8390f6a3 100644 --- a/cli/tests/unit/read_link_test.ts +++ b/cli/tests/unit/read_link_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/cli/tests/unit/read_text_file_test.ts b/cli/tests/unit/read_text_file_test.ts index 98275f7817..dc6a901bb6 100644 --- a/cli/tests/unit/read_text_file_test.ts +++ b/cli/tests/unit/read_text_file_test.ts @@ -1,10 +1,10 @@ import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, pathToAbsoluteFileUrl, + unitTest, } from "./test_util.ts"; unitTest({ perms: { read: true } }, function readTextFileSyncSuccess(): void { diff --git a/cli/tests/unit/real_path_test.ts b/cli/tests/unit/real_path_test.ts index 1036f61329..d00aed0dd9 100644 --- a/cli/tests/unit/real_path_test.ts +++ b/cli/tests/unit/real_path_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest({ perms: { read: true } }, function realPathSyncSuccess(): void { diff --git a/cli/tests/unit/remove_test.ts b/cli/tests/unit/remove_test.ts index 14c960da52..add1a96481 100644 --- a/cli/tests/unit/remove_test.ts +++ b/cli/tests/unit/remove_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; const REMOVE_METHODS = ["remove", "removeSync"] as const; diff --git a/cli/tests/unit/rename_test.ts b/cli/tests/unit/rename_test.ts index dfde8dc05a..57c3a4cee4 100644 --- a/cli/tests/unit/rename_test.ts +++ b/cli/tests/unit/rename_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; function assertMissing(path: string): void { let caughtErr = false; diff --git a/cli/tests/unit/request_test.ts b/cli/tests/unit/request_test.ts index 24f5b6d823..c8b8377d4f 100644 --- a/cli/tests/unit/request_test.ts +++ b/cli/tests/unit/request_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function fromInit(): void { const req = new Request("https://example.com", { diff --git a/cli/tests/unit/resources_test.ts b/cli/tests/unit/resources_test.ts index 4e4288ff9f..9c2aec91a5 100644 --- a/cli/tests/unit/resources_test.ts +++ b/cli/tests/unit/resources_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals, assert, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest(function resourcesCloseBadArgs(): void { assertThrows(() => { diff --git a/cli/tests/unit/response_test.ts b/cli/tests/unit/response_test.ts index 13a8570d7b..163a92835a 100644 --- a/cli/tests/unit/response_test.ts +++ b/cli/tests/unit/response_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(async function responseText() { const response = new Response("hello world"); diff --git a/cli/tests/unit/signal_test.ts b/cli/tests/unit/signal_test.ts index 98eac6e0b2..2ea1e865ff 100644 --- a/cli/tests/unit/signal_test.ts +++ b/cli/tests/unit/signal_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, createResolvable, + unitTest, } from "./test_util.ts"; function defer(n: number): Promise { diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts index a7911b9c91..d351a188e2 100644 --- a/cli/tests/unit/stat_test.ts +++ b/cli/tests/unit/stat_test.ts @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, pathToAbsoluteFileUrl, + unitTest, } from "./test_util.ts"; unitTest({ perms: { read: true } }, function fstatSyncSuccess(): void { diff --git a/cli/tests/unit/stdio_test.ts b/cli/tests/unit/stdio_test.ts index 244ebcd476..d5a7304a73 100644 --- a/cli/tests/unit/stdio_test.ts +++ b/cli/tests/unit/stdio_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest(async function stdioStdinRead() { const nread = await Deno.stdin.read(new Uint8Array(0)); diff --git a/cli/tests/unit/streams_internal_test.ts b/cli/tests/unit/streams_internal_test.ts index caeab431d9..096fcef3cd 100644 --- a/cli/tests/unit/streams_internal_test.ts +++ b/cli/tests/unit/streams_internal_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertThrows } from "./test_util.ts"; +import { assertThrows, unitTest } from "./test_util.ts"; unitTest(function streamReadableHwmError() { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/cli/tests/unit/streams_piping_test.ts b/cli/tests/unit/streams_piping_test.ts index 0696021cb5..959d2e478c 100644 --- a/cli/tests/unit/streams_piping_test.ts +++ b/cli/tests/unit/streams_piping_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; import { assertThrowsAsync } from "../../../std/testing/asserts.ts"; unitTest(function streamPipeLocks() { diff --git a/cli/tests/unit/streams_transform_test.ts b/cli/tests/unit/streams_transform_test.ts index fa321daf2f..b07fccffbd 100644 --- a/cli/tests/unit/streams_transform_test.ts +++ b/cli/tests/unit/streams_transform_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assert, assertEquals, assertNotEquals, assertThrows, + unitTest, } from "./test_util.ts"; function delay(seconds: number): Promise { diff --git a/cli/tests/unit/streams_writable_test.ts b/cli/tests/unit/streams_writable_test.ts index a06b15c7e6..e712ee83c5 100644 --- a/cli/tests/unit/streams_writable_test.ts +++ b/cli/tests/unit/streams_writable_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest(function writableStreamDesiredSizeOnReleasedWriter() { const ws = new WritableStream(); diff --git a/cli/tests/unit/symlink_test.ts b/cli/tests/unit/symlink_test.ts index b7babc88a9..27cbdcdca8 100644 --- a/cli/tests/unit/symlink_test.ts +++ b/cli/tests/unit/symlink_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertThrows } from "./test_util.ts"; +import { assert, assertThrows, unitTest } from "./test_util.ts"; unitTest( { perms: { read: true, write: true } }, diff --git a/cli/tests/unit/sync_test.ts b/cli/tests/unit/sync_test.ts index d16ab60d49..e062c3f16a 100644 --- a/cli/tests/unit/sync_test.ts +++ b/cli/tests/unit/sync_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest( { perms: { read: true, write: true } }, diff --git a/cli/tests/unit/test_util.ts b/cli/tests/unit/test_util.ts index 865b6e061d..746eb2c176 100644 --- a/cli/tests/unit/test_util.ts +++ b/cli/tests/unit/test_util.ts @@ -6,15 +6,15 @@ export { colors }; import { resolve } from "../../../std/path/mod.ts"; export { assert, - assertThrows, - assertThrowsAsync, assertEquals, assertMatch, assertNotEquals, assertStrictEquals, assertStringContains, - unreachable, + assertThrows, + assertThrowsAsync, fail, + unreachable, } from "../../../std/testing/asserts.ts"; export { readLines } from "../../../std/io/bufio.ts"; export { parse as parseArgs } from "../../../std/flags/mod.ts"; diff --git a/cli/tests/unit/text_encoding_test.ts b/cli/tests/unit/text_encoding_test.ts index e990f12844..23799fba37 100644 --- a/cli/tests/unit/text_encoding_test.ts +++ b/cli/tests/unit/text_encoding_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest(function btoaSuccess(): void { const text = "hello world"; diff --git a/cli/tests/unit/timers_test.ts b/cli/tests/unit/timers_test.ts index 036900f7c8..b304d89466 100644 --- a/cli/tests/unit/timers_test.ts +++ b/cli/tests/unit/timers_test.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, - createResolvable, assert, assertEquals, assertNotEquals, + createResolvable, + unitTest, } from "./test_util.ts"; function waitForMs(ms: number): Promise { diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts index ed7466a2c9..058abf5d70 100644 --- a/cli/tests/unit/tls_test.ts +++ b/cli/tests/unit/tls_test.ts @@ -7,7 +7,7 @@ import { createResolvable, unitTest, } from "./test_util.ts"; -import { BufWriter, BufReader } from "../../../std/io/bufio.ts"; +import { BufReader, BufWriter } from "../../../std/io/bufio.ts"; import { TextProtoReader } from "../../../std/textproto/mod.ts"; const encoder = new TextEncoder(); diff --git a/cli/tests/unit/truncate_test.ts b/cli/tests/unit/truncate_test.ts index db2cdc4be9..b603ebaea1 100644 --- a/cli/tests/unit/truncate_test.ts +++ b/cli/tests/unit/truncate_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/cli/tests/unit/tty_test.ts b/cli/tests/unit/tty_test.ts index 7e98737915..c32bfa3373 100644 --- a/cli/tests/unit/tty_test.ts +++ b/cli/tests/unit/tty_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertThrows } from "./test_util.ts"; +import { assert, assertThrows, unitTest } from "./test_util.ts"; // Note tests for Deno.setRaw is in integration tests. diff --git a/cli/tests/unit/umask_test.ts b/cli/tests/unit/umask_test.ts index 6fe51254d1..e84401d69c 100644 --- a/cli/tests/unit/umask_test.ts +++ b/cli/tests/unit/umask_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assertEquals } from "./test_util.ts"; +import { assertEquals, unitTest } from "./test_util.ts"; unitTest( { diff --git a/cli/tests/unit/unit_test_runner.ts b/cli/tests/unit/unit_test_runner.ts index 815a501f29..07793085a4 100755 --- a/cli/tests/unit/unit_test_runner.ts +++ b/cli/tests/unit/unit_test_runner.ts @@ -2,14 +2,14 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; import { - REGISTERED_UNIT_TESTS, colors, - readLines, - permissionCombinations, - Permissions, - registerUnitTests, fmtPerms, parseArgs, + permissionCombinations, + Permissions, + readLines, + REGISTERED_UNIT_TESTS, + registerUnitTests, reportToConn, } from "./test_util.ts"; diff --git a/cli/tests/unit/url_search_params_test.ts b/cli/tests/unit/url_search_params_test.ts index 5e1d2afb53..96b5242651 100644 --- a/cli/tests/unit/url_search_params_test.ts +++ b/cli/tests/unit/url_search_params_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function urlSearchParamsWithMultipleSpaces(): void { const init = { str: "this string has spaces in it" }; diff --git a/cli/tests/unit/url_test.ts b/cli/tests/unit/url_test.ts index bf367df76e..e9632c7de1 100644 --- a/cli/tests/unit/url_test.ts +++ b/cli/tests/unit/url_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { unitTest, assert, assertEquals, assertThrows } from "./test_util.ts"; +import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; unitTest(function urlParsing(): void { const url = new URL( diff --git a/cli/tests/unit/utime_test.ts b/cli/tests/unit/utime_test.ts index e64d1d892e..9045755dc7 100644 --- a/cli/tests/unit/utime_test.ts +++ b/cli/tests/unit/utime_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/cli/tests/unit/version_test.ts b/cli/tests/unit/version_test.ts index 0417b27de6..f581afd835 100644 --- a/cli/tests/unit/version_test.ts +++ b/cli/tests/unit/version_test.ts @@ -1,4 +1,4 @@ -import { unitTest, assert } from "./test_util.ts"; +import { assert, unitTest } from "./test_util.ts"; unitTest(function version(): void { const pattern = /^\d+\.\d+\.\d+/; diff --git a/cli/tests/unit/write_file_test.ts b/cli/tests/unit/write_file_test.ts index a48333b9d1..b66be3623c 100644 --- a/cli/tests/unit/write_file_test.ts +++ b/cli/tests/unit/write_file_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - unitTest, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/cli/tests/unit/write_text_file_test.ts b/cli/tests/unit/write_text_file_test.ts index 42c72de7a1..f41f8f6633 100644 --- a/cli/tests/unit/write_text_file_test.ts +++ b/cli/tests/unit/write_text_file_test.ts @@ -1,9 +1,9 @@ import { - unitTest, assert, assertEquals, assertThrows, assertThrowsAsync, + unitTest, } from "./test_util.ts"; unitTest( diff --git a/docs/examples/import_export.md b/docs/examples/import_export.md index f2cd782223..e036f874d8 100644 --- a/docs/examples/import_export.md +++ b/docs/examples/import_export.md @@ -20,10 +20,7 @@ specified in full. You may not omit the file extension and there is no special handling of `index.js`. ```js -import { - add, - multiply, -} from "./arithmetic.ts"; +import { add, multiply } from "./arithmetic.ts"; ``` Dependencies are also imported directly, there is no package management diff --git a/docs/examples/manage_dependencies.md b/docs/examples/manage_dependencies.md index 44b3082f8f..357eccb4b2 100644 --- a/docs/examples/manage_dependencies.md +++ b/docs/examples/manage_dependencies.md @@ -55,10 +55,7 @@ local `deps.ts` module. * example.ts */ -import { - add, - multiply, -} from "./deps.ts"; +import { add, multiply } from "./deps.ts"; function totalCost(outbound: number, inbound: number, tax: number): number { return multiply(add(outbound, inbound), tax); diff --git a/docs/testing.md b/docs/testing.md index f92f5fadd0..fcf6a3c1d9 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -32,8 +32,8 @@ https://deno.land/std@$STD_VERSION/testing#usage to make testing easier: ```ts import { - assertEquals, assertArrayContains, + assertEquals, } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts"; Deno.test("hello world", () => { diff --git a/docs/tools/bundler.md b/docs/tools/bundler.md index 292adb5f42..e8044facf0 100644 --- a/docs/tools/bundler.md +++ b/docs/tools/bundler.md @@ -31,7 +31,7 @@ export const bar = "bar"; It could be imported like this: ```ts -import { foo, bar } from "./lib.bundle.js"; +import { bar, foo } from "./lib.bundle.js"; ``` Bundles can also be loaded in the web browser. The bundle is a self-contained ES diff --git a/std/_util/deep_assign_test.ts b/std/_util/deep_assign_test.ts index 14e81348dc..1372c25e97 100644 --- a/std/_util/deep_assign_test.ts +++ b/std/_util/deep_assign_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assert } from "../testing/asserts.ts"; +import { assert, assertEquals } from "../testing/asserts.ts"; import { deepAssign } from "./deep_assign.ts"; Deno.test("deepAssignTest", function (): void { diff --git a/std/archive/tar_test.ts b/std/archive/tar_test.ts index 00ecbbf45f..ff1ada4d52 100644 --- a/std/archive/tar_test.ts +++ b/std/archive/tar_test.ts @@ -9,9 +9,9 @@ * **to run this test** * deno run --allow-read archive/tar_test.ts */ -import { assertEquals, assert } from "../testing/asserts.ts"; +import { assert, assertEquals } from "../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../path/mod.ts"; +import { dirname, fromFileUrl, resolve } from "../path/mod.ts"; import { Tar, Untar } from "./tar.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); diff --git a/std/bytes/test.ts b/std/bytes/test.ts index 6dffad17f9..46f8191935 100644 --- a/std/bytes/test.ts +++ b/std/bytes/test.ts @@ -1,18 +1,18 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - findIndex, - findLastIndex, - equal, - hasPrefix, - hasSuffix, - repeat, concat, contains, copyBytes, + equal, + findIndex, + findLastIndex, + hasPrefix, + hasSuffix, + repeat, } from "./mod.ts"; -import { assertEquals, assertThrows, assert } from "../testing/asserts.ts"; -import { encode, decode } from "../encoding/utf8.ts"; +import { assert, assertEquals, assertThrows } from "../testing/asserts.ts"; +import { decode, encode } from "../encoding/utf8.ts"; Deno.test("[bytes] findIndex1", () => { const i = findIndex( diff --git a/std/datetime/formatter.ts b/std/datetime/formatter.ts index 6f11090f09..b27a3824e0 100644 --- a/std/datetime/formatter.ts +++ b/std/datetime/formatter.ts @@ -1,11 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { CallbackResult, + ReceiverResult, Rule, TestFunction, TestResult, Tokenizer, - ReceiverResult, } from "./tokenizer.ts"; function digits(value: string | number, count = 2): string { diff --git a/std/encoding/README.md b/std/encoding/README.md index fa97537771..21797a4518 100644 --- a/std/encoding/README.md +++ b/std/encoding/README.md @@ -308,7 +308,7 @@ for Deno decodes the given RFC4648 base32 representation to a `Uint8Array`. ```ts -import { encode, decode } from "https://deno.land/std/encoding/base32.ts"; +import { decode, encode } from "https://deno.land/std/encoding/base32.ts"; const b32Repr = "RC2E6GA="; @@ -330,7 +330,7 @@ Ascii85/base85 encoder and decoder with support for multiple standards decodes the given ascii85 representation to a `Uint8Array`. ```ts -import { encode, decode } from "https://deno.land/std/encoding/ascii85.ts"; +import { decode, encode } from "https://deno.land/std/encoding/ascii85.ts"; const a85Repr = "LpTqp"; @@ -359,7 +359,7 @@ supported by other encodings.) encoding examples: ```ts -import { encode, decode } from "https://deno.land/std/encoding/ascii85.ts"; +import { decode, encode } from "https://deno.land/std/encoding/ascii85.ts"; const binaryData = new Uint8Array([136, 180, 79, 24]); console.log(encode(binaryData)); // => LpTqp diff --git a/std/encoding/_yaml/dumper/dumper_state.ts b/std/encoding/_yaml/dumper/dumper_state.ts index 63b04983e3..31fe86f56f 100644 --- a/std/encoding/_yaml/dumper/dumper_state.ts +++ b/std/encoding/_yaml/dumper/dumper_state.ts @@ -6,7 +6,7 @@ import type { Schema, SchemaDefinition } from "../schema.ts"; import { State } from "../state.ts"; import type { StyleVariant, Type } from "../type.ts"; -import type { ArrayObject, Any } from "../utils.ts"; +import type { Any, ArrayObject } from "../utils.ts"; const _hasOwnProperty = Object.prototype.hasOwnProperty; diff --git a/std/encoding/_yaml/schema.ts b/std/encoding/_yaml/schema.ts index b955e5df83..dfb8589c17 100644 --- a/std/encoding/_yaml/schema.ts +++ b/std/encoding/_yaml/schema.ts @@ -5,7 +5,7 @@ import { YAMLError } from "./error.ts"; import type { KindType, Type } from "./type.ts"; -import type { ArrayObject, Any } from "./utils.ts"; +import type { Any, ArrayObject } from "./utils.ts"; function compileList( schema: Schema, diff --git a/std/encoding/_yaml/type.ts b/std/encoding/_yaml/type.ts index 89a91106ba..f6ce9591c7 100644 --- a/std/encoding/_yaml/type.ts +++ b/std/encoding/_yaml/type.ts @@ -3,7 +3,7 @@ // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license. // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import type { ArrayObject, Any } from "./utils.ts"; +import type { Any, ArrayObject } from "./utils.ts"; export type KindType = "sequence" | "scalar" | "mapping"; export type StyleVariant = "lowercase" | "uppercase" | "camelcase" | "decimal"; diff --git a/std/encoding/_yaml/type/float.ts b/std/encoding/_yaml/type/float.ts index 6d59ed9edf..93635ba251 100644 --- a/std/encoding/_yaml/type/float.ts +++ b/std/encoding/_yaml/type/float.ts @@ -4,7 +4,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { StyleVariant, Type } from "../type.ts"; -import { isNegativeZero, Any } from "../utils.ts"; +import { Any, isNegativeZero } from "../utils.ts"; const YAML_FLOAT_PATTERN = new RegExp( // 2.5e4, 2.5 and integers diff --git a/std/encoding/_yaml/type/int.ts b/std/encoding/_yaml/type/int.ts index 6a86aafe9d..5186140e48 100644 --- a/std/encoding/_yaml/type/int.ts +++ b/std/encoding/_yaml/type/int.ts @@ -4,7 +4,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { Type } from "../type.ts"; -import { isNegativeZero, Any } from "../utils.ts"; +import { Any, isNegativeZero } from "../utils.ts"; function isHexCode(c: number): boolean { return ( diff --git a/std/encoding/ascii85_test.ts b/std/encoding/ascii85_test.ts index 02af70964e..cea939faf1 100644 --- a/std/encoding/ascii85_test.ts +++ b/std/encoding/ascii85_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { encode, decode, Ascii85Standard } from "./ascii85.ts"; +import { Ascii85Standard, decode, encode } from "./ascii85.ts"; type TestCases = Partial<{ [index in Ascii85Standard]: string[][] }>; const utf8encoder = new TextEncoder(); const testCasesNoDelimeter: TestCases = { diff --git a/std/encoding/base32_test.ts b/std/encoding/base32_test.ts index cfefe54d7d..a604bf3231 100644 --- a/std/encoding/base32_test.ts +++ b/std/encoding/base32_test.ts @@ -1,8 +1,8 @@ // Test cases copied from https://github.com/LinusU/base32-encode/blob/master/test.js // Copyright (c) 2016-2017 Linus Unnebäck. MIT license. // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assert } from "../testing/asserts.ts"; -import { encode, decode } from "./base32.ts"; +import { assert, assertEquals } from "../testing/asserts.ts"; +import { decode, encode } from "./base32.ts"; // Lifted from https://stackoverflow.com/questions/38987784 const fromHexString = (hexString: string): Uint8Array => diff --git a/std/encoding/base64_test.ts b/std/encoding/base64_test.ts index 9e549c6980..5fe89410b9 100644 --- a/std/encoding/base64_test.ts +++ b/std/encoding/base64_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { encode, decode, decodeString } from "./base64.ts"; +import { decode, decodeString, encode } from "./base64.ts"; const testsetString = [ ["", ""], diff --git a/std/encoding/base64url_test.ts b/std/encoding/base64url_test.ts index 9a864a87c2..59d67240f4 100644 --- a/std/encoding/base64url_test.ts +++ b/std/encoding/base64url_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { encode, decode } from "./base64url.ts"; +import { decode, encode } from "./base64url.ts"; const testsetString = [ ["", ""], diff --git a/std/encoding/binary_test.ts b/std/encoding/binary_test.ts index 89a5b8c8e6..a4e3cb144d 100644 --- a/std/encoding/binary_test.ts +++ b/std/encoding/binary_test.ts @@ -9,11 +9,11 @@ import { readVarnum, sizeof, varbig, + varbigBytes, varnum, + varnumBytes, writeVarbig, writeVarnum, - varbigBytes, - varnumBytes, } from "./binary.ts"; Deno.test("testGetNBytes", async function (): Promise { diff --git a/std/encoding/csv_test.ts b/std/encoding/csv_test.ts index aab9e86b11..1a2d892cca 100644 --- a/std/encoding/csv_test.ts +++ b/std/encoding/csv_test.ts @@ -6,13 +6,13 @@ import { assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; import { - readMatrix, - parse, ERR_BARE_QUOTE, - ERR_QUOTE, - ERR_INVALID_DELIM, ERR_FIELD_COUNT, + ERR_INVALID_DELIM, + ERR_QUOTE, + parse, ParseError, + readMatrix, } from "./csv.ts"; import { StringReader } from "../io/readers.ts"; import { BufReader } from "../io/bufio.ts"; diff --git a/std/encoding/hex_test.ts b/std/encoding/hex_test.ts index 0cf39ad2e9..d1a4002c63 100644 --- a/std/encoding/hex_test.ts +++ b/std/encoding/hex_test.ts @@ -7,14 +7,14 @@ import { assertEquals, assertThrows } from "../testing/asserts.ts"; import { - encodedLen, - encode, - encodeToString, - decodedLen, decode, + decodedLen, decodeString, - errLength, + encode, + encodedLen, + encodeToString, errInvalidByte, + errLength, } from "./hex.ts"; function toByte(s: string): number { diff --git a/std/examples/chat/server.ts b/std/examples/chat/server.ts index 238d61fffe..ce2e196f3e 100644 --- a/std/examples/chat/server.ts +++ b/std/examples/chat/server.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { listenAndServe } from "../../http/server.ts"; import { - acceptWebSocket, acceptable, - WebSocket, + acceptWebSocket, isWebSocketCloseEvent, + WebSocket, } from "../../ws/mod.ts"; import { fromFileUrl } from "../../path/mod.ts"; diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts index 336b188e93..5e30b4ba79 100644 --- a/std/examples/chat/server_test.ts +++ b/std/examples/chat/server_test.ts @@ -3,7 +3,7 @@ import { assert, assertEquals } from "../../testing/asserts.ts"; import { TextProtoReader } from "../../textproto/mod.ts"; import { BufReader } from "../../io/bufio.ts"; import { delay } from "../../async/delay.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; +import { dirname, fromFileUrl, resolve } from "../../path/mod.ts"; const moduleDir = resolve(dirname(fromFileUrl(import.meta.url))); diff --git a/std/examples/colors.ts b/std/examples/colors.ts index c4cab7e78d..5c0f1ac77f 100644 --- a/std/examples/colors.ts +++ b/std/examples/colors.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { bgBlue, red, bold, italic } from "../fmt/colors.ts"; +import { bgBlue, bold, italic, red } from "../fmt/colors.ts"; if (import.meta.main) { console.log(bgBlue(italic(red(bold("Hello world!"))))); diff --git a/std/examples/echo_server_test.ts b/std/examples/echo_server_test.ts index 1a5286a0ee..5334cb610c 100644 --- a/std/examples/echo_server_test.ts +++ b/std/examples/echo_server_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals, assertNotEquals } from "../testing/asserts.ts"; +import { assertNotEquals, assertStrictEquals } from "../testing/asserts.ts"; import { BufReader, ReadLineResult } from "../io/bufio.ts"; import { dirname, fromFileUrl } from "../path/mod.ts"; diff --git a/std/examples/test.ts b/std/examples/test.ts index a8ac8c74e3..a7b09d5bc3 100644 --- a/std/examples/test.ts +++ b/std/examples/test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { dirname, relative, resolve, fromFileUrl } from "../path/mod.ts"; +import { dirname, fromFileUrl, relative, resolve } from "../path/mod.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); diff --git a/std/examples/xeval_test.ts b/std/examples/xeval_test.ts index 93e664ddef..6ace4f5327 100644 --- a/std/examples/xeval_test.ts +++ b/std/examples/xeval_test.ts @@ -3,9 +3,9 @@ import { xeval } from "./xeval.ts"; import { StringReader } from "../io/readers.ts"; import { decode, encode } from "../encoding/utf8.ts"; import { + assert, assertEquals, assertStringContains, - assert, } from "../testing/asserts.ts"; import { dirname, fromFileUrl } from "../path/mod.ts"; diff --git a/std/fs/_util_test.ts b/std/fs/_util_test.ts index b5fdfe40b7..9a24caaf0d 100644 --- a/std/fs/_util_test.ts +++ b/std/fs/_util_test.ts @@ -2,7 +2,7 @@ import { assertEquals } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; -import { isSubdir, getFileInfoType, PathType } from "./_util.ts"; +import { getFileInfoType, isSubdir, PathType } from "./_util.ts"; import { ensureFileSync } from "./ensure_file.ts"; import { ensureDirSync } from "./ensure_dir.ts"; diff --git a/std/fs/copy.ts b/std/fs/copy.ts index b1b3403543..ed4493da06 100644 --- a/std/fs/copy.ts +++ b/std/fs/copy.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import * as path from "../path/mod.ts"; import { ensureDir, ensureDirSync } from "./ensure_dir.ts"; -import { isSubdir, getFileInfoType } from "./_util.ts"; +import { getFileInfoType, isSubdir } from "./_util.ts"; import { assert } from "../_util/assert.ts"; const isWindows = Deno.build.os === "windows"; diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts index db94512004..859239d108 100644 --- a/std/fs/copy_test.ts +++ b/std/fs/copy_test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { + assert, assertEquals, assertThrows, assertThrowsAsync, - assert, } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; import { copy, copySync } from "./copy.ts"; diff --git a/std/fs/eol_test.ts b/std/fs/eol_test.ts index 35b3e0d9ae..dd427d219e 100644 --- a/std/fs/eol_test.ts +++ b/std/fs/eol_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { format, detect, EOL } from "./eol.ts"; +import { detect, EOL, format } from "./eol.ts"; const CRLFinput = "deno\r\nis not\r\nnode"; const Mixedinput = "deno\nis not\r\nnode"; diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts index c57ddef45d..72907e1571 100644 --- a/std/fs/expand_glob.ts +++ b/std/fs/expand_glob.ts @@ -1,18 +1,18 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { GlobOptions, - SEP_PATTERN, globToRegExp, isAbsolute, isGlob, joinGlobs, normalize, + SEP_PATTERN, } from "../path/mod.ts"; import { - WalkEntry, _createWalkEntry, _createWalkEntrySync, walk, + WalkEntry, walkSync, } from "./walk.ts"; import { assert } from "../_util/assert.ts"; diff --git a/std/fs/expand_glob_test.ts b/std/fs/expand_glob_test.ts index 49c7bf143a..39235906b6 100644 --- a/std/fs/expand_glob_test.ts +++ b/std/fs/expand_glob_test.ts @@ -6,15 +6,15 @@ import { assertStringContains, } from "../testing/asserts.ts"; import { + fromFileUrl, join, joinGlobs, normalize, relative, - fromFileUrl, } from "../path/mod.ts"; import { - ExpandGlobOptions, expandGlob, + ExpandGlobOptions, expandGlobSync, } from "./expand_glob.ts"; diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts index 1352ce4480..c772f49121 100644 --- a/std/fs/walk_test.ts +++ b/std/fs/walk_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { walk, walkSync, WalkOptions, WalkEntry } from "./walk.ts"; +import { walk, WalkEntry, WalkOptions, walkSync } from "./walk.ts"; import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; export function testWalk( diff --git a/std/hash/sha1_test.ts b/std/hash/sha1_test.ts index 89c60fe52e..2caaff49bc 100644 --- a/std/hash/sha1_test.ts +++ b/std/hash/sha1_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { Sha1, Message } from "./sha1.ts"; -import { dirname, join, resolve, fromFileUrl } from "../path/mod.ts"; +import { Message, Sha1 } from "./sha1.ts"; +import { dirname, fromFileUrl, join, resolve } from "../path/mod.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); const testdataDir = resolve(moduleDir, "testdata"); diff --git a/std/hash/sha256_test.ts b/std/hash/sha256_test.ts index fd9c227f4c..1d03ea9874 100644 --- a/std/hash/sha256_test.ts +++ b/std/hash/sha256_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { Sha256, HmacSha256, Message } from "./sha256.ts"; +import { HmacSha256, Message, Sha256 } from "./sha256.ts"; import { assertEquals } from "../testing/asserts.ts"; -import { dirname, join, resolve, fromFileUrl } from "../path/mod.ts"; +import { dirname, fromFileUrl, join, resolve } from "../path/mod.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); const testdataDir = resolve(moduleDir, "testdata"); diff --git a/std/hash/sha512_test.ts b/std/hash/sha512_test.ts index ee49a229d8..b9f72b1508 100644 --- a/std/hash/sha512_test.ts +++ b/std/hash/sha512_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { Sha512, HmacSha512, Message } from "./sha512.ts"; +import { HmacSha512, Message, Sha512 } from "./sha512.ts"; import { assertEquals } from "../testing/asserts.ts"; -import { dirname, join, resolve, fromFileUrl } from "../path/mod.ts"; +import { dirname, fromFileUrl, join, resolve } from "../path/mod.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); const testdataDir = resolve(moduleDir, "testdata"); diff --git a/std/http/_io.ts b/std/http/_io.ts index fefa6f657d..1375edbb5b 100644 --- a/std/http/_io.ts +++ b/std/http/_io.ts @@ -3,7 +3,7 @@ import { BufReader, BufWriter } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; import { assert } from "../_util/assert.ts"; import { encoder } from "../encoding/utf8.ts"; -import { ServerRequest, Response } from "./server.ts"; +import { Response, ServerRequest } from "./server.ts"; import { STATUS_TEXT } from "./http_status.ts"; export function emptyReader(): Deno.Reader { diff --git a/std/http/_io_test.ts b/std/http/_io_test.ts index 7c7b3d8b4a..14675a799c 100644 --- a/std/http/_io_test.ts +++ b/std/http/_io_test.ts @@ -1,22 +1,22 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - assertThrowsAsync, - assertEquals, assert, + assertEquals, assertNotEquals, + assertThrowsAsync, } from "../testing/asserts.ts"; import { bodyReader, chunkedBodyReader, - writeTrailers, - readTrailers, parseHTTPVersion, readRequest, + readTrailers, writeResponse, + writeTrailers, } from "./_io.ts"; -import { encode, decode } from "../encoding/utf8.ts"; +import { decode, encode } from "../encoding/utf8.ts"; import { BufReader, ReadLineResult } from "../io/bufio.ts"; -import { ServerRequest, Response } from "./server.ts"; +import { Response, ServerRequest } from "./server.ts"; import { StringReader } from "../io/readers.ts"; import { mockConn } from "./_mock_conn.ts"; diff --git a/std/http/cookie_test.ts b/std/http/cookie_test.ts index f34f5acae2..0f7c68635c 100644 --- a/std/http/cookie_test.ts +++ b/std/http/cookie_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { ServerRequest, Response } from "./server.ts"; -import { getCookies, deleteCookie, setCookie } from "./cookie.ts"; +import { Response, ServerRequest } from "./server.ts"; +import { deleteCookie, getCookies, setCookie } from "./cookie.ts"; import { assert, assertEquals } from "../testing/asserts.ts"; Deno.test({ diff --git a/std/http/file_server.ts b/std/http/file_server.ts index ff9a073e72..d8751eb84d 100644 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -6,13 +6,13 @@ // TODO Add tests like these: // https://github.com/indexzero/http-server/blob/master/test/http-server-test.js -import { posix, extname } from "../path/mod.ts"; +import { extname, posix } from "../path/mod.ts"; import { + HTTPSOptions, listenAndServe, listenAndServeTLS, - ServerRequest, Response, - HTTPSOptions, + ServerRequest, } from "./server.ts"; import { parse } from "../flags/mod.ts"; import { assert } from "../_util/assert.ts"; diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts index 93e6e55901..d8df631b80 100644 --- a/std/http/file_server_test.ts +++ b/std/http/file_server_test.ts @@ -3,8 +3,8 @@ import { assert, assertEquals } from "../testing/asserts.ts"; import { BufReader } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; import { ServerRequest } from "./server.ts"; -import { serveFile, FileServerArgs } from "./file_server.ts"; -import { resolve, dirname, join, fromFileUrl } from "../path/mod.ts"; +import { FileServerArgs, serveFile } from "./file_server.ts"; +import { dirname, fromFileUrl, join, resolve } from "../path/mod.ts"; let fileServer: Deno.Process; type FileServerCfg = Omit & { target?: string }; diff --git a/std/http/server.ts b/std/http/server.ts index 93f116fff4..7bbdb78298 100644 --- a/std/http/server.ts +++ b/std/http/server.ts @@ -2,13 +2,13 @@ import { encode } from "../encoding/utf8.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; import { assert } from "../_util/assert.ts"; -import { deferred, Deferred, MuxAsyncIterator } from "../async/mod.ts"; +import { Deferred, deferred, MuxAsyncIterator } from "../async/mod.ts"; import { bodyReader, chunkedBodyReader, emptyReader, - writeResponse, readRequest, + writeResponse, } from "./_io.ts"; export class ServerRequest { diff --git a/std/http/server_test.ts b/std/http/server_test.ts index 564ec4e07e..76b0bcff91 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -14,18 +14,18 @@ import { assertThrowsAsync, } from "../testing/asserts.ts"; import { - Response, - ServerRequest, - Server, - serve, - serveTLS, _parseAddrFromStr, + Response, + serve, + Server, + ServerRequest, + serveTLS, } from "./server.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; import { delay } from "../async/delay.ts"; -import { encode, decode } from "../encoding/utf8.ts"; +import { decode, encode } from "../encoding/utf8.ts"; import { mockConn } from "./_mock_conn.ts"; -import { resolve, dirname, join, fromFileUrl } from "../path/mod.ts"; +import { dirname, fromFileUrl, join, resolve } from "../path/mod.ts"; const moduleDir = dirname(fromFileUrl(import.meta.url)); const testdataDir = resolve(moduleDir, "testdata"); diff --git a/std/io/README.md b/std/io/README.md index 09918fcc46..ca0f5f4415 100644 --- a/std/io/README.md +++ b/std/io/README.md @@ -101,9 +101,9 @@ Create a `Writer` object for `string`. ```ts import { - StringWriter, - StringReader, copyN, + StringReader, + StringWriter, } from "https://deno.land/std/io/mod.ts"; const w = new StringWriter("base"); diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index bddefb38cd..d647082ad5 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -5,14 +5,14 @@ // license that can be found in the LICENSE file. import { assert, assertEquals, fail } from "../testing/asserts.ts"; import { + BufferFullError, BufReader, BufWriter, BufWriterSync, - BufferFullError, PartialReadError, ReadLineResult, - readStringDelim, readLines, + readStringDelim, } from "./bufio.ts"; import * as iotest from "./_iotest.ts"; import { StringReader } from "./readers.ts"; diff --git a/std/io/streams_test.ts b/std/io/streams_test.ts index 4579e3668d..81881ceb90 100644 --- a/std/io/streams_test.ts +++ b/std/io/streams_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assert } from "../testing/asserts.ts"; -import { fromStreamWriter, fromStreamReader } from "./streams.ts"; +import { assert, assertEquals } from "../testing/asserts.ts"; +import { fromStreamReader, fromStreamWriter } from "./streams.ts"; function repeat(c: string, bytes: number): Uint8Array { assertEquals(c.length, 1); diff --git a/std/log/handlers.ts b/std/log/handlers.ts index 21c25a816c..c538de3806 100644 --- a/std/log/handlers.ts +++ b/std/log/handlers.ts @@ -1,8 +1,8 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { getLevelByName, LevelName, LogLevels } from "./levels.ts"; import type { LogRecord } from "./logger.ts"; -import { red, yellow, blue, bold } from "../fmt/colors.ts"; -import { existsSync, exists } from "../fs/exists.ts"; +import { blue, bold, red, yellow } from "../fmt/colors.ts"; +import { exists, existsSync } from "../fs/exists.ts"; import { BufWriterSync } from "../io/bufio.ts"; const DEFAULT_FORMATTER = "{levelName} {msg}"; diff --git a/std/log/handlers_test.ts b/std/log/handlers_test.ts index 8921dd542a..52c1edb642 100644 --- a/std/log/handlers_test.ts +++ b/std/log/handlers_test.ts @@ -2,15 +2,15 @@ import { assert, assertEquals, - assertThrowsAsync, assertNotEquals, + assertThrowsAsync, } from "../testing/asserts.ts"; import { - LogLevels, - LogLevelNames, - getLevelName, getLevelByName, + getLevelName, LevelName, + LogLevelNames, + LogLevels, } from "./levels.ts"; import { BaseHandler, FileHandler, RotatingFileHandler } from "./handlers.ts"; import { LogRecord } from "./logger.ts"; diff --git a/std/log/logger.ts b/std/log/logger.ts index c00ab78ece..e3ffc224a6 100644 --- a/std/log/logger.ts +++ b/std/log/logger.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { LogLevels, getLevelByName, getLevelName } from "./levels.ts"; +import { getLevelByName, getLevelName, LogLevels } from "./levels.ts"; import type { LevelName } from "./levels.ts"; import type { BaseHandler } from "./handlers.ts"; diff --git a/std/log/logger_test.ts b/std/log/logger_test.ts index 08080356ba..4ab50809f8 100644 --- a/std/log/logger_test.ts +++ b/std/log/logger_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertEquals, assert } from "../testing/asserts.ts"; -import { LogRecord, Logger } from "./logger.ts"; -import { LogLevels, LevelName } from "./levels.ts"; +import { assert, assertEquals } from "../testing/asserts.ts"; +import { Logger, LogRecord } from "./logger.ts"; +import { LevelName, LogLevels } from "./levels.ts"; import { BaseHandler } from "./handlers.ts"; class TestHandler extends BaseHandler { diff --git a/std/log/mod.ts b/std/log/mod.ts index 512de534bf..167d86a5c1 100644 --- a/std/log/mod.ts +++ b/std/log/mod.ts @@ -4,9 +4,9 @@ import type { GenericFunction } from "./logger.ts"; import { BaseHandler, ConsoleHandler, - WriterHandler, FileHandler, RotatingFileHandler, + WriterHandler, } from "./handlers.ts"; import { assert } from "../_util/assert.ts"; import type { LevelName } from "./levels.ts"; diff --git a/std/log/mod_test.ts b/std/log/mod_test.ts index 30c6b09142..f2467ef68e 100644 --- a/std/log/mod_test.ts +++ b/std/log/mod_test.ts @@ -1,16 +1,16 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals } from "../testing/asserts.ts"; import { - getLogger, - debug, - info, - warning, - error, critical, - setup, + debug, + error, + getLogger, + info, + LevelName, Logger, LogLevels, - LevelName, + setup, + warning, } from "./mod.ts"; import { BaseHandler } from "./handlers.ts"; diff --git a/std/log/test.ts b/std/log/test.ts index 0c0ab07032..23eac7ff45 100644 --- a/std/log/test.ts +++ b/std/log/test.ts @@ -2,10 +2,10 @@ import { assertEquals, assertThrows } from "../testing/asserts.ts"; import * as log from "./mod.ts"; import { - LogLevelNames, - LevelName, getLevelByName, getLevelName, + LevelName, + LogLevelNames, } from "./levels.ts"; class TestHandler extends log.handlers.BaseHandler { diff --git a/std/mime/multipart_test.ts b/std/mime/multipart_test.ts index df533194c8..3180009c81 100644 --- a/std/mime/multipart_test.ts +++ b/std/mime/multipart_test.ts @@ -7,10 +7,10 @@ import { } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; import { - MultipartReader, - MultipartWriter, isFormFile, matchAfterPrefix, + MultipartReader, + MultipartWriter, scanUntilBoundary, } from "./multipart.ts"; import { StringWriter } from "../io/writers.ts"; diff --git a/std/node/_fs/_fs_appendFile.ts b/std/node/_fs/_fs_appendFile.ts index bc30de6098..cb51def67c 100644 --- a/std/node/_fs/_fs_appendFile.ts +++ b/std/node/_fs/_fs_appendFile.ts @@ -1,10 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - Encodings, - WriteFileOptions, - isFileOptions, CallbackWithError, + Encodings, getOpenOptions, + isFileOptions, + WriteFileOptions, } from "./_fs_common.ts"; import { notImplemented } from "../_utils.ts"; import { fromFileUrl } from "../path.ts"; diff --git a/std/node/_fs/_fs_chmod_test.ts b/std/node/_fs/_fs_chmod_test.ts index de4981a8c6..a9ff7ed7d7 100644 --- a/std/node/_fs/_fs_chmod_test.ts +++ b/std/node/_fs/_fs_chmod_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { fail, assert } from "../../testing/asserts.ts"; +import { assert, fail } from "../../testing/asserts.ts"; import { chmod, chmodSync } from "./_fs_chmod.ts"; Deno.test({ diff --git a/std/node/_fs/_fs_chown_test.ts b/std/node/_fs/_fs_chown_test.ts index de7dd992fd..b053a7584f 100644 --- a/std/node/_fs/_fs_chown_test.ts +++ b/std/node/_fs/_fs_chown_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { fail, assertEquals } from "../../testing/asserts.ts"; +import { assertEquals, fail } from "../../testing/asserts.ts"; import { chown, chownSync } from "./_fs_chown.ts"; // chown is difficult to test. Best we can do is set the existing user id/group diff --git a/std/node/_fs/_fs_close_test.ts b/std/node/_fs/_fs_close_test.ts index feaf92ab8a..1732138168 100644 --- a/std/node/_fs/_fs_close_test.ts +++ b/std/node/_fs/_fs_close_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { fail, assert, assertThrows } from "../../testing/asserts.ts"; +import { assert, assertThrows, fail } from "../../testing/asserts.ts"; import { close, closeSync } from "./_fs_close.ts"; Deno.test({ diff --git a/std/node/_fs/_fs_link_test.ts b/std/node/_fs/_fs_link_test.ts index ae97f6676c..7d1cbfd4fb 100644 --- a/std/node/_fs/_fs_link_test.ts +++ b/std/node/_fs/_fs_link_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { fail, assertEquals } from "../../testing/asserts.ts"; +import { assertEquals, fail } from "../../testing/asserts.ts"; import { link, linkSync } from "./_fs_link.ts"; import { assert } from "../../testing/asserts.ts"; diff --git a/std/node/_fs/_fs_readFile.ts b/std/node/_fs/_fs_readFile.ts index 2aef282906..e4a7d2031a 100644 --- a/std/node/_fs/_fs_readFile.ts +++ b/std/node/_fs/_fs_readFile.ts @@ -1,12 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { - Encodings, - getEncoding, - FileOptionsArgument, - TextOptionsArgument, - BinaryOptionsArgument, - TextEncodings, BinaryEncodings, + BinaryOptionsArgument, + Encodings, + FileOptionsArgument, + getEncoding, + TextEncodings, + TextOptionsArgument, } from "./_fs_common.ts"; import { Buffer } from "../buffer.ts"; import { fromFileUrl } from "../path.ts"; diff --git a/std/node/_fs/_fs_readFile_test.ts b/std/node/_fs/_fs_readFile_test.ts index 2ea7831d45..bc2635e82c 100644 --- a/std/node/_fs/_fs_readFile_test.ts +++ b/std/node/_fs/_fs_readFile_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { readFile, readFileSync } from "./_fs_readFile.ts"; import * as path from "../../path/mod.ts"; -import { assertEquals, assert } from "../../testing/asserts.ts"; +import { assert, assertEquals } from "../../testing/asserts.ts"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "testdata", "hello.txt"); diff --git a/std/node/_fs/_fs_readlink_test.ts b/std/node/_fs/_fs_readlink_test.ts index 0b220caa4b..61bc3b0043 100644 --- a/std/node/_fs/_fs_readlink_test.ts +++ b/std/node/_fs/_fs_readlink_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { readlink, readlinkSync } from "./_fs_readlink.ts"; -import { assertEquals, assert } from "../../testing/asserts.ts"; +import { assert, assertEquals } from "../../testing/asserts.ts"; import * as path from "../path.ts"; const testDir = Deno.makeTempDirSync(); diff --git a/std/node/_fs/_fs_writeFile.ts b/std/node/_fs/_fs_writeFile.ts index a8ae1f5862..19181ee21c 100644 --- a/std/node/_fs/_fs_writeFile.ts +++ b/std/node/_fs/_fs_writeFile.ts @@ -4,13 +4,13 @@ import { fromFileUrl } from "../path.ts"; import { Buffer } from "../buffer.ts"; import { - Encodings, - WriteFileOptions, CallbackWithError, - isFileOptions, - getEncoding, checkEncoding, + Encodings, + getEncoding, getOpenOptions, + isFileOptions, + WriteFileOptions, } from "./_fs_common.ts"; export function writeFile( diff --git a/std/node/_fs/promises/_fs_readFile.ts b/std/node/_fs/promises/_fs_readFile.ts index 446c486257..fed5367ede 100644 --- a/std/node/_fs/promises/_fs_readFile.ts +++ b/std/node/_fs/promises/_fs_readFile.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import type { - FileOptionsArgument, BinaryOptionsArgument, + FileOptionsArgument, TextOptionsArgument, } from "../_fs_common.ts"; import { readFile as readFileCallback } from "../_fs_readFile.ts"; diff --git a/std/node/_fs/promises/_fs_readFile_test.ts b/std/node/_fs/promises/_fs_readFile_test.ts index 53ef373e57..2068797b91 100644 --- a/std/node/_fs/promises/_fs_readFile_test.ts +++ b/std/node/_fs/promises/_fs_readFile_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { readFile } from "./_fs_readFile.ts"; import * as path from "../../../path/mod.ts"; -import { assertEquals, assert } from "../../../testing/asserts.ts"; +import { assert, assertEquals } from "../../../testing/asserts.ts"; const moduleDir = path.dirname(path.fromFileUrl(import.meta.url)); const testData = path.resolve(moduleDir, "..", "testdata", "hello.txt"); diff --git a/std/node/_util/_util_types_test.ts b/std/node/_util/_util_types_test.ts index fff0dad0c5..0b9872bbb2 100644 --- a/std/node/_util/_util_types_test.ts +++ b/std/node/_util/_util_types_test.ts @@ -22,42 +22,42 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. import { assertStrictEquals } from "../../testing/asserts.ts"; import { - isDate, - isMap, - isSet, isAnyArrayBuffer, - isArrayBufferView, isArgumentsObject, isArrayBuffer, - isStringObject, + isArrayBufferView, isAsyncFunction, isBigInt64Array, + isBigIntObject, isBigUint64Array, isBooleanObject, isBoxedPrimitive, isDataView, + isDate, isFloat32Array, isFloat64Array, isGeneratorFunction, isGeneratorObject, - isInt8Array, isInt16Array, isInt32Array, + isInt8Array, + isMap, isMapIterator, isModuleNamespaceObject, isNativeError, - isSymbolObject, - isTypedArray, - isUint8Array, - isUint8ClampedArray, - isUint16Array, - isUint32Array, isNumberObject, - isBigIntObject, isPromise, isRegExp, + isSet, isSetIterator, isSharedArrayBuffer, + isStringObject, + isSymbolObject, + isTypedArray, + isUint16Array, + isUint32Array, + isUint8Array, + isUint8ClampedArray, isWeakMap, isWeakSet, } from "./_util_types.ts"; diff --git a/std/node/assert.ts b/std/node/assert.ts index 78bc4b3b5f..ad353912e5 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -1,19 +1,19 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals, - assertNotEquals, - assertStrictEquals, - assertNotStrictEquals, assertMatch, + assertNotEquals, + assertNotStrictEquals, + assertStrictEquals, assertThrows, } from "../testing/asserts.ts"; export { AssertionError } from "./assertion_error.ts"; export { + assert, assert as default, assert as ok, - assert, fail, } from "../testing/asserts.ts"; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index defcaa425a..01a722ed39 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -2,10 +2,10 @@ import { assert as denoAssert, assertEquals, - assertNotEquals, - assertStrictEquals, - assertNotStrictEquals, assertMatch, + assertNotEquals, + assertNotStrictEquals, + assertStrictEquals, assertThrows, fail as denoFail, } from "../testing/asserts.ts"; @@ -13,16 +13,16 @@ import { import AssertionError from "./assertion_error.ts"; import assert, { - ok, assert as assert_, - deepStrictEqual, - notDeepStrictEqual, - strictEqual, - notStrictEqual, - match, - throws, - fail, AssertionError as AssertionError_, + deepStrictEqual, + fail, + match, + notDeepStrictEqual, + notStrictEqual, + ok, + strictEqual, + throws, } from "./assert.ts"; Deno.test("API should be exposed", () => { diff --git a/std/node/assertion_error_test.ts b/std/node/assertion_error_test.ts index 74187bc3a4..2faa191f24 100644 --- a/std/node/assertion_error_test.ts +++ b/std/node/assertion_error_test.ts @@ -9,8 +9,8 @@ import { import { AssertionError, copyError, - inspectValue, createErrDiff, + inspectValue, } from "./assertion_error.ts"; Deno.test({ diff --git a/std/node/buffer.ts b/std/node/buffer.ts index 24b77e3230..2a9f0bb56e 100644 --- a/std/node/buffer.ts +++ b/std/node/buffer.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import * as hex from "../encoding/hex.ts"; import * as base64 from "../encoding/base64.ts"; -import { notImplemented, normalizeEncoding } from "./_utils.ts"; +import { normalizeEncoding, notImplemented } from "./_utils.ts"; const notImplementedEncodings = [ "ascii", diff --git a/std/node/events_test.ts b/std/node/events_test.ts index 557a3924d3..b8324c74f8 100644 --- a/std/node/events_test.ts +++ b/std/node/events_test.ts @@ -2,10 +2,10 @@ import { assert, assertEquals, - fail, assertThrows, + fail, } from "../testing/asserts.ts"; -import EventEmitter, { WrappedFunction, once, on } from "./events.ts"; +import EventEmitter, { on, once, WrappedFunction } from "./events.ts"; const shouldNeverBeEmitted = () => { fail("Should never be called"); diff --git a/std/node/fs.ts b/std/node/fs.ts index 31e2e5dede..adb3a7c63c 100644 --- a/std/node/fs.ts +++ b/std/node/fs.ts @@ -29,13 +29,13 @@ export { copyFileSync, exists, existsSync, + mkdir, + mkdirSync, + promises, readFile, readFileSync, readlink, readlinkSync, - mkdir, - mkdirSync, writeFile, writeFileSync, - promises, }; diff --git a/std/node/module.ts b/std/node/module.ts index 534fe88e4b..a9a1b38d85 100644 --- a/std/node/module.ts +++ b/std/node/module.ts @@ -33,7 +33,7 @@ import * as nodeUtil from "./util.ts"; import * as path from "../path/mod.ts"; import { assert } from "../_util/assert.ts"; -import { pathToFileURL, fileURLToPath } from "./url.ts"; +import { fileURLToPath, pathToFileURL } from "./url.ts"; const CHAR_FORWARD_SLASH = "/".charCodeAt(0); const CHAR_BACKWARD_SLASH = "\\".charCodeAt(0); diff --git a/std/node/module_test.ts b/std/node/module_test.ts index 4752763c9d..2b8c5c7905 100644 --- a/std/node/module_test.ts +++ b/std/node/module_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /* eslint-disable @typescript-eslint/no-var-requires */ import { - assertEquals, assert, + assertEquals, assertStringContains, } from "../testing/asserts.ts"; diff --git a/std/node/os_test.ts b/std/node/os_test.ts index 89a0a03aa4..e4231aa3cd 100644 --- a/std/node/os_test.ts +++ b/std/node/os_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; +import { assert, assertEquals, assertThrows } from "../testing/asserts.ts"; import * as os from "./os.ts"; Deno.test({ diff --git a/std/node/process_test.ts b/std/node/process_test.ts index 684beb8d21..6e6145e677 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -1,10 +1,10 @@ // deno-lint-ignore-file no-undef // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; +import { assert, assertEquals, assertThrows } from "../testing/asserts.ts"; import * as path from "../path/mod.ts"; import * as all from "./process.ts"; -import { env, argv } from "./process.ts"; +import { argv, env } from "./process.ts"; // NOTE: Deno.execPath() (and thus process.argv) currently requires --allow-env // (Also Deno.env.toObject() (and process.env) requires --allow-env but it's more obvious) diff --git a/std/node/querystring_test.ts b/std/node/querystring_test.ts index 7f1efd4fd1..63447b94a4 100644 --- a/std/node/querystring_test.ts +++ b/std/node/querystring_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; -import { stringify, parse } from "./querystring.ts"; +import { parse, stringify } from "./querystring.ts"; Deno.test({ name: "stringify", diff --git a/std/node/url.ts b/std/node/url.ts index 577c5eaf27..70e1645b66 100644 --- a/std/node/url.ts +++ b/std/node/url.ts @@ -20,10 +20,10 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. import { + CHAR_BACKWARD_SLASH, + CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, - CHAR_FORWARD_SLASH, - CHAR_BACKWARD_SLASH, } from "../path/_constants.ts"; import * as path from "./path.ts"; diff --git a/std/path/_util.ts b/std/path/_util.ts index ead425a0b8..37ef847cff 100644 --- a/std/path/_util.ts +++ b/std/path/_util.ts @@ -4,13 +4,13 @@ import type { FormatInputPathObject } from "./_interface.ts"; import { - CHAR_UPPERCASE_A, - CHAR_LOWERCASE_A, - CHAR_UPPERCASE_Z, - CHAR_LOWERCASE_Z, + CHAR_BACKWARD_SLASH, CHAR_DOT, CHAR_FORWARD_SLASH, - CHAR_BACKWARD_SLASH, + CHAR_LOWERCASE_A, + CHAR_LOWERCASE_Z, + CHAR_UPPERCASE_A, + CHAR_UPPERCASE_Z, } from "./_constants.ts"; export function assertPath(path: string): void { diff --git a/std/path/glob_test.ts b/std/path/glob_test.ts index 015988cfe3..96cab43dcd 100644 --- a/std/path/glob_test.ts +++ b/std/path/glob_test.ts @@ -1,8 +1,8 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals } from "../testing/asserts.ts"; import { - GlobToRegExpOptions, globToRegExp, + GlobToRegExpOptions, isGlob, joinGlobs, normalizeGlob, diff --git a/std/path/parse_format_test.ts b/std/path/parse_format_test.ts index 1b34ddc295..7855883592 100644 --- a/std/path/parse_format_test.ts +++ b/std/path/parse_format_test.ts @@ -3,7 +3,7 @@ import type { FormatInputPathObject, ParsedPath } from "./mod.ts"; import { assertEquals } from "../testing/asserts.ts"; -import { win32, posix } from "./mod.ts"; +import { posix, win32 } from "./mod.ts"; type FormatTestCase = [FormatInputPathObject, string]; type ParseTestCase = [string, ParsedPath]; diff --git a/std/path/posix.ts b/std/path/posix.ts index 33b94a9164..68ffb06c9a 100644 --- a/std/path/posix.ts +++ b/std/path/posix.ts @@ -6,10 +6,10 @@ import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./_constants.ts"; import { - assertPath, - normalizeString, - isPosixPathSeparator, _format, + assertPath, + isPosixPathSeparator, + normalizeString, } from "./_util.ts"; export const sep = "/"; diff --git a/std/path/win32.ts b/std/path/win32.ts index 19b29a6b91..246c18a973 100644 --- a/std/path/win32.ts +++ b/std/path/win32.ts @@ -4,18 +4,18 @@ import type { FormatInputPathObject, ParsedPath } from "./_interface.ts"; import { - CHAR_DOT, CHAR_BACKWARD_SLASH, CHAR_COLON, + CHAR_DOT, CHAR_QUESTION_MARK, } from "./_constants.ts"; import { + _format, assertPath, isPathSeparator, isWindowsDeviceRoot, normalizeString, - _format, } from "./_util.ts"; import { assert } from "../_util/assert.ts"; diff --git a/std/signal/test.ts b/std/signal/test.ts index 8f495dfb3a..13f2b26765 100644 --- a/std/signal/test.ts +++ b/std/signal/test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals, assertThrows } from "../testing/asserts.ts"; import { delay } from "../async/delay.ts"; -import { signal, onSignal } from "./mod.ts"; +import { onSignal, signal } from "./mod.ts"; Deno.test({ name: "signal() throws when called with empty signals", diff --git a/std/testing/README.md b/std/testing/README.md index 00169384cd..82351d94ac 100644 --- a/std/testing/README.md +++ b/std/testing/README.md @@ -156,7 +156,7 @@ After that simply calling `runBenchmarks()` will benchmark all registered benchmarks and log the results in the commandline. ```ts -import { runBenchmarks, bench } from "https://deno.land/std/testing/bench.ts"; +import { bench, runBenchmarks } from "https://deno.land/std/testing/bench.ts"; bench(function forIncrementX1e9(b): void { b.start(); diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 9796c9d31a..05bb995ab3 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -2,8 +2,8 @@ /** This module is browser compatible. Do not rely on good formatting of values * for AssertionError messages in browsers. */ -import { red, green, white, gray, bold, stripColor } from "../fmt/colors.ts"; -import diff, { DiffType, DiffResult } from "./diff.ts"; +import { bold, gray, green, red, stripColor, white } from "../fmt/colors.ts"; +import diff, { DiffResult, DiffType } from "./diff.ts"; const CAN_NOT_DISPLAY = "[Cannot display]"; diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts index 4840bcf536..7b57fbfa0c 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -2,23 +2,23 @@ import { _format, assert, - assertNotEquals, - assertStringContains, assertArrayContains, - assertMatch, - assertNotMatch, assertEquals, - assertStrictEquals, + AssertionError, + assertMatch, + assertNotEquals, + assertNotMatch, assertNotStrictEquals, + assertStrictEquals, + assertStringContains, assertThrows, assertThrowsAsync, - AssertionError, equal, fail, unimplemented, unreachable, } from "./asserts.ts"; -import { red, green, gray, bold, yellow, stripColor } from "../fmt/colors.ts"; +import { bold, gray, green, red, stripColor, yellow } from "../fmt/colors.ts"; Deno.test("testingEqual", function (): void { assert(equal("world", "world")); diff --git a/std/testing/bench_example.ts b/std/testing/bench_example.ts index 41b1ca65c4..496033ffff 100644 --- a/std/testing/bench_example.ts +++ b/std/testing/bench_example.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // https://deno.land/std/testing/bench.ts -import { BenchmarkTimer, bench, runBenchmarks } from "./bench.ts"; +import { bench, BenchmarkTimer, runBenchmarks } from "./bench.ts"; // Basic bench(function forIncrementX1e9(b: BenchmarkTimer): void { diff --git a/std/testing/bench_test.ts b/std/testing/bench_test.ts index 97517358a9..18b78c5a27 100644 --- a/std/testing/bench_test.ts +++ b/std/testing/bench_test.ts @@ -1,15 +1,15 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { bench, - runBenchmarks, BenchmarkRunError, - clearBenchmarks, BenchmarkRunProgress, + clearBenchmarks, ProgressState, + runBenchmarks, } from "./bench.ts"; import { - assertEquals, assert, + assertEquals, assertThrows, assertThrowsAsync, } from "./asserts.ts"; diff --git a/std/uuid/test.ts b/std/uuid/test.ts index 643ad6b55f..2dff125667 100644 --- a/std/uuid/test.ts +++ b/std/uuid/test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert } from "../testing/asserts.ts"; -import { NIL_UUID, isNil } from "./mod.ts"; +import { isNil, NIL_UUID } from "./mod.ts"; Deno.test({ name: "[UUID] isNil", diff --git a/std/ws/test.ts b/std/ws/test.ts index 787cb76e23..e8fa4f8b13 100644 --- a/std/ws/test.ts +++ b/std/ws/test.ts @@ -7,14 +7,14 @@ import { acceptable, createSecAccept, createSecKey, + createWebSocket, handshake, OpCode, readFrame, unmask, writeFrame, - createWebSocket, } from "./mod.ts"; -import { encode, decode } from "../encoding/utf8.ts"; +import { decode, encode } from "../encoding/utf8.ts"; import { delay } from "../async/delay.ts"; Deno.test("[ws] read unmasked text frame", async () => {