ts-checker-rspack-plugin 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,10 +14,18 @@ const is_inside_another_path_1 = require("../utils/path/is-inside-another-path")
|
|
|
14
14
|
const BUILTIN_IGNORED_DIRS = ['.git'];
|
|
15
15
|
function createIsIgnored(ignored, excluded) {
|
|
16
16
|
const ignoredPatterns = ignored ? (Array.isArray(ignored) ? ignored : [ignored]) : [];
|
|
17
|
-
const filteredExcluded = excluded.filter((
|
|
17
|
+
const filteredExcluded = excluded.filter((pattern) => {
|
|
18
18
|
// Use `minimatch` to check if the path is a glob pattern.
|
|
19
|
-
if ((0, is_glob_1.default)(
|
|
20
|
-
|
|
19
|
+
if ((0, is_glob_1.default)(pattern)) {
|
|
20
|
+
// Append `/**` to the pattern to align minimatch's behavior
|
|
21
|
+
// with the `exclude` option in tsconfig.json.
|
|
22
|
+
const shouldAppendStar = pattern.includes('**') && !pattern.endsWith('*');
|
|
23
|
+
if (shouldAppendStar) {
|
|
24
|
+
ignoredPatterns.push(pattern.endsWith('/') ? `${pattern}**` : `${pattern}/**`);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
ignoredPatterns.push(pattern);
|
|
28
|
+
}
|
|
21
29
|
return false;
|
|
22
30
|
}
|
|
23
31
|
return true;
|