Skip to content

chore: use @kt3k/license-checker #6565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"**/*.{mjs,js,ts,rs}": "Copyright 2018-2025 the Deno authors. MIT license.",
"ignore": [
"cli/testdata/",
"cli\\testdata\\",
"dotenv/testdata/",
"dotenv\\testdata\\",
"fs/testdata/",
"fs\\testdata\\",
"http/testdata/",
"http\\testdata\\",
"crypto/_wasm/target/",
"crypto\\_wasm\\target\\",
"crypto/_wasm/lib/",
"crypto\\_wasm\\lib\\",
".git",
"docs/**",
"docs\\**",
"_tmp/",
"_tmp\\"
]
}
4 changes: 2 additions & 2 deletions _tools/check_browser_compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*
* Run using: deno run --allow-read --allow-run _tools/check_browser_compat.ts
*/

import LICENSE_JSON from "../.licenserc.json" with { type: "json" };
import { walk } from "../fs/walk.ts";
import { COPYRIGHT } from "./check_licence.ts";

const ROOT = new URL("../", import.meta.url);
const SKIP = [/(test|bench|\/_|\\_|testdata|version.ts)/];
const DECLARATION = "// This module is browser compatible.";
const COPYRIGHT = `// ${LICENSE_JSON["**/*.{mjs,js,ts,rs}"]}`;

async function isBrowserCompatible(filePath: string): Promise<boolean> {
return (await new Deno.Command(Deno.execPath(), {
Expand Down
71 changes: 0 additions & 71 deletions _tools/check_licence.ts

This file was deleted.

3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"test:with-unsafe-proto": "deno test --unstable-http --unstable-webgpu --unstable-fs --unstable-unsafe-proto --doc --allow-all --parallel --coverage --trace-leaks --clean",
"test:browser": "git grep --name-only \"This module is browser compatible.\" | grep -v deno.json | grep -v .github/workflows | grep -v _tools | grep -v encoding/README.md | grep -v media_types/vendor/update.ts | xargs deno check --config browser-compat.tsconfig.json",
"test:node": "(cd _tools/node_test_runner && npm install) && node --import ./_tools/node_test_runner/register_deno_shim.mjs ./_tools/node_test_runner/run_test.mjs",
"fmt:licence-headers": " deno run --allow-read jsr:@kt3k/[email protected]/main --quiet",
"lint:deprecations": "deno run --allow-read --allow-net --allow-env ./_tools/check_deprecation.ts",
"test:bun": "(cd _tools/node_test_runner && bun install) && cp _tools/node_test_runner/tsconfig_for_bun.json ./tsconfig.json && bun test --require ./_tools/node_test_runner/register_deno_shim.mjs _tools/node_test_runner/run_test.mjs && rm tsconfig.json",
"fmt:licence-headers": "deno run --allow-read --allow-write ./_tools/check_licence.ts",
"lint:circular": "deno run --allow-env --allow-read --allow-write --allow-net=deno.land,jsr.io ./_tools/check_circular_package_dependencies.ts",
"lint:mod-exports": "deno run --allow-env --allow-read ./_tools/check_mod_exports.ts",
"lint:tools-types": "deno check _tools/*.ts",
Expand Down
Loading