diff --git a/Cargo.toml b/Cargo.toml index 128e627787..eccd733d55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,5 @@ +# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + [workspace] members = [ "cli", diff --git a/cli/bench/deno_tcp.ts b/cli/bench/deno_tcp.ts index a204e7bfb4..09a21ee7ee 100644 --- a/cli/bench/deno_tcp.ts +++ b/cli/bench/deno_tcp.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Used for benchmarking Deno's networking. // TODO Replace this with a real HTTP server once // https://github.com/denoland/deno/issues/726 is completed. diff --git a/cli/bench/deno_tcp_proxy.ts b/cli/bench/deno_tcp_proxy.ts index db693b6901..d59c7d9e1c 100644 --- a/cli/bench/deno_tcp_proxy.ts +++ b/cli/bench/deno_tcp_proxy.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Used for benchmarking Deno's tcp proxy performance. const addr = Deno.args[0] || "127.0.0.1:4500"; const originAddr = Deno.args[1] || "127.0.0.1:4501"; diff --git a/cli/bench/node_tcp_proxy.js b/cli/bench/node_tcp_proxy.js index d693dc5c87..5f2c208b8d 100644 --- a/cli/bench/node_tcp_proxy.js +++ b/cli/bench/node_tcp_proxy.js @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. const net = require("net"); process.on("uncaughtException", function (error) { diff --git a/cli/checksum.rs b/cli/checksum.rs index 69d35ea4c8..41e15db2fb 100644 --- a/cli/checksum.rs +++ b/cli/checksum.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + pub fn gen(v: &[&[u8]]) -> String { let mut ctx = ring::digest::Context::new(&ring::digest::SHA256); for src in v { diff --git a/cli/disk_cache.rs b/cli/disk_cache.rs index cb27a6a502..808a1c9b75 100644 --- a/cli/disk_cache.rs +++ b/cli/disk_cache.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::fs as deno_fs; use crate::http_cache::url_to_filename; use deno_core::url::{Host, Url}; diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs index b9c18c17f7..dfcf05e27a 100644 --- a/cli/file_watcher.rs +++ b/cli/file_watcher.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::colors; use deno_core::error::AnyError; use futures::stream::StreamExt; diff --git a/cli/flags_allow_net.rs b/cli/flags_allow_net.rs index 19e3c1e0f8..83038ac4d1 100644 --- a/cli/flags_allow_net.rs +++ b/cli/flags_allow_net.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use deno_core::url::Url; use std::net::IpAddr; use std::str::FromStr; diff --git a/cli/import_map.rs b/cli/import_map.rs index ee481b6f79..7fb769955c 100644 --- a/cli/import_map.rs +++ b/cli/import_map.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use deno_core::error::AnyError; use deno_core::url::Url; use deno_core::ModuleSpecifier; diff --git a/cli/info.rs b/cli/info.rs index 62ec5c16e3..45d6127fc9 100644 --- a/cli/info.rs +++ b/cli/info.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::colors; use crate::global_state::GlobalState; use crate::module_graph::{ModuleGraph, ModuleGraphFile, ModuleGraphLoader}; diff --git a/cli/lockfile.rs b/cli/lockfile.rs index 4ac893030f..fcc15892b7 100644 --- a/cli/lockfile.rs +++ b/cli/lockfile.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use serde_json::json; use std::collections::BTreeMap; use std::io::Result; diff --git a/cli/ops/io.rs b/cli/ops/io.rs index 0992f768bd..d481e8211d 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use super::dispatch_minimal::minimal_op; use super::dispatch_minimal::MinimalOp; use crate::http_util::HttpBody; diff --git a/cli/ops/net_unix.rs b/cli/ops/net_unix.rs index cf4470f13d..a54c536309 100644 --- a/cli/ops/net_unix.rs +++ b/cli/ops/net_unix.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::ops::io::StreamResource; use crate::ops::io::StreamResourceHolder; use crate::ops::net::AcceptArgs; diff --git a/cli/rt/99_main.js b/cli/rt/99_main.js index 40ea8434b8..26e8fd6da0 100644 --- a/cli/rt/99_main.js +++ b/cli/rt/99_main.js @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Removes the `__proto__` for security reasons. This intentionally makes // Deno non compliant with ECMA-262 Annex B.2.2.1 // diff --git a/cli/web_worker.rs b/cli/web_worker.rs index 75704d924e..ab021a93d2 100644 --- a/cli/web_worker.rs +++ b/cli/web_worker.rs @@ -1,4 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::global_state::GlobalState; use crate::js; use crate::ops; diff --git a/core/examples/http_bench_bin_ops.js b/core/examples/http_bench_bin_ops.js index b4d7add226..066d5bf582 100644 --- a/core/examples/http_bench_bin_ops.js +++ b/core/examples/http_bench_bin_ops.js @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // This is not a real HTTP server. We read blindly one time into 'requestBuf', // then write this fixed 'responseBuf'. The point of this benchmark is to // exercise the event loop in a simple yet semi-realistic way. diff --git a/core/examples/http_bench_bin_ops.rs b/core/examples/http_bench_bin_ops.rs index 2748705eac..513ac5b3ab 100644 --- a/core/examples/http_bench_bin_ops.rs +++ b/core/examples/http_bench_bin_ops.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + #[macro_use] extern crate log; diff --git a/core/examples/http_bench_json_ops.js b/core/examples/http_bench_json_ops.js index 865b04d7ee..3a5dd05c5a 100644 --- a/core/examples/http_bench_json_ops.js +++ b/core/examples/http_bench_json_ops.js @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // This is not a real HTTP server. We read blindly one time into 'requestBuf', // then write this fixed 'responseBuf'. The point of this benchmark is to // exercise the event loop in a simple yet semi-realistic way. diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs index a61a0ad63f..fab222f4c8 100644 --- a/core/examples/http_bench_json_ops.rs +++ b/core/examples/http_bench_json_ops.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + #[macro_use] extern crate log; diff --git a/core/gotham_state.rs b/core/gotham_state.rs index 94a2d67d4a..dfa3b3ea7c 100644 --- a/core/gotham_state.rs +++ b/core/gotham_state.rs @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Forked from Gotham: // https://github.com/gotham-rs/gotham/blob/bcbbf8923789e341b7a0e62c59909428ca4e22e2/gotham/src/state/mod.rs // Copyright 2017 Gotham Project Developers. MIT license. diff --git a/core/module_specifier.rs b/core/module_specifier.rs index e5a0413ca9..0dfc7a592c 100644 --- a/core/module_specifier.rs +++ b/core/module_specifier.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::normalize_path; use std::env::current_dir; use std::error::Error; diff --git a/core/normalize_path.rs b/core/normalize_path.rs index 6a0e448967..0124aedc70 100644 --- a/core/normalize_path.rs +++ b/core/normalize_path.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use std::path::Component; use std::path::Path; use std::path::PathBuf; diff --git a/core/zero_copy_buf.rs b/core/zero_copy_buf.rs index 0535765474..848f5ac2e8 100644 --- a/core/zero_copy_buf.rs +++ b/core/zero_copy_buf.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use crate::bindings; use rusty_v8 as v8; use smallvec::SmallVec; diff --git a/std/_util/assert_test.ts b/std/_util/assert_test.ts index 3509619c30..80bf0d54f0 100644 --- a/std/_util/assert_test.ts +++ b/std/_util/assert_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, DenoStdInternalError } from "./assert.ts"; import { assertThrows } from "../testing/asserts.ts"; diff --git a/std/archive/tar_test.ts b/std/archive/tar_test.ts index c924d36a32..00ecbbf45f 100644 --- a/std/archive/tar_test.ts +++ b/std/archive/tar_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /** * Tar test * diff --git a/std/async/pool_test.ts b/std/async/pool_test.ts index 1be4556be7..34fdc1c10e 100644 --- a/std/async/pool_test.ts +++ b/std/async/pool_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { pooledMap } from "./pool.ts"; import { assert } from "../testing/asserts.ts"; diff --git a/std/async/test.ts b/std/async/test.ts index 5434910808..57684a50e4 100644 --- a/std/async/test.ts +++ b/std/async/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/datetime/formatter.ts b/std/datetime/formatter.ts index 0e872cb401..14fb552cd4 100644 --- a/std/datetime/formatter.ts +++ b/std/datetime/formatter.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { CallbackResult, Rule, diff --git a/std/datetime/tokenizer.ts b/std/datetime/tokenizer.ts index 05314b7706..e56dc52dba 100644 --- a/std/datetime/tokenizer.ts +++ b/std/datetime/tokenizer.ts @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + export type Token = { type: string; value: string | number; diff --git a/std/encoding/utf8.ts b/std/encoding/utf8.ts index 266c611656..b4ddfb94d3 100644 --- a/std/encoding/utf8.ts +++ b/std/encoding/utf8.ts @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + /** A default TextEncoder instance */ export const encoder = new TextEncoder(); diff --git a/std/examples/chat/server.ts b/std/examples/chat/server.ts index cb1be530e7..238d61fffe 100644 --- a/std/examples/chat/server.ts +++ b/std/examples/chat/server.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { listenAndServe } from "../../http/server.ts"; import { acceptWebSocket, diff --git a/std/examples/welcome.ts b/std/examples/welcome.ts index 69f1069f81..ea72144ef3 100644 --- a/std/examples/welcome.ts +++ b/std/examples/welcome.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. console.log("Welcome to Deno 🦕"); diff --git a/std/examples/xeval.ts b/std/examples/xeval.ts index be326a4ad5..07c571cc71 100644 --- a/std/examples/xeval.ts +++ b/std/examples/xeval.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "../flags/mod.ts"; import { readStringDelim } from "../io/bufio.ts"; diff --git a/std/flags/test.ts b/std/flags/test.ts index 5434910808..57684a50e4 100644 --- a/std/flags/test.ts +++ b/std/flags/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/fs/_util.ts b/std/fs/_util.ts index 6866526cdc..95e9f08946 100644 --- a/std/fs/_util.ts +++ b/std/fs/_util.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import * as path from "../path/mod.ts"; /** diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts index 7d9f0d8709..267d7a8c04 100644 --- a/std/fs/expand_glob.ts +++ b/std/fs/expand_glob.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { GlobOptions, SEP_PATTERN, diff --git a/std/fs/expand_glob_test.ts b/std/fs/expand_glob_test.ts index 8b4a90754a..49c7bf143a 100644 --- a/std/fs/expand_glob_test.ts +++ b/std/fs/expand_glob_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { decode } from "../encoding/utf8.ts"; import { assert, diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts index df4525b951..1352ce4480 100644 --- a/std/fs/walk_test.ts +++ b/std/fs/walk_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { walk, walkSync, WalkOptions, WalkEntry } from "./walk.ts"; import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts"; diff --git a/std/hash/sha1.ts b/std/hash/sha1.ts index 6a79db27bf..19563088b1 100644 --- a/std/hash/sha1.ts +++ b/std/hash/sha1.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /* * [js-sha1]{@link https://github.com/emn178/js-sha1} * diff --git a/std/hash/sha256.ts b/std/hash/sha256.ts index e2456d7a16..d1516711fc 100644 --- a/std/hash/sha256.ts +++ b/std/hash/sha256.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /* * Adapted to deno from: * diff --git a/std/hash/sha512.ts b/std/hash/sha512.ts index 1eef85a47e..409dc89943 100644 --- a/std/hash/sha512.ts +++ b/std/hash/sha512.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /* * [js-sha512]{@link https://github.com/emn178/js-sha512} * diff --git a/std/http/_io.ts b/std/http/_io.ts index 743f52556b..fefa6f657d 100644 --- a/std/http/_io.ts +++ b/std/http/_io.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { BufReader, BufWriter } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; import { assert } from "../_util/assert.ts"; diff --git a/std/http/_io_test.ts b/std/http/_io_test.ts index 77d8288f29..7c7b3d8b4a 100644 --- a/std/http/_io_test.ts +++ b/std/http/_io_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertThrowsAsync, assertEquals, diff --git a/std/http/_mock_conn.ts b/std/http/_mock_conn.ts index be07ede24a..4ce2b65f4b 100644 --- a/std/http/_mock_conn.ts +++ b/std/http/_mock_conn.ts @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + /** Create dummy Deno.Conn object with given base properties */ export function mockConn(base: Partial = {}): Deno.Conn { return { diff --git a/std/http/mod.ts b/std/http/mod.ts index 3746242a9a..373e014496 100644 --- a/std/http/mod.ts +++ b/std/http/mod.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. export * from "./cookie.ts"; export * from "./http_status.ts"; export * from "./server.ts"; diff --git a/std/http/racing_server_test.ts b/std/http/racing_server_test.ts index 88ef3ab2fc..b8336abcd0 100644 --- a/std/http/racing_server_test.ts +++ b/std/http/racing_server_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals } from "../testing/asserts.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; import { TextProtoReader } from "../textproto/mod.ts"; diff --git a/std/http/test.ts b/std/http/test.ts index 5434910808..57684a50e4 100644 --- a/std/http/test.ts +++ b/std/http/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/io/_iotest.ts b/std/io/_iotest.ts index a309fb5e12..726e7e2a6e 100644 --- a/std/io/_iotest.ts +++ b/std/io/_iotest.ts @@ -1,4 +1,4 @@ -// Ported to Deno from +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.// Ported to Deno from // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/std/io/bufio.ts b/std/io/bufio.ts index 682f964992..0d7d259985 100644 --- a/std/io/bufio.ts +++ b/std/io/bufio.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/golang/go/blob/891682/src/bufio/bufio.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index 1ad6c7ac6b..bddefb38cd 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/golang/go/blob/891682/src/bufio/bufio_test.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/std/io/mod.ts b/std/io/mod.ts index f92feb6ef3..2f4fbcc264 100644 --- a/std/io/mod.ts +++ b/std/io/mod.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. export * from "./bufio.ts"; export * from "./ioutil.ts"; export * from "./readers.ts"; diff --git a/std/io/readers_test.ts b/std/io/readers_test.ts index d608877c11..53edb851cc 100644 --- a/std/io/readers_test.ts +++ b/std/io/readers_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import { LimitedReader, MultiReader, StringReader } from "./readers.ts"; import { StringWriter } from "./writers.ts"; diff --git a/std/io/test.ts b/std/io/test.ts index 5434910808..57684a50e4 100644 --- a/std/io/test.ts +++ b/std/io/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/io/writers_test.ts b/std/io/writers_test.ts index ef42833523..6dedf72a32 100644 --- a/std/io/writers_test.ts +++ b/std/io/writers_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import { StringWriter } from "./writers.ts"; import { StringReader } from "./readers.ts"; diff --git a/std/mime/mod.ts b/std/mime/mod.ts index 9b75002e05..214f60f703 100644 --- a/std/mime/mod.ts +++ b/std/mime/mod.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. export * from "./multipart.ts"; diff --git a/std/mime/test.ts b/std/mime/test.ts index 5434910808..57684a50e4 100644 --- a/std/mime/test.ts +++ b/std/mime/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/node/_fs/_fs_access.ts b/std/node/_fs/_fs_access.ts index 8fb8cc7e6a..f3fb1a0105 100644 --- a/std/node/_fs/_fs_access.ts +++ b/std/node/_fs/_fs_access.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.ts"; import { notImplemented } from "../_utils.ts"; diff --git a/std/node/_fs/_fs_chmod.ts b/std/node/_fs/_fs_chmod.ts index 9a8277b453..7b8d11b71d 100644 --- a/std/node/_fs/_fs_chmod.ts +++ b/std/node/_fs/_fs_chmod.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.ts"; import { fromFileUrl } from "../path.ts"; diff --git a/std/node/_fs/_fs_chown.ts b/std/node/_fs/_fs_chown.ts index ae3af01218..021b6498ab 100644 --- a/std/node/_fs/_fs_chown.ts +++ b/std/node/_fs/_fs_chown.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.ts"; import { fromFileUrl } from "../path.ts"; diff --git a/std/node/_fs/_fs_close.ts b/std/node/_fs/_fs_close.ts index add6f6663e..1b5393db0d 100644 --- a/std/node/_fs/_fs_close.ts +++ b/std/node/_fs/_fs_close.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.ts"; export function close(fd: number, callback: CallbackWithError): void { diff --git a/std/node/_fs/_fs_common.ts b/std/node/_fs/_fs_common.ts index ec0c2caef6..fa1a524293 100644 --- a/std/node/_fs/_fs_common.ts +++ b/std/node/_fs/_fs_common.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { notImplemented } from "../_utils.ts"; export type CallbackWithError = (err?: Error | null) => void; diff --git a/std/node/_fs/_fs_copy.ts b/std/node/_fs/_fs_copy.ts index ba530a85c9..21d05a7feb 100644 --- a/std/node/_fs/_fs_copy.ts +++ b/std/node/_fs/_fs_copy.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.ts"; import { fromFileUrl } from "../path.ts"; diff --git a/std/node/_fs/_fs_dir.ts b/std/node/_fs/_fs_dir.ts index 20239d4f32..1fd7d60ddc 100644 --- a/std/node/_fs/_fs_dir.ts +++ b/std/node/_fs/_fs_dir.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import Dirent from "./_fs_dirent.ts"; import { assert } from "../../_util/assert.ts"; diff --git a/std/node/_fs/_fs_dir_test.ts b/std/node/_fs/_fs_dir_test.ts index 4c2806389b..522bd9bcd5 100644 --- a/std/node/_fs/_fs_dir_test.ts +++ b/std/node/_fs/_fs_dir_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, fail } from "../../testing/asserts.ts"; import Dir from "./_fs_dir.ts"; import type Dirent from "./_fs_dirent.ts"; diff --git a/std/node/_fs/_fs_dirent.ts b/std/node/_fs/_fs_dirent.ts index 24e43145cd..4a39c41fb9 100644 --- a/std/node/_fs/_fs_dirent.ts +++ b/std/node/_fs/_fs_dirent.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { notImplemented } from "../_utils.ts"; export default class Dirent { diff --git a/std/node/_fs/_fs_dirent_test.ts b/std/node/_fs/_fs_dirent_test.ts index aeb20f1d5c..46d8b8d341 100644 --- a/std/node/_fs/_fs_dirent_test.ts +++ b/std/node/_fs/_fs_dirent_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, assertThrows } from "../../testing/asserts.ts"; import Dirent from "./_fs_dirent.ts"; diff --git a/std/node/_fs/_fs_link.ts b/std/node/_fs/_fs_link.ts index 42ca3de893..b5d8c399cf 100644 --- a/std/node/_fs/_fs_link.ts +++ b/std/node/_fs/_fs_link.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import type { CallbackWithError } from "./_fs_common.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 9ada80057e..2ea7831d45 100644 --- a/std/node/_fs/_fs_readFile_test.ts +++ b/std/node/_fs/_fs_readFile_test.ts @@ -1,3 +1,4 @@ +// 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"; diff --git a/std/node/_fs/_fs_readlink_test.ts b/std/node/_fs/_fs_readlink_test.ts index 437873494f..0b220caa4b 100644 --- a/std/node/_fs/_fs_readlink_test.ts +++ b/std/node/_fs/_fs_readlink_test.ts @@ -1,3 +1,4 @@ +// 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 * as path from "../path.ts"; diff --git a/std/node/_fs/promises/_fs_readFile_test.ts b/std/node/_fs/promises/_fs_readFile_test.ts index 5414a3a09d..53ef373e57 100644 --- a/std/node/_fs/promises/_fs_readFile_test.ts +++ b/std/node/_fs/promises/_fs_readFile_test.ts @@ -1,3 +1,4 @@ +// 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"; diff --git a/std/node/_utils.ts b/std/node/_utils.ts index 5bd4d10750..e63b53d183 100644 --- a/std/node/_utils.ts +++ b/std/node/_utils.ts @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + export function notImplemented(msg?: string): never { const message = msg ? `Not implemented: ${msg}` : "Not implemented"; throw new Error(message); diff --git a/std/node/assert.ts b/std/node/assert.ts index 2a4f8a0b57..78bc4b3b5f 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals, assertNotEquals, diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index 9d38ca56b5..defcaa425a 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert as denoAssert, assertEquals, diff --git a/std/node/assertion_error_test.ts b/std/node/assertion_error_test.ts index 5157ea3b3f..74187bc3a4 100644 --- a/std/node/assertion_error_test.ts +++ b/std/node/assertion_error_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { stripColor } from "../fmt/colors.ts"; import { assert, diff --git a/std/node/buffer.ts b/std/node/buffer.ts index c88d7f8b73..24b77e3230 100644 --- a/std/node/buffer.ts +++ b/std/node/buffer.ts @@ -1,3 +1,4 @@ +// 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"; diff --git a/std/node/buffer_test.ts b/std/node/buffer_test.ts index a72569b7c7..b7d76113b8 100644 --- a/std/node/buffer_test.ts +++ b/std/node/buffer_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, assertThrows } from "../testing/asserts.ts"; import Buffer from "./buffer.ts"; diff --git a/std/node/events_test.ts b/std/node/events_test.ts index a3285f24bc..557a3924d3 100644 --- a/std/node/events_test.ts +++ b/std/node/events_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals, diff --git a/std/node/fs.ts b/std/node/fs.ts index 4bb514c7a6..31e2e5dede 100644 --- a/std/node/fs.ts +++ b/std/node/fs.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { access, accessSync } from "./_fs/_fs_access.ts"; import { appendFile, appendFileSync } from "./_fs/_fs_appendFile.ts"; import { chmod, chmodSync } from "./_fs/_fs_chmod.ts"; diff --git a/std/node/global.ts b/std/node/global.ts index 1049f8ba15..2f894c8e53 100644 --- a/std/node/global.ts +++ b/std/node/global.ts @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + Object.defineProperty(globalThis, Symbol.toStringTag, { value: "global", writable: false, diff --git a/std/node/module_test.ts b/std/node/module_test.ts index 12021782a2..4752763c9d 100644 --- a/std/node/module_test.ts +++ b/std/node/module_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /* eslint-disable @typescript-eslint/no-var-requires */ import { assertEquals, diff --git a/std/node/os_test.ts b/std/node/os_test.ts index 34f8d0f870..89a0a03aa4 100644 --- a/std/node/os_test.ts +++ b/std/node/os_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; import * as os from "./os.ts"; diff --git a/std/node/path.ts b/std/node/path.ts index e8295281a1..a206eb7924 100644 --- a/std/node/path.ts +++ b/std/node/path.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. export * from "../path/mod.ts"; diff --git a/std/node/process.ts b/std/node/process.ts index b42c885c03..62bef922c7 100644 --- a/std/node/process.ts +++ b/std/node/process.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { notImplemented } from "./_utils.ts"; /** https://nodejs.org/api/process.html#process_process_arch */ diff --git a/std/node/process_test.ts b/std/node/process_test.ts index a277eaa075..684beb8d21 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -1,4 +1,5 @@ // 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 * as path from "../path/mod.ts"; diff --git a/std/node/querystring_test.ts b/std/node/querystring_test.ts index 6ce681ca59..7f1efd4fd1 100644 --- a/std/node/querystring_test.ts +++ b/std/node/querystring_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import { stringify, parse } from "./querystring.ts"; diff --git a/std/node/string_decoder_test.ts b/std/node/string_decoder_test.ts index de32b68153..7c36ea3832 100644 --- a/std/node/string_decoder_test.ts +++ b/std/node/string_decoder_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import Buffer from "./buffer.ts"; import { StringDecoder } from "./string_decoder.ts"; diff --git a/std/node/timers.ts b/std/node/timers.ts index b91985069e..792e37581c 100644 --- a/std/node/timers.ts +++ b/std/node/timers.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // TODO: implement the 'NodeJS.Timeout' and 'NodeJS.Immediate' versions of the timers. // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1163ead296d84e7a3c80d71e7c81ecbd1a130e9a/types/node/v12/globals.d.ts#L1120-L1131 export const setTimeout = window.setTimeout; diff --git a/std/node/url_test.ts b/std/node/url_test.ts index 5e64b62959..a99acc4eb2 100644 --- a/std/node/url_test.ts +++ b/std/node/url_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import * as url from "./url.ts"; diff --git a/std/node/util.ts b/std/node/util.ts index 9cca3e8358..27aa5a12b2 100644 --- a/std/node/util.ts +++ b/std/node/util.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. export { promisify } from "./_util/_util_promisify.ts"; export { callbackify } from "./_util/_util_callbackify.ts"; import * as types from "./_util/_util_types.ts"; diff --git a/std/node/util_test.ts b/std/node/util_test.ts index b1be36ce1a..9b55d01785 100644 --- a/std/node/util_test.ts +++ b/std/node/util_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals } from "../testing/asserts.ts"; import { stripColor } from "../fmt/colors.ts"; import * as util from "./util.ts"; diff --git a/std/path/_interface.ts b/std/path/_interface.ts index 6c82c9c35c..c05af9f5e5 100644 --- a/std/path/_interface.ts +++ b/std/path/_interface.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /** This module is browser compatible. */ /** diff --git a/std/path/glob_test.ts b/std/path/glob_test.ts index bb3f8add0f..015988cfe3 100644 --- a/std/path/glob_test.ts +++ b/std/path/glob_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assert, assertEquals } from "../testing/asserts.ts"; import { GlobToRegExpOptions, diff --git a/std/path/join_test.ts b/std/path/join_test.ts index b7311406f3..032b88ad99 100644 --- a/std/path/join_test.ts +++ b/std/path/join_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import * as path from "./mod.ts"; diff --git a/std/path/test.ts b/std/path/test.ts index 5434910808..57684a50e4 100644 --- a/std/path/test.ts +++ b/std/path/test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./mod.ts"; diff --git a/std/signal/mod.ts b/std/signal/mod.ts index 44ed24f13e..7c662ea6e5 100644 --- a/std/signal/mod.ts +++ b/std/signal/mod.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { MuxAsyncIterator } from "../async/mux_async_iterator.ts"; export type Disposable = { dispose: () => void }; diff --git a/std/signal/test.ts b/std/signal/test.ts index a21cc1d64b..8f495dfb3a 100644 --- a/std/signal/test.ts +++ b/std/signal/test.ts @@ -1,3 +1,4 @@ +// 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"; diff --git a/std/testing/bench_example.ts b/std/testing/bench_example.ts index 366521f85c..41b1ca65c4 100644 --- a/std/testing/bench_example.ts +++ b/std/testing/bench_example.ts @@ -1,3 +1,4 @@ +// 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"; diff --git a/std/testing/bench_test.ts b/std/testing/bench_test.ts index 9e5253b1af..97517358a9 100644 --- a/std/testing/bench_test.ts +++ b/std/testing/bench_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { bench, runBenchmarks, diff --git a/std/testing/diff_test.ts b/std/testing/diff_test.ts index 072f396220..33752d89fc 100644 --- a/std/testing/diff_test.ts +++ b/std/testing/diff_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import diff from "./diff.ts"; import { assertEquals } from "../testing/asserts.ts"; diff --git a/std/textproto/mod.ts b/std/textproto/mod.ts index b23ccee193..b551a51e1e 100644 --- a/std/textproto/mod.ts +++ b/std/textproto/mod.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/golang/go/tree/master/src/net/textproto // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/std/textproto/test.ts b/std/textproto/test.ts index 1d4bed50b9..3f3b3f9a6e 100644 --- a/std/textproto/test.ts +++ b/std/textproto/test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // Based on https://github.com/golang/go/blob/master/src/net/textproto/reader_test.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/std/uuid/v1.ts b/std/uuid/v1.ts index 6e48fa55f8..ef1882d853 100644 --- a/std/uuid/v1.ts +++ b/std/uuid/v1.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { bytesToUuid } from "./_common.ts"; const UUID_RE = new RegExp( diff --git a/std/uuid/v1_test.ts b/std/uuid/v1_test.ts index 4884927327..364a4c3042 100644 --- a/std/uuid/v1_test.ts +++ b/std/uuid/v1_test.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { assert, assertEquals } from "../testing/asserts.ts"; import { generate, validate } from "./v1.ts"; diff --git a/std/uuid/v4.ts b/std/uuid/v4.ts index 53fbc92e31..f338440f56 100644 --- a/std/uuid/v4.ts +++ b/std/uuid/v4.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { bytesToUuid } from "./_common.ts"; const UUID_RE = new RegExp( diff --git a/std/uuid/v5.ts b/std/uuid/v5.ts index e940f0c68f..9b4c4111ad 100644 --- a/std/uuid/v5.ts +++ b/std/uuid/v5.ts @@ -1,5 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - import { bytesToUuid, createBuffer, diff --git a/std/version.ts b/std/version.ts index 5908e116a7..4343a1327a 100644 --- a/std/version.ts +++ b/std/version.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. /** Version of the Deno standard modules * * Deno std is versioned differently than Deno cli because it is still unstable; diff --git a/std/wasi/snapshot_preview1.ts b/std/wasi/snapshot_preview1.ts index 15c1a9a9c7..456ef27756 100644 --- a/std/wasi/snapshot_preview1.ts +++ b/std/wasi/snapshot_preview1.ts @@ -1,4 +1,5 @@ /* eslint-disable */ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { resolve } from "../path/mod.ts"; diff --git a/std/wasi/snapshot_preview1_test.ts b/std/wasi/snapshot_preview1_test.ts index c67ddb3563..e8230180b6 100644 --- a/std/wasi/snapshot_preview1_test.ts +++ b/std/wasi/snapshot_preview1_test.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "../testing/asserts.ts"; import { copy } from "../fs/mod.ts"; import * as path from "../path/mod.ts"; diff --git a/std/wasi/snapshot_preview1_test_runner.ts b/std/wasi/snapshot_preview1_test_runner.ts index b85fdc11c0..4c990b43d4 100644 --- a/std/wasi/snapshot_preview1_test_runner.ts +++ b/std/wasi/snapshot_preview1_test_runner.ts @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import Context from "./snapshot_preview1.ts"; const options = JSON.parse(Deno.args[0]); diff --git a/std/ws/example_test.ts b/std/ws/example_test.ts index 2fcea5506b..8b38e3952e 100644 --- a/std/ws/example_test.ts +++ b/std/ws/example_test.ts @@ -1 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./example_server.ts"; diff --git a/test_plugin/Cargo.toml b/test_plugin/Cargo.toml index 27438f3f30..b9be58dade 100644 --- a/test_plugin/Cargo.toml +++ b/test_plugin/Cargo.toml @@ -1,3 +1,5 @@ +# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + [package] name = "test_plugin" version = "0.0.1" diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index 468fae4916..aaa7b8501f 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + use deno_core::plugin_api::Interface; use deno_core::plugin_api::Op; use deno_core::plugin_api::ZeroCopyBuf; diff --git a/test_plugin/tests/integration_tests.rs b/test_plugin/tests/integration_tests.rs index 85374c217b..aeb2f4a2f9 100644 --- a/test_plugin/tests/integration_tests.rs +++ b/test_plugin/tests/integration_tests.rs @@ -1,3 +1,4 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // To run this test manually: // cd test_plugin // ../target/debug/deno run --unstable --allow-plugin tests/test.js debug diff --git a/test_plugin/tests/test.js b/test_plugin/tests/test.js index c9d3c5f010..c17172c341 100644 --- a/test_plugin/tests/test.js +++ b/test_plugin/tests/test.js @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + const filenameBase = "test_plugin"; let filenameSuffix = ".so"; diff --git a/test_util/Cargo.toml b/test_util/Cargo.toml index 456a2ec808..cf450e3604 100644 --- a/test_util/Cargo.toml +++ b/test_util/Cargo.toml @@ -1,3 +1,5 @@ +# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + [package] name = "test_util" version = "0.1.0" diff --git a/test_util/src/test_server.rs b/test_util/src/test_server.rs index ed958a94a3..dfff24e2c5 100644 --- a/test_util/src/test_server.rs +++ b/test_util/src/test_server.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + fn main() { test_util::run_all_servers(); } diff --git a/tools/test_format.py b/tools/test_format.py index c45e0861e3..127f8d01c2 100755 --- a/tools/test_format.py +++ b/tools/test_format.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. # This program fails if ./tools/format.py changes any files. import sys