Skip to content

Commit 5775e21

Browse files
authored
chore: use @kt3k/license-checker (#6565)
1 parent f50c42c commit 5775e21

File tree

4 files changed

+26
-74
lines changed

4 files changed

+26
-74
lines changed

.licenserc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"**/*.{mjs,js,ts,rs}": "Copyright 2018-2025 the Deno authors. MIT license.",
3+
"ignore": [
4+
"cli/testdata/",
5+
"cli\\testdata\\",
6+
"dotenv/testdata/",
7+
"dotenv\\testdata\\",
8+
"fs/testdata/",
9+
"fs\\testdata\\",
10+
"http/testdata/",
11+
"http\\testdata\\",
12+
"crypto/_wasm/target/",
13+
"crypto\\_wasm\\target\\",
14+
"crypto/_wasm/lib/",
15+
"crypto\\_wasm\\lib\\",
16+
".git",
17+
"docs/**",
18+
"docs\\**",
19+
"_tmp/",
20+
"_tmp\\"
21+
]
22+
}

_tools/check_browser_compat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* Run using: deno run --allow-read --allow-run _tools/check_browser_compat.ts
88
*/
9-
9+
import LICENSE_JSON from "../.licenserc.json" with { type: "json" };
1010
import { walk } from "../fs/walk.ts";
11-
import { COPYRIGHT } from "./check_licence.ts";
1211

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

1717
async function isBrowserCompatible(filePath: string): Promise<boolean> {
1818
return (await new Deno.Command(Deno.execPath(), {

_tools/check_licence.ts

Lines changed: 0 additions & 71 deletions
This file was deleted.

deno.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"test:with-unsafe-proto": "deno test --unstable-http --unstable-webgpu --unstable-fs --unstable-unsafe-proto --doc --allow-all --parallel --coverage --trace-leaks --clean",
1313
"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",
1414
"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",
15+
"fmt:licence-headers": " deno run --allow-read jsr:@kt3k/[email protected]/main --quiet",
16+
"lint:deprecations": "deno run --allow-read --allow-net --allow-env ./_tools/check_deprecation.ts",
1517
"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",
16-
"fmt:licence-headers": "deno run --allow-read --allow-write ./_tools/check_licence.ts",
1718
"lint:circular": "deno run --allow-env --allow-read --allow-write --allow-net=deno.land,jsr.io ./_tools/check_circular_package_dependencies.ts",
1819
"lint:mod-exports": "deno run --allow-env --allow-read ./_tools/check_mod_exports.ts",
1920
"lint:tools-types": "deno check _tools/*.ts",

0 commit comments

Comments
 (0)