diff options
Diffstat (limited to 'std')
88 files changed, 189 insertions, 189 deletions
diff --git a/std/_util/deep_assign_test.ts b/std/_util/deep_assign_test.ts index 14e81348d..1372c25e9 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 00ecbbf45..ff1ada4d5 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 6dffad17f..46f819193 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 { + concat, + contains, + copyBytes, + equal, findIndex, findLastIndex, - equal, hasPrefix, hasSuffix, repeat, - concat, - contains, - copyBytes, } 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 6f11090f0..b27a3824e 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 fa9753777..21797a451 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 63b04983e..31fe86f56 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 b955e5df8..dfb8589c1 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 89a91106b..f6ce9591c 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 6d59ed9ed..93635ba25 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 6a86aafe9..5186140e4 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 02af70964..cea939faf 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 cfefe54d7..a604bf323 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 9e549c698..5fe89410b 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 9a864a87c..59d67240f 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 89a5b8c8e..a4e3cb144 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<void> { diff --git a/std/encoding/csv_test.ts b/std/encoding/csv_test.ts index aab9e86b1..1a2d892cc 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 0cf39ad2e..d1a4002c6 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 238d61fff..ce2e196f3 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 336b188e9..5e30b4ba7 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 c4cab7e78..5c0f1ac77 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 1a5286a0e..5334cb610 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 a8ac8c74e..a7b09d5bc 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 93e664dde..6ace4f532 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 b5fdfe40b..9a24caaf0 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 b1b340354..ed4493da0 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 db9451200..859239d10 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 35b3e0d9a..dd427d219 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 c57ddef45..72907e157 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 49c7bf143..39235906b 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 1352ce448..c772f4912 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 89c60fe52..2caaff49b 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 fd9c227f4..1d03ea987 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 ee49a229d..b9f72b150 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 fefa6f657..1375edbb5 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 7c7b3d8b4..14675a799 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 f34f5acae..0f7c68635 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 ff9a073e7..d8751eb84 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 93e6e5590..d8df631b8 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<Deno.RunOptions & { stdout: "piped" }>; type FileServerCfg = Omit<FileServerArgs, "_"> & { target?: string }; diff --git a/std/http/server.ts b/std/http/server.ts index 93f116fff..7bbdb7829 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 564ec4e07..76b0bcff9 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -14,18 +14,18 @@ import { assertThrowsAsync, } from "../testing/asserts.ts"; import { + _parseAddrFromStr, Response, - ServerRequest, - Server, serve, + Server, + ServerRequest, serveTLS, - _parseAddrFromStr, } 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 09918fcc4..ca0f5f441 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 bddefb38c..d647082ad 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 4579e3668..81881ceb9 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 21c25a816..c538de380 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 8921dd542..52c1edb64 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 c00ab78ec..e3ffc224a 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 08080356b..4ab50809f 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 512de534b..167d86a5c 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 30c6b0914..f2467ef68 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, + critical, debug, - info, - warning, error, - critical, - setup, + 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 0c0ab0703..23eac7ff4 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 df533194c..3180009c8 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 bc30de609..cb51def67 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 de4981a8c..a9ff7ed7d 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 de7dd992f..b053a7584 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 feaf92ab8..173213816 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 ae97f6676..7d1cbfd4f 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 2aef28290..e4a7d2031 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 { + BinaryEncodings, + BinaryOptionsArgument, Encodings, - getEncoding, FileOptionsArgument, - TextOptionsArgument, - BinaryOptionsArgument, + getEncoding, TextEncodings, - BinaryEncodings, + 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 2ea7831d4..bc2635e82 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 0b220caa4..61bc3b004 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 a8ae1f586..19181ee21 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 446c48625..fed5367ed 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 53ef373e5..2068797b9 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 fff0dad0c..0b9872bbb 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 78bc4b3b5..ad353912e 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, + assertMatch, assertNotEquals, - assertStrictEquals, assertNotStrictEquals, - assertMatch, + 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 defcaa425..01a722ed3 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -2,10 +2,10 @@ import { assert as denoAssert, assertEquals, + assertMatch, assertNotEquals, - assertStrictEquals, assertNotStrictEquals, - assertMatch, + 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_, + AssertionError as AssertionError_, deepStrictEqual, + fail, + match, notDeepStrictEqual, - strictEqual, notStrictEqual, - match, + ok, + strictEqual, throws, - fail, - AssertionError as AssertionError_, } 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 74187bc3a..2faa191f2 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 24b77e323..2a9f0bb56 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 557a3924d..b8324c74f 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 31e2e5ded..adb3a7c63 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 534fe88e4..a9a1b38d8 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 4752763c9..2b8c5c790 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 89a0a03aa..e4231aa3c 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 684beb8d2..6e6145e67 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 7f1efd4fd..63447b94a 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 577c5eaf2..70e1645b6 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 ead425a0b..37ef847cf 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 015988cfe..96cab43dc 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 1b34ddc29..785588359 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 33b94a916..68ffb06c9 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 { + _format, assertPath, - normalizeString, isPosixPathSeparator, - _format, + normalizeString, } from "./_util.ts"; export const sep = "/"; diff --git a/std/path/win32.ts b/std/path/win32.ts index 19b29a6b9..246c18a97 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 8f495dfb3..13f2b2676 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 00169384c..82351d94a 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 9796c9d31..05bb995ab 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 4840bcf53..7b57fbfa0 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -2,23 +2,23 @@ import { _format, assert, - assertNotEquals, - assertStringContains, assertArrayContains, + assertEquals, + AssertionError, assertMatch, + assertNotEquals, assertNotMatch, - assertEquals, - assertStrictEquals, 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 41b1ca65c..496033fff 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 97517358a..18b78c5a2 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 643ad6b55..2dff12566 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 787cb76e2..e8fa4f8b1 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 () => { |