Skip to content

Commit

Permalink
fix(_tools): update check_deprecation path exclusion to recognize W…
Browse files Browse the repository at this point in the history
…indows directory separators (#4519)

fix(_tools): update check_deprecation path exclusion to recognize Windows directory separators
  • Loading branch information
jeremyBanks authored Mar 26, 2024
1 parent 8a7b5dd commit 260292c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
33 changes: 15 additions & 18 deletions _tools/check_deprecation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@ import { doc } from "deno_doc";
import { walk } from "../fs/walk.ts";
import { toFileUrl } from "../path/mod.ts";

const EXTENSIONS = [".mjs", ".js", ".ts"];
const EXCLUDED_PATHS = [
".git",
"dotenv/testdata",
"fs/testdata",
"http/testdata",
"http/_negotiation",
"crypto/_wasm",
"crypto/_fnv",
"encoding/_yaml",
"encoding/_toml",
"_tools",
"_util",
"docs",
];

const ROOT = new URL("../", import.meta.url);

const FAIL_FAST = Deno.args.includes("--fail-fast");
Expand Down Expand Up @@ -52,8 +36,21 @@ const DEPRECATION_IN_FORMAT =
for await (
const { path } of walk(ROOT, {
includeDirs: false,
exts: EXTENSIONS,
skip: EXCLUDED_PATHS.map((path) => new RegExp(path + "$")),
exts: [".mjs", ".js", ".ts"],
skip: [
/\.git$/,
/dotenv(\/|\\)testdata$/,
/fs(\/|\\)testdata$/,
/http(\/|\\)testdata$/,
/http(\/|\\)_negotiation$/,
/crypto(\/|\\)_benches$/,
/crypto(\/|\\)_wasm$/,
/encoding(\/|\\)_yaml$/,
/encoding(\/|\\)_toml$/,
/_tools$/,
/_util$/,
/docs$/,
],
})
) {
// deno_doc only takes urls.
Expand Down
2 changes: 1 addition & 1 deletion _tools/check_mod_exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for await (

for await (
const { path: filePath } of walk(dirname(modFilePath), {
exts: ["ts"],
exts: [".ts"],
includeDirs: false,
maxDepth: 1,
skip: [
Expand Down

0 comments on commit 260292c

Please sign in to comment.