1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 15:19:40 -05:00

feat(fmt): Sort named import and export specifiers (#7711)

This commit is contained in:
David Sherret 2020-09-27 06:22:32 -04:00 committed by GitHub
parent c28757f379
commit df02e31507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
170 changed files with 296 additions and 310 deletions

View file

@ -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"
]

8
Cargo.lock generated
View file

@ -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",

View file

@ -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"

View file

@ -1,4 +1,4 @@
import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts";
import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts";
printHello3();

View file

@ -1,4 +1,4 @@
import { returnsFoo, printHello2 } from "mod2";
import { printHello2, returnsFoo } from "mod2";
export function returnsHi(): string {
return "Hi";

View file

@ -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"
}

View file

@ -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"
}

View file

@ -1,4 +1,4 @@
import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts";
import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts";
printHello3();

View file

@ -1,4 +1,4 @@
import { returnsFoo, printHello2 } from "./subdir2/mod2.ts";
import { printHello2, returnsFoo } from "./subdir2/mod2.ts";
export function returnsHi(): string {
return "Hi";

View file

@ -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();

View file

@ -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";

View file

@ -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

View file

@ -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,

View file

@ -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

View file

@ -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(

View file

@ -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

View file

@ -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 {

View file

@ -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";

View file

@ -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);

View file

@ -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

View file

@ -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");

View file

@ -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();

View file

@ -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";

View file

@ -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<

View file

@ -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 {

View file

@ -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();

View file

@ -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 {

View file

@ -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];

View file

@ -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 {

View file

@ -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.

View file

@ -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);

View file

@ -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);

View file

@ -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,

View file

@ -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 {

View file

@ -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;

View file

@ -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 } },

View file

@ -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 {

View file

@ -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<void> {
const m1 = Deno.metrics();

View file

@ -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 {

View file

@ -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 {

View file

@ -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];

View file

@ -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<

View file

@ -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<void> {
await assertThrowsAsync(async () => {

View file

@ -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";

View file

@ -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", {});

View file

@ -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 {

View file

@ -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 {

View file

@ -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(

View file

@ -1,10 +1,10 @@
import {
unitTest,
assert,
assertEquals,
assertThrows,
assertThrowsAsync,
pathToAbsoluteFileUrl,
unitTest,
} from "./test_util.ts";
unitTest({ perms: { read: true } }, function readTextFileSyncSuccess(): void {

View file

@ -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 {

View file

@ -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;

View file

@ -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;

View file

@ -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", {

View file

@ -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(() => {

View file

@ -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");

View file

@ -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<void> {

View file

@ -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 {

View file

@ -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));

View file

@ -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

View file

@ -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() {

View file

@ -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<void> {

View file

@ -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();

View file

@ -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 } },

View file

@ -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 } },

View file

@ -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";

View file

@ -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";

View file

@ -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<number> {

View file

@ -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();

View file

@ -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(

View file

@ -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.

View file

@ -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(
{

View file

@ -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";

View file

@ -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" };

View file

@ -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(

View file

@ -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(

View file

@ -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+/;

View file

@ -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(

View file

@ -1,9 +1,9 @@
import {
unitTest,
assert,
assertEquals,
assertThrows,
assertThrowsAsync,
unitTest,
} from "./test_util.ts";
unitTest(

View file

@ -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

View file

@ -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);

View file

@ -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", () => {

View file

@ -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

View file

@ -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 {

View file

@ -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));

View file

@ -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(

View file

@ -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 {

View file

@ -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

View file

@ -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;

View file

@ -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,

View file

@ -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";

View file

@ -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

View file

@ -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 (

View file

@ -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 = {

View file

@ -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 =>

View file

@ -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 = [
["", ""],

View file

@ -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 = [
["", ""],

View file

@ -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> {

View file

@ -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";

View file

@ -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 {

View file

@ -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";

Some files were not shown because too many files have changed in this diff Show more