From 37f203317d8774625d1a271e2dd6933d15be4754 Mon Sep 17 00:00:00 2001 From: Eser Ozvataf Date: Wed, 13 Dec 2023 01:34:12 +0300 Subject: [PATCH] chore: deps.ts files back again. --- LICENSE | 2 +- _etc/tasks/check-license.ts | 10 +- _etc/tasks/deps.ts | 3 + appserver/appserver.ts | 2 +- appserver/channel.ts | 2 +- appserver/deps.ts | 3 + appserver/mod.ts | 2 +- appserver/module.ts | 2 +- appserver/version-checker.ts | 4 +- collector/collector.ts | 11 +- collector/deps-dev.ts | 4 + collector/deps.ts | 5 + collector/formatter.ts | 8 +- collector/manifest.test.ts | 11 +- collector/manifest.ts | 24 +- collector/mod.ts | 2 +- collector/validator-identifier/char-codes.ts | 113 +++ collector/validator-identifier/mod.ts | 954 +++++++++++++++++++ cool.ts | 2 +- deno.jsonc | 3 +- deps.ts | 3 + di/container.test.ts | 6 +- di/container.ts | 2 +- di/decorators.test.ts | 5 +- di/decorators.ts | 2 +- di/deps-dev.ts | 5 + di/fluent-api-factory.test.ts | 6 +- di/fluent-api-factory.ts | 2 +- di/invoker.test.ts | 5 +- di/invoker.ts | 2 +- di/mod.ts | 2 +- di/primitives.ts | 2 +- di/services.ts | 2 +- directives/01-social.md | 2 +- dotenv/base.ts | 2 +- dotenv/configure.ts | 2 +- dotenv/deps.ts | 3 + dotenv/loader.ts | 4 +- dotenv/mod.ts | 2 +- dotenv/reader.ts | 2 +- events/container.test.ts | 6 +- events/container.ts | 2 +- events/deps-dev.ts | 5 + events/events.ts | 2 +- events/fluent-api-factory.ts | 2 +- events/mod.ts | 2 +- events/primitives.ts | 2 +- fp/append-to-array.bench.ts | 2 +- fp/append-to-array.test.ts | 5 +- fp/append-to-array.ts | 2 +- fp/append-to-object.bench.ts | 2 +- fp/append-to-object.test.ts | 5 +- fp/append-to-object.ts | 2 +- fp/associate-array.test.ts | 5 +- fp/associate-array.ts | 2 +- fp/associate-object.test.ts | 5 +- fp/associate-object.ts | 2 +- fp/compose.test.ts | 5 +- fp/compose.ts | 2 +- fp/curry-functions.test.ts | 5 +- fp/curry-functions.ts | 2 +- fp/curry-right.test.ts | 5 +- fp/curry-right.ts | 2 +- fp/curry.test.ts | 5 +- fp/curry.ts | 2 +- fp/decorate.test.ts | 5 +- fp/decorate.ts | 2 +- fp/deep-copy.bench.ts | 2 +- fp/deep-copy.test.ts | 5 +- fp/deep-copy.ts | 2 +- fp/deep-merge.test.ts | 5 +- fp/deep-merge.ts | 2 +- fp/deps-dev.ts | 4 + fp/dispatcher.test.ts | 5 +- fp/dispatcher.ts | 2 +- fp/distinct-array.test.ts | 5 +- fp/distinct-array.ts | 2 +- fp/distinct-object.test.ts | 5 +- fp/distinct-object.ts | 2 +- fp/drop-from-array.test.ts | 5 +- fp/drop-from-array.ts | 2 +- fp/drop-from-object.test.ts | 5 +- fp/drop-from-object.ts | 2 +- fp/emitter.test.ts | 5 +- fp/emitter.ts | 2 +- fp/filter-array.test.ts | 5 +- fp/filter-array.ts | 2 +- fp/filter-object.test.ts | 5 +- fp/filter-object.ts | 2 +- fp/iterate.test.ts | 5 +- fp/iterate.ts | 2 +- fp/map-array.test.ts | 5 +- fp/map-array.ts | 2 +- fp/map-object.test.ts | 5 +- fp/map-object.ts | 2 +- fp/match.test.ts | 5 +- fp/match.ts | 2 +- fp/merge-arrays.test.ts | 5 +- fp/merge-arrays.ts | 2 +- fp/merge-objects.test.ts | 5 +- fp/merge-objects.ts | 2 +- fp/mod.ts | 2 +- fp/mutate.bench.ts | 2 +- fp/mutate.test.ts | 5 +- fp/mutate.ts | 2 +- fp/pick-from-array.test.ts | 5 +- fp/pick-from-array.ts | 2 +- fp/pick-from-object.test.ts | 5 +- fp/pick-from-object.ts | 2 +- fp/pipe.test.ts | 5 +- fp/pipe.ts | 2 +- fp/prepend-to-array.test.ts | 5 +- fp/prepend-to-array.ts | 2 +- fp/prepend-to-object.test.ts | 5 +- fp/prepend-to-object.ts | 2 +- fp/remove-first-match-from-array.test.ts | 5 +- fp/remove-first-match-from-array.ts | 2 +- fp/remove-first-match-from-object.test.ts | 5 +- fp/remove-first-match-from-object.ts | 2 +- fp/remove-index-from-array.test.ts | 5 +- fp/remove-index-from-array.ts | 2 +- fp/remove-key-from-object.test.ts | 5 +- fp/remove-key-from-object.ts | 2 +- fp/remove-value-from-array.test.ts | 5 +- fp/remove-value-from-array.ts | 2 +- fp/remove-value-from-object.test.ts | 5 +- fp/remove-value-from-object.ts | 2 +- fp/reverse-array.test.ts | 5 +- fp/reverse-array.ts | 2 +- fp/reverse-object.test.ts | 5 +- fp/reverse-object.ts | 2 +- fp/split-array.test.ts | 5 +- fp/split-array.ts | 2 +- fp/split-object.test.ts | 5 +- fp/split-object.ts | 2 +- fp/take-from-array.test.ts | 5 +- fp/take-from-array.ts | 2 +- fp/take-from-object.test.ts | 5 +- fp/take-from-object.ts | 2 +- fp/wth.bench.ts | 2 +- fp/wth.test.ts | 5 +- fp/wth.ts | 2 +- fp/wthout.bench.ts | 2 +- fp/wthout.test.ts | 5 +- fp/wthout.ts | 2 +- functions/deps-dev.ts | 5 + functions/fn.test.ts | 6 +- functions/fn.ts | 2 +- functions/mod.ts | 2 +- functions/results.ts | 2 +- jsx-runtime/mod.ts | 2 +- mod.ts | 2 +- parsing/deps-dev.ts | 4 + parsing/lexer/checks/is-alphanumeric.ts | 2 +- parsing/lexer/checks/is-numeric.ts | 2 +- parsing/lexer/checks/is-whitespace.ts | 2 +- parsing/lexer/lexer.test.ts | 5 +- parsing/lexer/lexer.ts | 2 +- parsing/lexer/mod.ts | 2 +- parsing/lexer/tokens/definition.ts | 2 +- parsing/lexer/tokens/simple.ts | 2 +- parsing/mod.ts | 2 +- parsing/parser.test.ts | 5 +- parsing/parser.ts | 2 +- parsing/rewindable.ts | 2 +- pre-commit.ts | 4 +- repl-init.ts | 2 +- standards/deps.ts | 4 + standards/functions.ts | 2 +- standards/logging.ts | 2 +- standards/mod.ts | 2 +- standards/patterns.ts | 2 +- standards/promises.ts | 2 +- standards/runtime.ts | 5 +- 174 files changed, 1368 insertions(+), 294 deletions(-) create mode 100644 _etc/tasks/deps.ts create mode 100644 appserver/deps.ts create mode 100644 collector/deps-dev.ts create mode 100644 collector/deps.ts create mode 100644 collector/validator-identifier/char-codes.ts create mode 100644 collector/validator-identifier/mod.ts create mode 100644 deps.ts create mode 100644 di/deps-dev.ts create mode 100644 dotenv/deps.ts create mode 100644 events/deps-dev.ts create mode 100644 fp/deps-dev.ts create mode 100644 functions/deps-dev.ts create mode 100644 parsing/deps-dev.ts create mode 100644 standards/deps.ts diff --git a/LICENSE b/LICENSE index 43fbb52a..1e8e03d7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2023-present the cool authors. +Copyright 2023-present Eser Ozvataf and other contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/_etc/tasks/check-license.ts b/_etc/tasks/check-license.ts index 7adf809e..860c5003 100644 --- a/_etc/tasks/check-license.ts +++ b/_etc/tasks/check-license.ts @@ -1,8 +1,8 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // Copied from $std/_tools/check_license.ts import * as runtime from "../../standards/runtime.ts"; -import { walk } from "$std/fs/walk.ts"; +import { walk } from "./deps.ts"; const EXTENSIONS = ["*.js", ".ts", "*.jsx", ".tsx"]; @@ -10,15 +10,15 @@ const ROOT = new URL("../../", import.meta.url); const CHECK = runtime.args.includes("--check"); const CURRENT_YEAR = new Date().getFullYear(); const RX_COPYRIGHT = new RegExp( - `// Copyright ([0-9]{4})-present the cool authors\\. All rights reserved\\. ([0-9A-Za-z\-\.]+) license\\.\n`, + `// Copyright ([0-9]{4})-present Eser Ozvataf and other contributors\\. All rights reserved\\. ([0-9A-Za-z\-\.]+) license\\.\n`, ); const COPYRIGHT = - `// Copyright ${CURRENT_YEAR}-present the cool authors. All rights reserved. Apache-2.0 license.`; + `// Copyright ${CURRENT_YEAR}-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license.`; let failed = false; for await ( - const entry of walk(ROOT, { + const entry of walk.walk(ROOT, { exts: EXTENSIONS, skip: [ /_etc\/coverage\/*$/, diff --git a/_etc/tasks/deps.ts b/_etc/tasks/deps.ts new file mode 100644 index 00000000..611f21d0 --- /dev/null +++ b/_etc/tasks/deps.ts @@ -0,0 +1,3 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as walk from "https://deno.land/std@0.208.0/fs/walk.ts"; diff --git a/appserver/appserver.ts b/appserver/appserver.ts index 67775791..7aa5ff64 100644 --- a/appserver/appserver.ts +++ b/appserver/appserver.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { events } from "../events/events.ts"; import { di } from "../di/services.ts"; diff --git a/appserver/channel.ts b/appserver/channel.ts index 95040d3e..6ca025a4 100644 --- a/appserver/channel.ts +++ b/appserver/channel.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export interface Channel { name?: string; diff --git a/appserver/deps.ts b/appserver/deps.ts new file mode 100644 index 00000000..cfea6f15 --- /dev/null +++ b/appserver/deps.ts @@ -0,0 +1,3 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as semver from "https://deno.land/std@0.208.0/semver/mod.ts"; diff --git a/appserver/mod.ts b/appserver/mod.ts index ee647c8a..2cfb68d1 100644 --- a/appserver/mod.ts +++ b/appserver/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./module.ts"; export * from "./appserver.ts"; diff --git a/appserver/module.ts b/appserver/module.ts index e9787cb5..b33a2d29 100644 --- a/appserver/module.ts +++ b/appserver/module.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export interface Module { name?: string; diff --git a/appserver/version-checker.ts b/appserver/version-checker.ts index 64d7d6d5..2171e8dc 100644 --- a/appserver/version-checker.ts +++ b/appserver/version-checker.ts @@ -1,7 +1,7 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as semver from "$std/semver/mod.ts"; import * as runtime from "../standards/runtime.ts"; +import { semver } from "./deps.ts"; export function compareSemanticVersions( currentVersion: semver.SemVer, diff --git a/collector/collector.ts b/collector/collector.ts index d84e4d9e..fbbf662c 100644 --- a/collector/collector.ts +++ b/collector/collector.ts @@ -1,7 +1,12 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as path from "$std/path/mod.ts"; -import * as walk from "$std/fs/walk.ts"; +// This file contains code from deno fresh (https://github.com/denoland/fresh), +// which is a web framework, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2021-2023 Luca Casonato + +import { path, walk } from "./deps.ts"; import * as patterns from "../standards/patterns.ts"; export async function* walkFiles( diff --git a/collector/deps-dev.ts b/collector/deps-dev.ts new file mode 100644 index 00000000..50fe71ab --- /dev/null +++ b/collector/deps-dev.ts @@ -0,0 +1,4 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; diff --git a/collector/deps.ts b/collector/deps.ts new file mode 100644 index 00000000..a77f6ed3 --- /dev/null +++ b/collector/deps.ts @@ -0,0 +1,5 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as path from "https://deno.land/std@0.208.0/path/mod.ts"; +export * as posix from "https://deno.land/std@0.208.0/path/posix/mod.ts"; +export * as walk from "https://deno.land/std@0.208.0/fs/walk.ts"; diff --git a/collector/formatter.ts b/collector/formatter.ts index d60c329f..3b62ee7e 100644 --- a/collector/formatter.ts +++ b/collector/formatter.ts @@ -1,4 +1,10 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +// This file contains code from deno fresh (https://github.com/denoland/fresh), +// which is a web framework, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2021-2023 Luca Casonato import * as runtime from "../standards/runtime.ts"; diff --git a/collector/manifest.test.ts b/collector/manifest.test.ts index 049252dd..a3e84dbd 100644 --- a/collector/manifest.test.ts +++ b/collector/manifest.test.ts @@ -1,7 +1,12 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +// This file contains code from deno fresh (https://github.com/denoland/fresh), +// which is a web framework, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2021-2023 Luca Casonato + +import { assert, bdd } from "./deps-dev.ts"; import * as manifest from "./manifest.ts"; bdd.describe("cool/collector/manifest", () => { diff --git a/collector/manifest.ts b/collector/manifest.ts index 2aeeb42c..0b6e48a9 100644 --- a/collector/manifest.ts +++ b/collector/manifest.ts @@ -1,12 +1,14 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. - -import { - isIdentifierChar, - isIdentifierStart, -} from "https://esm.sh/@babel/helper-validator-identifier@7.22.20"; -import * as path from "$std/path/mod.ts"; -import * as posix from "$std/path/posix/mod.ts"; +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +// This file contains code from deno fresh (https://github.com/denoland/fresh), +// which is a web framework, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2021-2023 Luca Casonato + +import { path, posix } from "./deps.ts"; import * as runtime from "../standards/runtime.ts"; +import * as validatorIdentifier from "./validator-identifier/mod.ts"; import * as collector from "./collector.ts"; import * as formatter from "./formatter.ts"; @@ -43,12 +45,12 @@ export function specifierToIdentifier(specifier: string, used: Set) { let ident = ""; for (let i = 0; i < specifier.length; i++) { const char = specifier.charCodeAt(i); - if (i === 0 && !isIdentifierStart(char)) { + if (i === 0 && !validatorIdentifier.isIdentifierStart(char)) { ident += "_"; - if (isIdentifierChar(char)) { + if (validatorIdentifier.isIdentifierChar(char)) { ident += specifier[i]; } - } else if (!isIdentifierChar(char)) { + } else if (!validatorIdentifier.isIdentifierChar(char)) { if (ident[ident.length - 1] !== "_") { ident += "_"; } diff --git a/collector/mod.ts b/collector/mod.ts index 1f3a9fec..b08b710a 100644 --- a/collector/mod.ts +++ b/collector/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./collector.ts"; export * from "./manifest.ts"; diff --git a/collector/validator-identifier/char-codes.ts b/collector/validator-identifier/char-codes.ts new file mode 100644 index 00000000..ca17d91f --- /dev/null +++ b/collector/validator-identifier/char-codes.ts @@ -0,0 +1,113 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +// This file contains code from babel-helper-validation-identifier (https://github.com/babel/babel/blob/main/packages/babel-helper-validator-identifier), +// which is a transformation helper for babel, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2014-present Sebastian McKenzie and other contributors + +export const backSpace = 8 as const; +export const tab = 9 as const; // '\t' +export const lineFeed = 10 as const; // '\n' +export const carriageReturn = 13 as const; // '\r' +export const shiftOut = 14 as const; +export const space = 32 as const; +export const exclamationMark = 33 as const; // '!' +export const quotationMark = 34 as const; // '"' +export const numberSign = 35 as const; // '#' +export const dollarSign = 36 as const; // '$' +export const percentSign = 37 as const; // '%' +export const ampersand = 38 as const; // '&' +export const apostrophe = 39 as const; // ''' +export const leftParenthesis = 40 as const; // '(' +export const rightParenthesis = 41 as const; // ')' +export const asterisk = 42 as const; // '*' +export const plusSign = 43 as const; // '+' +export const comma = 44 as const; // ',' +export const dash = 45 as const; // '-' +export const dot = 46 as const; // '.' +export const slash = 47 as const; // '/' +export const digit0 = 48 as const; // '0' +export const digit1 = 49 as const; // '1' +export const digit2 = 50 as const; // '2' +export const digit3 = 51 as const; // '3' +export const digit4 = 52 as const; // '4' +export const digit5 = 53 as const; // '5' +export const digit6 = 54 as const; // '6' +export const digit7 = 55 as const; // '7' +export const digit8 = 56 as const; // '8' +export const digit9 = 57 as const; // '9' +export const colon = 58 as const; // ':' +export const semicolon = 59 as const; // ';' +export const lessThan = 60 as const; // '<' +export const equalsTo = 61 as const; // '=' +export const greaterThan = 62 as const; // '>' +export const questionMark = 63 as const; // '?' +export const atSign = 64 as const; // '@' +export const uppercaseA = 65 as const; // 'A' +export const uppercaseB = 66 as const; // 'B' +export const uppercaseC = 67 as const; // 'C' +export const uppercaseD = 68 as const; // 'D' +export const uppercaseE = 69 as const; // 'E' +export const uppercaseF = 70 as const; // 'F' +export const uppercaseG = 71 as const; // 'G' +export const uppercaseH = 72 as const; // 'H' +export const uppercaseI = 73 as const; // 'I' +export const uppercaseJ = 74 as const; // 'J' +export const uppercaseK = 75 as const; // 'K' +export const uppercaseL = 76 as const; // 'L' +export const uppercaseM = 77 as const; // 'M' +export const uppercaseN = 78 as const; // 'N' +export const uppercaseO = 79 as const; // 'O' +export const uppercaseP = 80 as const; // 'P' +export const uppercaseQ = 81 as const; // 'Q' +export const uppercaseR = 82 as const; // 'R' +export const uppercaseS = 83 as const; // 'S' +export const uppercaseT = 84 as const; // 'T' +export const uppercaseU = 85 as const; // 'U' +export const uppercaseV = 86 as const; // 'V' +export const uppercaseW = 87 as const; // 'W' +export const uppercaseX = 88 as const; // 'X' +export const uppercaseY = 89 as const; // 'Y' +export const uppercaseZ = 90 as const; // 'Z' +export const leftSquareBracket = 91 as const; // '[' +export const backslash = 92 as const; // '\ ' +export const rightSquareBracket = 93 as const; // ']' +export const caret = 94 as const; // '^' +export const underscore = 95 as const; // '_' +export const graveAccent = 96 as const; // '`' +export const lowercaseA = 97 as const; // 'a' +export const lowercaseB = 98 as const; // 'b' +export const lowercaseC = 99 as const; // 'c' +export const lowercaseD = 100 as const; // 'd' +export const lowercaseE = 101 as const; // 'e' +export const lowercaseF = 102 as const; // 'f' +export const lowercaseG = 103 as const; // 'g' +export const lowercaseH = 104 as const; // 'h' +export const lowercaseI = 105 as const; // 'i' +export const lowercaseJ = 106 as const; // 'j' +export const lowercaseK = 107 as const; // 'k' +export const lowercaseL = 108 as const; // 'l' +export const lowercaseM = 109 as const; // 'm' +export const lowercaseN = 110 as const; // 'n' +export const lowercaseO = 111 as const; // 'o' +export const lowercaseP = 112 as const; // 'p' +export const lowercaseQ = 113 as const; // 'q' +export const lowercaseR = 114 as const; // 'r' +export const lowercaseS = 115 as const; // 's' +export const lowercaseT = 116 as const; // 't' +export const lowercaseU = 117 as const; // 'u' +export const lowercaseV = 118 as const; // 'v' +export const lowercaseW = 119 as const; // 'w' +export const lowercaseX = 120 as const; // 'x' +export const lowercaseY = 121 as const; // 'y' +export const lowercaseZ = 122 as const; // 'z' +export const leftCurlyBrace = 123 as const; // '{' +export const verticalBar = 124 as const; // '|' +export const rightCurlyBrace = 125 as const; // '}' +export const tilde = 126 as const; // '~' +export const nonBreakingSpace = 160 as const; +// deno-lint-ignore no-irregular-whitespace +export const oghamSpaceMark = 5760 as const; // ' ' +export const lineSeparator = 8232 as const; +export const paragraphSeparator = 8233 as const; diff --git a/collector/validator-identifier/mod.ts b/collector/validator-identifier/mod.ts new file mode 100644 index 00000000..0e5ac0ec --- /dev/null +++ b/collector/validator-identifier/mod.ts @@ -0,0 +1,954 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +// This file contains code from babel-helper-validation-identifier (https://github.com/babel/babel/blob/main/packages/babel-helper-validator-identifier), +// which is a transformation helper for babel, licensed under the MIT license. + +// Copyright (c) 2023 Eser Ozvataf and other contributors +// Copyright (c) 2014-present Sebastian McKenzie and other contributors + +import * as charCodes from "./char-codes.ts"; + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point between 0x80 and 0xffff. + +const nonASCIIidentifierStart = new RegExp( + "[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]", +); +const nonASCIIidentifier = new RegExp( + "[\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65]", +); + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code: number, set: readonly number[]): boolean { + let pos = 0x10000; + + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) { + return false; + } + + pos += set[i + 1]; + if (pos >= code) { + return true; + } + } + + return false; +} + +// These are a run-length and offset-encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +const astralIdentifierStartCodes = [ + 0, + 11, + 2, + 25, + 2, + 18, + 2, + 1, + 2, + 14, + 3, + 13, + 35, + 122, + 70, + 52, + 268, + 28, + 4, + 48, + 48, + 31, + 14, + 29, + 6, + 37, + 11, + 29, + 3, + 35, + 5, + 7, + 2, + 4, + 43, + 157, + 19, + 35, + 5, + 35, + 5, + 39, + 9, + 51, + 13, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 2, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 68, + 310, + 10, + 21, + 11, + 7, + 25, + 5, + 2, + 41, + 2, + 8, + 70, + 5, + 3, + 0, + 2, + 43, + 2, + 1, + 4, + 0, + 3, + 22, + 11, + 22, + 10, + 30, + 66, + 18, + 2, + 1, + 11, + 21, + 11, + 25, + 71, + 55, + 7, + 1, + 65, + 0, + 16, + 3, + 2, + 2, + 2, + 28, + 43, + 28, + 4, + 28, + 36, + 7, + 2, + 27, + 28, + 53, + 11, + 21, + 11, + 18, + 14, + 17, + 111, + 72, + 56, + 50, + 14, + 50, + 14, + 35, + 349, + 41, + 7, + 1, + 79, + 28, + 11, + 0, + 9, + 21, + 43, + 17, + 47, + 20, + 28, + 22, + 13, + 52, + 58, + 1, + 3, + 0, + 14, + 44, + 33, + 24, + 27, + 35, + 30, + 0, + 3, + 0, + 9, + 34, + 4, + 0, + 13, + 47, + 15, + 3, + 22, + 0, + 2, + 0, + 36, + 17, + 2, + 24, + 20, + 1, + 64, + 6, + 2, + 0, + 2, + 3, + 2, + 14, + 2, + 9, + 8, + 46, + 39, + 7, + 3, + 1, + 3, + 21, + 2, + 6, + 2, + 1, + 2, + 4, + 4, + 0, + 19, + 0, + 13, + 4, + 159, + 52, + 19, + 3, + 21, + 2, + 31, + 47, + 21, + 1, + 2, + 0, + 185, + 46, + 42, + 3, + 37, + 47, + 21, + 0, + 60, + 42, + 14, + 0, + 72, + 26, + 38, + 6, + 186, + 43, + 117, + 63, + 32, + 7, + 3, + 0, + 3, + 7, + 2, + 1, + 2, + 23, + 16, + 0, + 2, + 0, + 95, + 7, + 3, + 38, + 17, + 0, + 2, + 0, + 29, + 0, + 11, + 39, + 8, + 0, + 22, + 0, + 12, + 45, + 20, + 0, + 19, + 72, + 264, + 8, + 2, + 36, + 18, + 0, + 50, + 29, + 113, + 6, + 2, + 1, + 2, + 37, + 22, + 0, + 26, + 5, + 2, + 1, + 2, + 31, + 15, + 0, + 328, + 18, + 16, + 0, + 2, + 12, + 2, + 33, + 125, + 0, + 80, + 921, + 103, + 110, + 18, + 195, + 2637, + 96, + 16, + 1071, + 18, + 5, + 4026, + 582, + 8634, + 568, + 8, + 30, + 18, + 78, + 18, + 29, + 19, + 47, + 17, + 3, + 32, + 20, + 6, + 18, + 689, + 63, + 129, + 74, + 6, + 0, + 67, + 12, + 65, + 1, + 2, + 0, + 29, + 6135, + 9, + 1237, + 43, + 8, + 8936, + 3, + 2, + 6, + 2, + 1, + 2, + 290, + 16, + 0, + 30, + 2, + 3, + 0, + 15, + 3, + 9, + 395, + 2309, + 106, + 6, + 12, + 4, + 8, + 8, + 9, + 5991, + 84, + 2, + 70, + 2, + 1, + 3, + 0, + 3, + 1, + 3, + 3, + 2, + 11, + 2, + 0, + 2, + 6, + 2, + 64, + 2, + 3, + 3, + 7, + 2, + 6, + 2, + 27, + 2, + 3, + 2, + 4, + 2, + 0, + 4, + 6, + 2, + 339, + 3, + 24, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 7, + 1845, + 30, + 7, + 5, + 262, + 61, + 147, + 44, + 11, + 6, + 17, + 0, + 322, + 29, + 19, + 43, + 485, + 27, + 757, + 6, + 2, + 3, + 2, + 1, + 2, + 14, + 2, + 196, + 60, + 67, + 8, + 0, + 1205, + 3, + 2, + 26, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 9, + 2, + 3, + 2, + 0, + 2, + 0, + 7, + 0, + 5, + 0, + 2, + 0, + 2, + 0, + 2, + 2, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 1, + 2, + 0, + 3, + 3, + 2, + 6, + 2, + 3, + 2, + 3, + 2, + 0, + 2, + 9, + 2, + 16, + 6, + 2, + 2, + 4, + 2, + 16, + 4421, + 42719, + 33, + 4153, + 7, + 221, + 3, + 5761, + 15, + 7472, + 16, + 621, + 2467, + 541, + 1507, + 4938, + 6, + 4191, +]; +const astralIdentifierCodes = [ + 509, + 0, + 227, + 0, + 150, + 4, + 294, + 9, + 1368, + 2, + 2, + 1, + 6, + 3, + 41, + 2, + 5, + 0, + 166, + 1, + 574, + 3, + 9, + 9, + 370, + 1, + 81, + 2, + 71, + 10, + 50, + 3, + 123, + 2, + 54, + 14, + 32, + 10, + 3, + 1, + 11, + 3, + 46, + 10, + 8, + 0, + 46, + 9, + 7, + 2, + 37, + 13, + 2, + 9, + 6, + 1, + 45, + 0, + 13, + 2, + 49, + 13, + 9, + 3, + 2, + 11, + 83, + 11, + 7, + 0, + 3, + 0, + 158, + 11, + 6, + 9, + 7, + 3, + 56, + 1, + 2, + 6, + 3, + 1, + 3, + 2, + 10, + 0, + 11, + 1, + 3, + 6, + 4, + 4, + 193, + 17, + 10, + 9, + 5, + 0, + 82, + 19, + 13, + 9, + 214, + 6, + 3, + 8, + 28, + 1, + 83, + 16, + 16, + 9, + 82, + 12, + 9, + 9, + 84, + 14, + 5, + 9, + 243, + 14, + 166, + 9, + 71, + 5, + 2, + 1, + 3, + 3, + 2, + 0, + 2, + 1, + 13, + 9, + 120, + 6, + 3, + 6, + 4, + 0, + 29, + 9, + 41, + 6, + 2, + 3, + 9, + 0, + 10, + 10, + 47, + 15, + 406, + 7, + 2, + 7, + 17, + 9, + 57, + 21, + 2, + 13, + 123, + 5, + 4, + 0, + 2, + 1, + 2, + 6, + 2, + 0, + 9, + 9, + 49, + 4, + 2, + 1, + 2, + 4, + 9, + 9, + 330, + 3, + 10, + 1, + 2, + 0, + 49, + 6, + 4, + 4, + 14, + 9, + 5351, + 0, + 7, + 14, + 13835, + 9, + 87, + 9, + 39, + 4, + 60, + 6, + 26, + 9, + 1014, + 0, + 2, + 54, + 8, + 3, + 82, + 0, + 12, + 1, + 19628, + 1, + 4706, + 45, + 3, + 22, + 543, + 4, + 4, + 5, + 9, + 7, + 3, + 6, + 31, + 3, + 149, + 2, + 1418, + 49, + 513, + 54, + 5, + 49, + 9, + 0, + 15, + 0, + 23, + 4, + 2, + 14, + 1361, + 6, + 2, + 16, + 3, + 6, + 2, + 1, + 2, + 4, + 101, + 0, + 161, + 6, + 10, + 9, + 357, + 0, + 62, + 13, + 499, + 13, + 983, + 6, + 110, + 6, + 6, + 9, + 4759, + 9, + 787719, + 239, +]; + +// Test whether a given character code starts an identifier. + +export function isIdentifierStart(code: number): boolean { + if (code < charCodes.uppercaseA) { + return code === charCodes.dollarSign; + } + if (code <= charCodes.uppercaseZ) { + return true; + } + if (code < charCodes.lowercaseA) { + return code === charCodes.underscore; + } + if (code <= charCodes.lowercaseZ) { + return true; + } + if (code <= 0xffff) { + return ( + code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + ); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} + +// Test whether a given character is part of an identifier. + +export function isIdentifierChar(code: number): boolean { + if (code < charCodes.digit0) { + return code === charCodes.dollarSign; + } + if (code < charCodes.colon) { + return true; + } + if (code < charCodes.uppercaseA) { + return false; + } + if (code <= charCodes.uppercaseZ) { + return true; + } + if (code < charCodes.lowercaseA) { + return code === charCodes.underscore; + } + if (code <= charCodes.lowercaseZ) { + return true; + } + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return ( + isInAstralSet(code, astralIdentifierStartCodes) || + isInAstralSet(code, astralIdentifierCodes) + ); +} diff --git a/cool.ts b/cool.ts index ffba00a6..f3acc671 100755 --- a/cool.ts +++ b/cool.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-run --allow-read --allow-write --allow-net -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { metadata } from "https://deno.land/x/cool@0.7.13/mod.ts"; import { deno } from "https://deno.land/x/cool@0.7.13/deps.ts"; diff --git a/deno.jsonc b/deno.jsonc index e152e344..432ce9f2 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -13,8 +13,7 @@ "lock": false, "imports": { "$cool/jsx-runtime": "./jsx-runtime/mod.ts", - "$cool/": "./", - "$std/": "https://deno.land/std@0.208.0/" + "$cool/": "./" }, "lint": { "rules": { diff --git a/deps.ts b/deps.ts new file mode 100644 index 00000000..e795617e --- /dev/null +++ b/deps.ts @@ -0,0 +1,3 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as posix from "https://deno.land/std@0.208.0/path/posix/mod.ts"; diff --git a/di/container.test.ts b/di/container.test.ts index c21fc13b..21dc908b 100644 --- a/di/container.test.ts +++ b/di/container.test.ts @@ -1,8 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; -import * as mock from "$std/testing/mock.ts"; +import { assert, bdd, mock } from "./deps-dev.ts"; import { Registry } from "./container.ts"; bdd.describe("cool/di/container", () => { diff --git a/di/container.ts b/di/container.ts index 520f2dd1..5e449216 100644 --- a/di/container.ts +++ b/di/container.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type AnonymousFunction } from "../standards/functions.ts"; diff --git a/di/decorators.test.ts b/di/decorators.test.ts index 17cfa929..d699ac69 100644 --- a/di/decorators.test.ts +++ b/di/decorators.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { di } from "./services.ts"; import { injectable } from "./decorators.ts"; diff --git a/di/decorators.ts b/di/decorators.ts index ec030ad7..4766a6f3 100644 --- a/di/decorators.ts +++ b/di/decorators.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type ServiceKey } from "./primitives.ts"; import { registry } from "./services.ts"; diff --git a/di/deps-dev.ts b/di/deps-dev.ts new file mode 100644 index 00000000..7565d578 --- /dev/null +++ b/di/deps-dev.ts @@ -0,0 +1,5 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; +export * as mock from "https://deno.land/std@0.208.0/testing/mock.ts"; diff --git a/di/fluent-api-factory.test.ts b/di/fluent-api-factory.test.ts index 892fdea6..ff9ccf31 100644 --- a/di/fluent-api-factory.test.ts +++ b/di/fluent-api-factory.test.ts @@ -1,8 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; -import * as mock from "$std/testing/mock.ts"; +import { assert, bdd, mock } from "./deps-dev.ts"; import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/di/fluent-api-factory.ts b/di/fluent-api-factory.ts index c6c9c31b..7a8961a8 100644 --- a/di/fluent-api-factory.ts +++ b/di/fluent-api-factory.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type AnonymousFunction } from "../standards/functions.ts"; diff --git a/di/invoker.test.ts b/di/invoker.test.ts index 713fc3fd..9b3bad36 100644 --- a/di/invoker.test.ts +++ b/di/invoker.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { Registry } from "./container.ts"; import { invoke } from "./invoker.ts"; diff --git a/di/invoker.ts b/di/invoker.ts index eb7a6819..c4979cd6 100644 --- a/di/invoker.ts +++ b/di/invoker.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction } from "../standards/functions.ts"; import { diff --git a/di/mod.ts b/di/mod.ts index b3b8d2ec..7ace3869 100644 --- a/di/mod.ts +++ b/di/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./primitives.ts"; export * from "./container.ts"; diff --git a/di/primitives.ts b/di/primitives.ts index f6aff5fe..398e4c61 100644 --- a/di/primitives.ts +++ b/di/primitives.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { diff --git a/di/services.ts b/di/services.ts index 858b55b4..025cab46 100644 --- a/di/services.ts +++ b/di/services.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/directives/01-social.md b/directives/01-social.md index 3d42d789..6f7fee29 100644 --- a/directives/01-social.md +++ b/directives/01-social.md @@ -124,7 +124,7 @@ members. ## 10. Contact info -[the cool authors](https://github.com/eser/cool) +[Eser Ozvataf and other contributors](https://github.com/eser/cool) ## 11. License and attribution diff --git a/dotenv/base.ts b/dotenv/base.ts index 826bde59..01b23455 100644 --- a/dotenv/base.ts +++ b/dotenv/base.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // public symbols export const env = Symbol("env"); diff --git a/dotenv/configure.ts b/dotenv/configure.ts index 0fbba4ba..d8c79dfd 100644 --- a/dotenv/configure.ts +++ b/dotenv/configure.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { env } from "./base.ts"; diff --git a/dotenv/deps.ts b/dotenv/deps.ts new file mode 100644 index 00000000..5d18027a --- /dev/null +++ b/dotenv/deps.ts @@ -0,0 +1,3 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as dotenv from "https://deno.land/std@0.208.0/dotenv/mod.ts"; diff --git a/dotenv/loader.ts b/dotenv/loader.ts index 0cef52ad..38bc55d1 100644 --- a/dotenv/loader.ts +++ b/dotenv/loader.ts @@ -1,7 +1,7 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as dotenv from "$std/dotenv/mod.ts"; import * as runtime from "../standards/runtime.ts"; +import { dotenv } from "./deps.ts"; import { defaultEnvValue, defaultEnvVar, env, type EnvMap } from "./base.ts"; // interface definitions diff --git a/dotenv/mod.ts b/dotenv/mod.ts index 40c37a99..3484cb11 100644 --- a/dotenv/mod.ts +++ b/dotenv/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./base.ts"; export * from "./loader.ts"; diff --git a/dotenv/reader.ts b/dotenv/reader.ts index ad6968fb..b9ed6c89 100644 --- a/dotenv/reader.ts +++ b/dotenv/reader.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { defaultEnvValue, env, type EnvMap } from "./base.ts"; diff --git a/events/container.test.ts b/events/container.test.ts index 39284763..be5797c2 100644 --- a/events/container.test.ts +++ b/events/container.test.ts @@ -1,8 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; -import * as mock from "$std/testing/mock.ts"; +import { assert, bdd, mock } from "./deps-dev.ts"; import { Registry } from "./container.ts"; bdd.describe("cool/events/container", () => { diff --git a/events/container.ts b/events/container.ts index 14fcf238..2400a703 100644 --- a/events/container.ts +++ b/events/container.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type EventDispatcher, type EventRegistry } from "./primitives.ts"; diff --git a/events/deps-dev.ts b/events/deps-dev.ts new file mode 100644 index 00000000..7565d578 --- /dev/null +++ b/events/deps-dev.ts @@ -0,0 +1,5 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; +export * as mock from "https://deno.land/std@0.208.0/testing/mock.ts"; diff --git a/events/events.ts b/events/events.ts index 5f44825c..9543104b 100644 --- a/events/events.ts +++ b/events/events.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/events/fluent-api-factory.ts b/events/fluent-api-factory.ts index c1cae5c1..e1aa9d69 100644 --- a/events/fluent-api-factory.ts +++ b/events/fluent-api-factory.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type EventDispatcher } from "./primitives.ts"; diff --git a/events/mod.ts b/events/mod.ts index 941e5939..bc3c3943 100644 --- a/events/mod.ts +++ b/events/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./primitives.ts"; export * from "./container.ts"; diff --git a/events/primitives.ts b/events/primitives.ts index 3951a360..2384d70f 100644 --- a/events/primitives.ts +++ b/events/primitives.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export interface EventRegistry { target: EventTarget; diff --git a/fp/append-to-array.bench.ts b/fp/append-to-array.bench.ts index ed5c6025..5816864b 100644 --- a/fp/append-to-array.bench.ts +++ b/fp/append-to-array.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { appendToArray } from "./append-to-array.ts"; diff --git a/fp/append-to-array.test.ts b/fp/append-to-array.test.ts index 5755cc37..4cd86de3 100644 --- a/fp/append-to-array.test.ts +++ b/fp/append-to-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { appendToArray } from "./append-to-array.ts"; bdd.describe("cool/fp/append-to-array", () => { diff --git a/fp/append-to-array.ts b/fp/append-to-array.ts index b551e6aa..1408ea7a 100644 --- a/fp/append-to-array.ts +++ b/fp/append-to-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const appendToArray = ( instance: Iterable, diff --git a/fp/append-to-object.bench.ts b/fp/append-to-object.bench.ts index b22660e7..97d2a6e0 100644 --- a/fp/append-to-object.bench.ts +++ b/fp/append-to-object.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { appendToObject } from "./append-to-object.ts"; diff --git a/fp/append-to-object.test.ts b/fp/append-to-object.test.ts index 5a7a6434..54e702e1 100644 --- a/fp/append-to-object.test.ts +++ b/fp/append-to-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { appendToObject } from "./append-to-object.ts"; bdd.describe("cool/fp/append-to-object", () => { diff --git a/fp/append-to-object.ts b/fp/append-to-object.ts index 6121a6bd..4d68841d 100644 --- a/fp/append-to-object.ts +++ b/fp/append-to-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const appendToObject = ( instance: Record, diff --git a/fp/associate-array.test.ts b/fp/associate-array.test.ts index 1c9cd2c9..bc5c09c6 100644 --- a/fp/associate-array.test.ts +++ b/fp/associate-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { associateArray } from "./associate-array.ts"; bdd.describe("cool/fp/associate-array", () => { diff --git a/fp/associate-array.ts b/fp/associate-array.ts index 0fcb10d7..cbc7e991 100644 --- a/fp/associate-array.ts +++ b/fp/associate-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const associateArray = ( instance: Iterable, diff --git a/fp/associate-object.test.ts b/fp/associate-object.test.ts index 5eaf390e..f3c231a2 100644 --- a/fp/associate-object.test.ts +++ b/fp/associate-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { associateObject } from "./associate-object.ts"; bdd.describe("cool/fp/associate-object", () => { diff --git a/fp/associate-object.ts b/fp/associate-object.ts index 8f50ce46..16114bfd 100644 --- a/fp/associate-object.ts +++ b/fp/associate-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const associateObject = ( instance: Record, diff --git a/fp/compose.test.ts b/fp/compose.test.ts index b833bff0..4d2cc7ee 100644 --- a/fp/compose.test.ts +++ b/fp/compose.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { compose } from "./compose.ts"; bdd.describe("cool/fp/compose", () => { diff --git a/fp/compose.ts b/fp/compose.ts index 70a542ed..f2c87f20 100644 --- a/fp/compose.ts +++ b/fp/compose.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction, diff --git a/fp/curry-functions.test.ts b/fp/curry-functions.test.ts index ffd30a6c..f1b5694c 100644 --- a/fp/curry-functions.test.ts +++ b/fp/curry-functions.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { curryFunctions } from "./curry-functions.ts"; bdd.describe("cool/fp/curry-functions", () => { diff --git a/fp/curry-functions.ts b/fp/curry-functions.ts index e5c03903..6da02016 100644 --- a/fp/curry-functions.ts +++ b/fp/curry-functions.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { curry } from "./curry.ts"; diff --git a/fp/curry-right.test.ts b/fp/curry-right.test.ts index e757ebfd..af56a032 100644 --- a/fp/curry-right.test.ts +++ b/fp/curry-right.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { curryRight } from "./curry-right.ts"; bdd.describe("cool/fp/curry-right", () => { diff --git a/fp/curry-right.ts b/fp/curry-right.ts index 2d9ee4f0..9f50d73a 100644 --- a/fp/curry-right.ts +++ b/fp/curry-right.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const curryRight = ( func: (...args: readonly [...ReadonlyArray, ...ReadonlyArray]) => T3, diff --git a/fp/curry.test.ts b/fp/curry.test.ts index 02936552..62cabb67 100644 --- a/fp/curry.test.ts +++ b/fp/curry.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { curry } from "./curry.ts"; bdd.describe("cool/fp/curry", () => { diff --git a/fp/curry.ts b/fp/curry.ts index 247294a2..1270464a 100644 --- a/fp/curry.ts +++ b/fp/curry.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const curry = ( func: (...args: readonly [...ReadonlyArray, ...ReadonlyArray]) => T3, diff --git a/fp/decorate.test.ts b/fp/decorate.test.ts index d0753fcd..e1ba8001 100644 --- a/fp/decorate.test.ts +++ b/fp/decorate.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { decorate } from "./decorate.ts"; bdd.describe("cool/fp/decorate", () => { diff --git a/fp/decorate.ts b/fp/decorate.ts index 00c083b7..603724b3 100644 --- a/fp/decorate.ts +++ b/fp/decorate.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type Decorated = (...args: ReadonlyArray) => T2; diff --git a/fp/deep-copy.bench.ts b/fp/deep-copy.bench.ts index aaa0fb52..cdc08bcb 100644 --- a/fp/deep-copy.bench.ts +++ b/fp/deep-copy.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { deepCopy, deepCopy2 } from "./deep-copy.ts"; diff --git a/fp/deep-copy.test.ts b/fp/deep-copy.test.ts index 36e43bcc..1045b698 100644 --- a/fp/deep-copy.test.ts +++ b/fp/deep-copy.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { deepCopy } from "./deep-copy.ts"; class Dummy { diff --git a/fp/deep-copy.ts b/fp/deep-copy.ts index 7e58f76c..68d62d75 100644 --- a/fp/deep-copy.ts +++ b/fp/deep-copy.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. type Key = string | number | symbol; diff --git a/fp/deep-merge.test.ts b/fp/deep-merge.test.ts index 3743669e..258cf1fa 100644 --- a/fp/deep-merge.test.ts +++ b/fp/deep-merge.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { deepMerge } from "./deep-merge.ts"; type Dummy1Prop = { diff --git a/fp/deep-merge.ts b/fp/deep-merge.ts index 73a82f69..d7adc0c5 100644 --- a/fp/deep-merge.ts +++ b/fp/deep-merge.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // deno-lint-ignore no-explicit-any type ObjectType = Record; diff --git a/fp/deps-dev.ts b/fp/deps-dev.ts new file mode 100644 index 00000000..50fe71ab --- /dev/null +++ b/fp/deps-dev.ts @@ -0,0 +1,4 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; diff --git a/fp/dispatcher.test.ts b/fp/dispatcher.test.ts index c2bbd6f4..abe81501 100644 --- a/fp/dispatcher.test.ts +++ b/fp/dispatcher.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { dispatcher, type LogType, type NextType } from "./dispatcher.ts"; type StateType = Record; diff --git a/fp/dispatcher.ts b/fp/dispatcher.ts index 2646a8b6..089ec591 100644 --- a/fp/dispatcher.ts +++ b/fp/dispatcher.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type NextType = (newState: T) => Promise; export type MutatorType = (state: T, next: NextType) => Promise; diff --git a/fp/distinct-array.test.ts b/fp/distinct-array.test.ts index 2743d269..544f321c 100644 --- a/fp/distinct-array.test.ts +++ b/fp/distinct-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { distinctArray } from "./distinct-array.ts"; bdd.describe("cool/fp/distinct-array", () => { diff --git a/fp/distinct-array.ts b/fp/distinct-array.ts index d924a676..9a620c23 100644 --- a/fp/distinct-array.ts +++ b/fp/distinct-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const distinctArray = ( instance: Iterable, diff --git a/fp/distinct-object.test.ts b/fp/distinct-object.test.ts index 64093739..a22743b4 100644 --- a/fp/distinct-object.test.ts +++ b/fp/distinct-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { distinctObject } from "./distinct-object.ts"; bdd.describe("cool/fp/distinct-object", () => { diff --git a/fp/distinct-object.ts b/fp/distinct-object.ts index 5d753a1c..00aa1dcd 100644 --- a/fp/distinct-object.ts +++ b/fp/distinct-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const distinctObject = ( instance: Record, diff --git a/fp/drop-from-array.test.ts b/fp/drop-from-array.test.ts index de5e0eab..a00dd73a 100644 --- a/fp/drop-from-array.test.ts +++ b/fp/drop-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { dropFromArray } from "./drop-from-array.ts"; bdd.describe("cool/fp/drop-from-array", () => { diff --git a/fp/drop-from-array.ts b/fp/drop-from-array.ts index a66c95a7..044f1ef8 100644 --- a/fp/drop-from-array.ts +++ b/fp/drop-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const dropFromArray = ( instance: Iterable, diff --git a/fp/drop-from-object.test.ts b/fp/drop-from-object.test.ts index 42527952..076eba74 100644 --- a/fp/drop-from-object.test.ts +++ b/fp/drop-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { dropFromObject } from "./drop-from-object.ts"; bdd.describe("cool/fp/drop-from-object", () => { diff --git a/fp/drop-from-object.ts b/fp/drop-from-object.ts index d1e2ae03..29d9a9db 100644 --- a/fp/drop-from-object.ts +++ b/fp/drop-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const dropFromObject = ( instance: Record, diff --git a/fp/emitter.test.ts b/fp/emitter.test.ts index c3bf126e..0fc3c1ac 100644 --- a/fp/emitter.test.ts +++ b/fp/emitter.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { emitter, type LogType } from "./emitter.ts"; bdd.describe("cool/fp/emitter", () => { diff --git a/fp/emitter.ts b/fp/emitter.ts index 8d37a3dc..83b082f7 100644 --- a/fp/emitter.ts +++ b/fp/emitter.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type ArgList } from "../standards/functions.ts"; diff --git a/fp/filter-array.test.ts b/fp/filter-array.test.ts index 9c0476d3..498a10d7 100644 --- a/fp/filter-array.test.ts +++ b/fp/filter-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { filterArray } from "./filter-array.ts"; bdd.describe("cool/fp/filter-array", () => { diff --git a/fp/filter-array.ts b/fp/filter-array.ts index 5a4c5a58..db7b450b 100644 --- a/fp/filter-array.ts +++ b/fp/filter-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const filterArray = ( instance: Iterable, diff --git a/fp/filter-object.test.ts b/fp/filter-object.test.ts index 1562be05..4e8f5cf8 100644 --- a/fp/filter-object.test.ts +++ b/fp/filter-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { filterObject } from "./filter-object.ts"; bdd.describe("cool/fp/filter-object", () => { diff --git a/fp/filter-object.ts b/fp/filter-object.ts index afb3ebf0..475242b4 100644 --- a/fp/filter-object.ts +++ b/fp/filter-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const filterObject = ( instance: Record, diff --git a/fp/iterate.test.ts b/fp/iterate.test.ts index 9bcbd4a1..c8efbd50 100644 --- a/fp/iterate.test.ts +++ b/fp/iterate.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { pipe } from "./pipe.ts"; import { iterate } from "./iterate.ts"; diff --git a/fp/iterate.ts b/fp/iterate.ts index 701d3b7d..3fb3e0d0 100644 --- a/fp/iterate.ts +++ b/fp/iterate.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type ArgList } from "../standards/functions.ts"; diff --git a/fp/map-array.test.ts b/fp/map-array.test.ts index d467eba0..8c2e4483 100644 --- a/fp/map-array.test.ts +++ b/fp/map-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { mapArray } from "./map-array.ts"; bdd.describe("cool/fp/map-array", () => { diff --git a/fp/map-array.ts b/fp/map-array.ts index c62bf252..f60b5f1a 100644 --- a/fp/map-array.ts +++ b/fp/map-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const mapArray = ( instance: Iterable, diff --git a/fp/map-object.test.ts b/fp/map-object.test.ts index 974e95fa..7f15bcc9 100644 --- a/fp/map-object.test.ts +++ b/fp/map-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { mapObject } from "./map-object.ts"; bdd.describe("cool/fp/map-object", () => { diff --git a/fp/map-object.ts b/fp/map-object.ts index b1e36d69..56d3ac48 100644 --- a/fp/map-object.ts +++ b/fp/map-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const mapObject = ( instance: Record, diff --git a/fp/match.test.ts b/fp/match.test.ts index bfb145c8..246e62cc 100644 --- a/fp/match.test.ts +++ b/fp/match.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { match } from "./match.ts"; bdd.describe("cool/fp/match", () => { diff --git a/fp/match.ts b/fp/match.ts index 20adc030..088019e1 100644 --- a/fp/match.ts +++ b/fp/match.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type Callback = () => unknown; export type Pattern = [unknown, Callback]; diff --git a/fp/merge-arrays.test.ts b/fp/merge-arrays.test.ts index d85f6c97..0c3c049a 100644 --- a/fp/merge-arrays.test.ts +++ b/fp/merge-arrays.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { mergeArrays } from "./merge-arrays.ts"; bdd.describe("cool/fp/merge-arrays", () => { diff --git a/fp/merge-arrays.ts b/fp/merge-arrays.ts index fddf223e..b3d77f36 100644 --- a/fp/merge-arrays.ts +++ b/fp/merge-arrays.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const mergeArrays = ( ...instances: ReadonlyArray> diff --git a/fp/merge-objects.test.ts b/fp/merge-objects.test.ts index 770b45a2..ca5a3711 100644 --- a/fp/merge-objects.test.ts +++ b/fp/merge-objects.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { mergeObjects } from "./merge-objects.ts"; bdd.describe("cool/fp/merge-objects", () => { diff --git a/fp/merge-objects.ts b/fp/merge-objects.ts index ee356675..991f888a 100644 --- a/fp/merge-objects.ts +++ b/fp/merge-objects.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const mergeObjects = ( ...instances: ReadonlyArray> diff --git a/fp/mod.ts b/fp/mod.ts index ce990498..6e936c44 100644 --- a/fp/mod.ts +++ b/fp/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./append-to-array.ts"; export * from "./append-to-object.ts"; diff --git a/fp/mutate.bench.ts b/fp/mutate.bench.ts index c658ee20..465565e1 100644 --- a/fp/mutate.bench.ts +++ b/fp/mutate.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { mutate } from "./mutate.ts"; diff --git a/fp/mutate.test.ts b/fp/mutate.test.ts index 16298349..1a279f51 100644 --- a/fp/mutate.test.ts +++ b/fp/mutate.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { mutate } from "./mutate.ts"; bdd.describe("cool/fp/mutate", () => { diff --git a/fp/mutate.ts b/fp/mutate.ts index a53c021e..b3e9cdca 100644 --- a/fp/mutate.ts +++ b/fp/mutate.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { deepCopy } from "./deep-copy.ts"; diff --git a/fp/pick-from-array.test.ts b/fp/pick-from-array.test.ts index fcd8fdb8..5ba2da8a 100644 --- a/fp/pick-from-array.test.ts +++ b/fp/pick-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { pickFromArray } from "./pick-from-array.ts"; bdd.describe("cool/fp/pick-from-array", () => { diff --git a/fp/pick-from-array.ts b/fp/pick-from-array.ts index 81e06911..2f682567 100644 --- a/fp/pick-from-array.ts +++ b/fp/pick-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type PickFromArrayResult = { items: Array; rest: Array }; diff --git a/fp/pick-from-object.test.ts b/fp/pick-from-object.test.ts index fbb5fc10..311165e0 100644 --- a/fp/pick-from-object.test.ts +++ b/fp/pick-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { pickFromObject } from "./pick-from-object.ts"; bdd.describe("cool/fp/pick-from-object", () => { diff --git a/fp/pick-from-object.ts b/fp/pick-from-object.ts index f71680e5..ddacd758 100644 --- a/fp/pick-from-object.ts +++ b/fp/pick-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type PickFromObjectResult = { items: Record; diff --git a/fp/pipe.test.ts b/fp/pipe.test.ts index 4e12c476..2a36d90c 100644 --- a/fp/pipe.test.ts +++ b/fp/pipe.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { pipe } from "./pipe.ts"; bdd.describe("cool/fp/pipe", () => { diff --git a/fp/pipe.ts b/fp/pipe.ts index 4b4bcb6d..0eefa595 100644 --- a/fp/pipe.ts +++ b/fp/pipe.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction, diff --git a/fp/prepend-to-array.test.ts b/fp/prepend-to-array.test.ts index 7332fc98..84a57c31 100644 --- a/fp/prepend-to-array.test.ts +++ b/fp/prepend-to-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { prependToArray } from "./prepend-to-array.ts"; bdd.describe("cool/fp/prepend-to-array", () => { diff --git a/fp/prepend-to-array.ts b/fp/prepend-to-array.ts index ba92c43e..24fee176 100644 --- a/fp/prepend-to-array.ts +++ b/fp/prepend-to-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const prependToArray = ( instance: Iterable, diff --git a/fp/prepend-to-object.test.ts b/fp/prepend-to-object.test.ts index 258ad2ce..580b625e 100644 --- a/fp/prepend-to-object.test.ts +++ b/fp/prepend-to-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { prependToObject } from "./prepend-to-object.ts"; bdd.describe("cool/fp/prepend-to-object", () => { diff --git a/fp/prepend-to-object.ts b/fp/prepend-to-object.ts index df34ca4d..1ab5989a 100644 --- a/fp/prepend-to-object.ts +++ b/fp/prepend-to-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const prependToObject = ( instance: Record, diff --git a/fp/remove-first-match-from-array.test.ts b/fp/remove-first-match-from-array.test.ts index db6ecd85..ab0f1e9d 100644 --- a/fp/remove-first-match-from-array.test.ts +++ b/fp/remove-first-match-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeFirstMatchFromArray } from "./remove-first-match-from-array.ts"; bdd.describe("cool/fp/remove-first-match-from-array", () => { diff --git a/fp/remove-first-match-from-array.ts b/fp/remove-first-match-from-array.ts index abc948a3..cfe7adb4 100644 --- a/fp/remove-first-match-from-array.ts +++ b/fp/remove-first-match-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeFirstMatchFromArray = ( instance: Iterable, diff --git a/fp/remove-first-match-from-object.test.ts b/fp/remove-first-match-from-object.test.ts index af535ea3..c49d7d89 100644 --- a/fp/remove-first-match-from-object.test.ts +++ b/fp/remove-first-match-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeFirstMatchFromObject } from "./remove-first-match-from-object.ts"; bdd.describe("cool/fp/remove-first-match-from-object", () => { diff --git a/fp/remove-first-match-from-object.ts b/fp/remove-first-match-from-object.ts index 9a253d4a..f49c3ef9 100644 --- a/fp/remove-first-match-from-object.ts +++ b/fp/remove-first-match-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeFirstMatchFromObject = ( instance: Record, diff --git a/fp/remove-index-from-array.test.ts b/fp/remove-index-from-array.test.ts index 7e4da309..e03f7bda 100644 --- a/fp/remove-index-from-array.test.ts +++ b/fp/remove-index-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeIndexFromArray } from "./remove-index-from-array.ts"; bdd.describe("cool/fp/remove-index-from-array", () => { diff --git a/fp/remove-index-from-array.ts b/fp/remove-index-from-array.ts index 50c083c3..d461f08e 100644 --- a/fp/remove-index-from-array.ts +++ b/fp/remove-index-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeIndexFromArray = ( instance: Iterable, diff --git a/fp/remove-key-from-object.test.ts b/fp/remove-key-from-object.test.ts index 24ba7e4e..45548fa5 100644 --- a/fp/remove-key-from-object.test.ts +++ b/fp/remove-key-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeKeyFromObject } from "./remove-key-from-object.ts"; bdd.describe("cool/fp/remove-key-from-object", () => { diff --git a/fp/remove-key-from-object.ts b/fp/remove-key-from-object.ts index 6367f0a8..6c67486c 100644 --- a/fp/remove-key-from-object.ts +++ b/fp/remove-key-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeKeyFromObject = ( instance: Record, diff --git a/fp/remove-value-from-array.test.ts b/fp/remove-value-from-array.test.ts index ba07bb5b..86cd1064 100644 --- a/fp/remove-value-from-array.test.ts +++ b/fp/remove-value-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeValueFromArray } from "./remove-value-from-array.ts"; bdd.describe("cool/fp/remove-value-from-array", () => { diff --git a/fp/remove-value-from-array.ts b/fp/remove-value-from-array.ts index 603d9268..29424b81 100644 --- a/fp/remove-value-from-array.ts +++ b/fp/remove-value-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeValueFromArray = ( instance: Iterable, diff --git a/fp/remove-value-from-object.test.ts b/fp/remove-value-from-object.test.ts index 7fb76af9..976163c7 100644 --- a/fp/remove-value-from-object.test.ts +++ b/fp/remove-value-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { removeValueFromObject } from "./remove-value-from-object.ts"; bdd.describe("cool/fp/remove-value-from-object", () => { diff --git a/fp/remove-value-from-object.ts b/fp/remove-value-from-object.ts index 2f130c22..7e56bd4c 100644 --- a/fp/remove-value-from-object.ts +++ b/fp/remove-value-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const removeValueFromObject = ( instance: Record, diff --git a/fp/reverse-array.test.ts b/fp/reverse-array.test.ts index 2f89514a..c48a4d59 100644 --- a/fp/reverse-array.test.ts +++ b/fp/reverse-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { reverseArray } from "./reverse-array.ts"; bdd.describe("cool/fp/reverse-array", () => { diff --git a/fp/reverse-array.ts b/fp/reverse-array.ts index 4e1c3a3f..7c1e24c9 100644 --- a/fp/reverse-array.ts +++ b/fp/reverse-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const reverseArray = (instance: Iterable): Array => { const arrInstance = (instance.constructor === Array) diff --git a/fp/reverse-object.test.ts b/fp/reverse-object.test.ts index a8857e63..63d1747b 100644 --- a/fp/reverse-object.test.ts +++ b/fp/reverse-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { reverseObject } from "./reverse-object.ts"; bdd.describe("cool/fp/reverse-object", () => { diff --git a/fp/reverse-object.ts b/fp/reverse-object.ts index ac12a2d4..c8a3b118 100644 --- a/fp/reverse-object.ts +++ b/fp/reverse-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const reverseObject = ( instance: Record, diff --git a/fp/split-array.test.ts b/fp/split-array.test.ts index 6f9c70b5..75148a9b 100644 --- a/fp/split-array.test.ts +++ b/fp/split-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { splitArray } from "./split-array.ts"; bdd.describe("cool/fp/split-array", () => { diff --git a/fp/split-array.ts b/fp/split-array.ts index 777c619f..b09005c9 100644 --- a/fp/split-array.ts +++ b/fp/split-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type SplitArrayResult = { items: Array; rest: Array }; diff --git a/fp/split-object.test.ts b/fp/split-object.test.ts index b3735968..7b709882 100644 --- a/fp/split-object.test.ts +++ b/fp/split-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { splitObject } from "./split-object.ts"; bdd.describe("cool/fp/split-object", () => { diff --git a/fp/split-object.ts b/fp/split-object.ts index c66e5a3b..20fbe554 100644 --- a/fp/split-object.ts +++ b/fp/split-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type SplitObjectResult = { items: Record; diff --git a/fp/take-from-array.test.ts b/fp/take-from-array.test.ts index 5792cbc9..b6256cc1 100644 --- a/fp/take-from-array.test.ts +++ b/fp/take-from-array.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { takeFromArray } from "./take-from-array.ts"; bdd.describe("cool/fp/take-from-array", () => { diff --git a/fp/take-from-array.ts b/fp/take-from-array.ts index db1a5831..38eb3ab8 100644 --- a/fp/take-from-array.ts +++ b/fp/take-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const takeFromArray = ( instance: Iterable, diff --git a/fp/take-from-object.test.ts b/fp/take-from-object.test.ts index 2e592095..defbe804 100644 --- a/fp/take-from-object.test.ts +++ b/fp/take-from-object.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { takeFromObject } from "./take-from-object.ts"; bdd.describe("cool/fp/take-from-object", () => { diff --git a/fp/take-from-object.ts b/fp/take-from-object.ts index f6202a4f..f78f90cd 100644 --- a/fp/take-from-object.ts +++ b/fp/take-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const takeFromObject = ( instance: Record, diff --git a/fp/wth.bench.ts b/fp/wth.bench.ts index 3859518c..7c467f96 100644 --- a/fp/wth.bench.ts +++ b/fp/wth.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { wth } from "./wth.ts"; diff --git a/fp/wth.test.ts b/fp/wth.test.ts index 170b6c67..3095c869 100644 --- a/fp/wth.test.ts +++ b/fp/wth.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { wth } from "./wth.ts"; bdd.describe("cool/fp/wth", () => { diff --git a/fp/wth.ts b/fp/wth.ts index 90f67f03..a1642016 100644 --- a/fp/wth.ts +++ b/fp/wth.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const wth = ( instance: Record, diff --git a/fp/wthout.bench.ts b/fp/wthout.bench.ts index 3ddea0e6..e562d032 100644 --- a/fp/wthout.bench.ts +++ b/fp/wthout.bench.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as runtime from "../standards/runtime.ts"; import { wthout } from "./wthout.ts"; diff --git a/fp/wthout.test.ts b/fp/wthout.test.ts index 0c7cb9db..efdb3edb 100644 --- a/fp/wthout.test.ts +++ b/fp/wthout.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { wthout } from "./wthout.ts"; bdd.describe("cool/fp/wthout", () => { diff --git a/fp/wthout.ts b/fp/wthout.ts index eb8f9fa2..1eb60989 100644 --- a/fp/wthout.ts +++ b/fp/wthout.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. type Key = string | number | symbol; diff --git a/functions/deps-dev.ts b/functions/deps-dev.ts new file mode 100644 index 00000000..7565d578 --- /dev/null +++ b/functions/deps-dev.ts @@ -0,0 +1,5 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; +export * as mock from "https://deno.land/std@0.208.0/testing/mock.ts"; diff --git a/functions/fn.test.ts b/functions/fn.test.ts index a1960c39..ca8adc7e 100644 --- a/functions/fn.test.ts +++ b/functions/fn.test.ts @@ -1,8 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; -import * as mock from "$std/testing/mock.ts"; +import { assert, bdd, mock } from "./deps-dev.ts"; import { Ok, type Result } from "./results.ts"; import { fn } from "./fn.ts"; diff --git a/functions/fn.ts b/functions/fn.ts index e91ba379..0a6fb446 100644 --- a/functions/fn.ts +++ b/functions/fn.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type ArgList } from "../standards/functions.ts"; diff --git a/functions/mod.ts b/functions/mod.ts index ce797a31..37bf7889 100644 --- a/functions/mod.ts +++ b/functions/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./results.ts"; export * from "./fn.ts"; diff --git a/functions/results.ts b/functions/results.ts index 823e4755..268abd38 100644 --- a/functions/results.ts +++ b/functions/results.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // deno-lint-ignore no-explicit-any export type ExtraData = Record; diff --git a/jsx-runtime/mod.ts b/jsx-runtime/mod.ts index b48be9af..6892af8b 100644 --- a/jsx-runtime/mod.ts +++ b/jsx-runtime/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. MIT license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export { jsx, diff --git a/mod.ts b/mod.ts index ef08980e..2ec9dfbc 100644 --- a/mod.ts +++ b/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import metadata from "./metadata.json" assert { type: "json" }; diff --git a/parsing/deps-dev.ts b/parsing/deps-dev.ts new file mode 100644 index 00000000..50fe71ab --- /dev/null +++ b/parsing/deps-dev.ts @@ -0,0 +1,4 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as assert from "https://deno.land/std@0.208.0/assert/mod.ts"; +export * as bdd from "https://deno.land/std@0.208.0/testing/bdd.ts"; diff --git a/parsing/lexer/checks/is-alphanumeric.ts b/parsing/lexer/checks/is-alphanumeric.ts index 436c8095..689ca0da 100644 --- a/parsing/lexer/checks/is-alphanumeric.ts +++ b/parsing/lexer/checks/is-alphanumeric.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type PatternFunction } from "../tokens/definition.ts"; diff --git a/parsing/lexer/checks/is-numeric.ts b/parsing/lexer/checks/is-numeric.ts index dfddf290..c7c3903a 100644 --- a/parsing/lexer/checks/is-numeric.ts +++ b/parsing/lexer/checks/is-numeric.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type PatternFunction } from "../tokens/definition.ts"; diff --git a/parsing/lexer/checks/is-whitespace.ts b/parsing/lexer/checks/is-whitespace.ts index 7a6223c8..313b7afe 100644 --- a/parsing/lexer/checks/is-whitespace.ts +++ b/parsing/lexer/checks/is-whitespace.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type PatternFunction } from "../tokens/definition.ts"; diff --git a/parsing/lexer/lexer.test.ts b/parsing/lexer/lexer.test.ts index d520def2..19ba3476 100644 --- a/parsing/lexer/lexer.test.ts +++ b/parsing/lexer/lexer.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "../deps-dev.ts"; import { simpleTokens } from "./tokens/simple.ts"; import { Tokenizer } from "./lexer.ts"; diff --git a/parsing/lexer/lexer.ts b/parsing/lexer/lexer.ts index 292e9f86..373c9391 100644 --- a/parsing/lexer/lexer.ts +++ b/parsing/lexer/lexer.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type PatternFunction, diff --git a/parsing/lexer/mod.ts b/parsing/lexer/mod.ts index 6dea5195..a059e6b5 100644 --- a/parsing/lexer/mod.ts +++ b/parsing/lexer/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./lexer.ts"; export * from "./tokens/definition.ts"; diff --git a/parsing/lexer/tokens/definition.ts b/parsing/lexer/tokens/definition.ts index 3211d2eb..841387c2 100644 --- a/parsing/lexer/tokens/definition.ts +++ b/parsing/lexer/tokens/definition.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type PatternFunctionResult = [string | null, number, boolean]; export type PatternFunction = (input: string) => PatternFunctionResult; diff --git a/parsing/lexer/tokens/simple.ts b/parsing/lexer/tokens/simple.ts index 211d524f..86b6dded 100644 --- a/parsing/lexer/tokens/simple.ts +++ b/parsing/lexer/tokens/simple.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { isAlphanumeric } from "../checks/is-alphanumeric.ts"; import { isNumeric } from "../checks/is-numeric.ts"; diff --git a/parsing/mod.ts b/parsing/mod.ts index 57039d8f..866d2105 100644 --- a/parsing/mod.ts +++ b/parsing/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * from "./lexer/mod.ts"; export * from "./parser.ts"; diff --git a/parsing/parser.test.ts b/parsing/parser.test.ts index 21bb0619..257d0e01 100644 --- a/parsing/parser.test.ts +++ b/parsing/parser.test.ts @@ -1,7 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as assert from "$std/assert/mod.ts"; -import * as bdd from "$std/testing/bdd.ts"; +import { assert, bdd } from "./deps-dev.ts"; import { simpleTokens } from "./lexer/tokens/simple.ts"; import { Tokenizer } from "./lexer/lexer.ts"; import { sequence, token } from "./parser.ts"; diff --git a/parsing/parser.ts b/parsing/parser.ts index 9cd0b7db..558a3e72 100644 --- a/parsing/parser.ts +++ b/parsing/parser.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type Token } from "./lexer/lexer.ts"; diff --git a/parsing/rewindable.ts b/parsing/rewindable.ts index 3e4a65d3..5f7c95dc 100644 --- a/parsing/rewindable.ts +++ b/parsing/rewindable.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // deno-lint-ignore-file no-explicit-any export type RewindableIterator = diff --git a/pre-commit.ts b/pre-commit.ts index a736a1e9..2a20aaf2 100644 --- a/pre-commit.ts +++ b/pre-commit.ts @@ -1,6 +1,6 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. -import * as posix from "$std/path/posix/mod.ts"; +import { posix } from "./deps.ts"; import * as runtime from "./standards/runtime.ts"; import metadata from "./metadata.json" assert { type: "json" }; diff --git a/repl-init.ts b/repl-init.ts index af513b73..9bdc162b 100644 --- a/repl-init.ts +++ b/repl-init.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import * as dotenv from "./dotenv/mod.ts"; import * as runtime from "./standards/runtime.ts"; diff --git a/standards/deps.ts b/standards/deps.ts new file mode 100644 index 00000000..8835c388 --- /dev/null +++ b/standards/deps.ts @@ -0,0 +1,4 @@ +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. + +export * as JSONC from "https://deno.land/std@0.208.0/jsonc/mod.ts"; +export * as path from "https://deno.land/std@0.208.0/path/mod.ts"; diff --git a/standards/functions.ts b/standards/functions.ts index 14cde21d..24395108 100644 --- a/standards/functions.ts +++ b/standards/functions.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. // deno-lint-ignore no-explicit-any export type ArgList = ReadonlyArray; diff --git a/standards/logging.ts b/standards/logging.ts index 28ad6146..d3dfb0bb 100644 --- a/standards/logging.ts +++ b/standards/logging.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. import { type ArgList } from "./functions.ts"; diff --git a/standards/mod.ts b/standards/mod.ts index 07b97abf..d491e99c 100644 --- a/standards/mod.ts +++ b/standards/mod.ts @@ -1,3 +1,3 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export * as logging from "./logging.ts"; diff --git a/standards/patterns.ts b/standards/patterns.ts index dd29046a..e285e6fb 100644 --- a/standards/patterns.ts +++ b/standards/patterns.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export const JS_TEST_FILE_PATTERN = /\.test\.(?:[jt]sx?)$/; export const JS_FILE_PATTERN = /\.(?:[jt]sx?)$/; diff --git a/standards/promises.ts b/standards/promises.ts index be8ff46a..e9e3bcee 100644 --- a/standards/promises.ts +++ b/standards/promises.ts @@ -1,4 +1,4 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. export type Promisable = Promise | T; export type Generatable = AsyncGenerator | Generator; diff --git a/standards/runtime.ts b/standards/runtime.ts index 48763404..38542ed4 100644 --- a/standards/runtime.ts +++ b/standards/runtime.ts @@ -1,10 +1,9 @@ -// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license. /// /// -import * as JSONC from "$std/jsonc/mod.ts"; -import * as path from "$std/path/mod.ts"; +import { JSONC, path } from "./deps.ts"; if (globalThis.Deno === undefined) { throw new Error("Deno is not defined");