Skip to content

Commit

Permalink
chore: deps.ts files back again.
Browse files Browse the repository at this point in the history
  • Loading branch information
eser committed Dec 12, 2023
1 parent 23bb9b2 commit 37f2033
Show file tree
Hide file tree
Showing 174 changed files with 1,368 additions and 294 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
10 changes: 5 additions & 5 deletions _etc/tasks/check-license.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// 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"];

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\/*$/,
Expand Down
3 changes: 3 additions & 0 deletions _etc/tasks/deps.ts
Original file line number Diff line number Diff line change
@@ -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";
2 changes: 1 addition & 1 deletion appserver/appserver.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion appserver/channel.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 3 additions & 0 deletions appserver/deps.ts
Original file line number Diff line number Diff line change
@@ -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";
2 changes: 1 addition & 1 deletion appserver/mod.ts
Original file line number Diff line number Diff line change
@@ -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";
2 changes: 1 addition & 1 deletion appserver/module.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions appserver/version-checker.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
11 changes: 8 additions & 3 deletions collector/collector.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 4 additions & 0 deletions collector/deps-dev.ts
Original file line number Diff line number Diff line change
@@ -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";
5 changes: 5 additions & 0 deletions collector/deps.ts
Original file line number Diff line number Diff line change
@@ -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";
8 changes: 7 additions & 1 deletion collector/formatter.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
11 changes: 8 additions & 3 deletions collector/manifest.test.ts
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
24 changes: 13 additions & 11 deletions collector/manifest.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -43,12 +45,12 @@ export function specifierToIdentifier(specifier: string, used: Set<string>) {
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 += "_";
}
Expand Down
2 changes: 1 addition & 1 deletion collector/mod.ts
Original file line number Diff line number Diff line change
@@ -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";
113 changes: 113 additions & 0 deletions collector/validator-identifier/char-codes.ts
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit 37f2033

Please sign in to comment.