ts-checker-rspack-plugin 1.3.0 → 1.3.1
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.
- package/lib/files-change.d.ts +2 -1
- package/lib/files-match.d.ts +1 -1
- package/lib/formatter/code-frame-formatter.d.ts +3 -2
- package/lib/formatter/formatter-config.d.ts +2 -1
- package/lib/formatter/formatter-options.d.ts +1 -1
- package/lib/formatter/formatter.d.ts +1 -1
- package/lib/getDependenciesWorker.js +1 -1
- package/lib/getIssuesWorker.js +2 -2
- package/lib/index.js +403 -83
- package/lib/issue/issue-config.d.ts +2 -1
- package/lib/issue/issue-location.d.ts +2 -1
- package/lib/issue/issue-match.d.ts +2 -1
- package/lib/issue/issue-options.d.ts +1 -1
- package/lib/issue/issue-position.d.ts +2 -1
- package/lib/issue/issue-predicate.d.ts +2 -1
- package/lib/issue/issue.d.ts +2 -1
- package/lib/logger.d.ts +1 -1
- package/lib/plugin-config.d.ts +2 -1
- package/lib/plugin-hooks.d.ts +2 -1
- package/lib/plugin-options.d.ts +1 -1
- package/lib/plugin-state.d.ts +2 -1
- package/lib/plugin.d.ts +5 -5
- package/lib/rpc/index.d.ts +3 -2
- package/lib/rpc/rpc-worker.d.ts +2 -1
- package/lib/rpc/types.d.ts +1 -1
- package/lib/typescript/type-script-config-overwrite.d.ts +1 -1
- package/lib/typescript/type-script-diagnostics-options.d.ts +1 -1
- package/lib/typescript/type-script-worker-config.d.ts +2 -1
- package/lib/typescript/type-script-worker-options.d.ts +1 -1
- package/lib/utils/async/pool.d.ts +2 -1
- package/lib/watch/watch-file-system.d.ts +1 -1
- package/package.json +24 -24
package/lib/files-change.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ declare function clearFilesChange(compiler: rspack.Compiler): void;
|
|
|
14
14
|
* @returns Files change that represents all subsequent changes as a one event
|
|
15
15
|
*/
|
|
16
16
|
declare function aggregateFilesChanges(changes: FilesChange[]): FilesChange;
|
|
17
|
-
export {
|
|
17
|
+
export { getFilesChange, consumeFilesChange, updateFilesChange, clearFilesChange, aggregateFilesChanges, };
|
|
18
|
+
export type { FilesChange };
|
package/lib/files-match.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Formatter } from './formatter';
|
|
2
|
-
import { BabelCodeFrameOptions } from './types/babel__code-frame';
|
|
2
|
+
import type { BabelCodeFrameOptions } from './types/babel__code-frame';
|
|
3
3
|
declare function createCodeFrameFormatter(options?: BabelCodeFrameOptions): Formatter;
|
|
4
|
-
export { createCodeFrameFormatter
|
|
4
|
+
export { createCodeFrameFormatter };
|
|
5
|
+
export type { BabelCodeFrameOptions };
|
|
@@ -5,4 +5,5 @@ type FormatterConfig = {
|
|
|
5
5
|
pathType: FormatterPathType;
|
|
6
6
|
};
|
|
7
7
|
declare function createFormatterConfig(options: FormatterOptions | undefined): FormatterConfig;
|
|
8
|
-
export {
|
|
8
|
+
export { createFormatterConfig };
|
|
9
|
+
export type { FormatterConfig };
|
|
@@ -11,4 +11,4 @@ type CodeframeFormatterOptions = {
|
|
|
11
11
|
options?: BabelCodeFrameOptions;
|
|
12
12
|
};
|
|
13
13
|
type FormatterOptions = undefined | FormatterType | BasicFormatterOptions | CodeframeFormatterOptions | Formatter;
|
|
14
|
-
export { FormatterOptions, FormatterType, BasicFormatterOptions, CodeframeFormatterOptions };
|
|
14
|
+
export type { FormatterOptions, FormatterType, BasicFormatterOptions, CodeframeFormatterOptions, };
|
|
@@ -485,7 +485,7 @@ function normalizeAndResolvePath(path) {
|
|
|
485
485
|
let normalizedPath = realFileSystem.normalizePath(path);
|
|
486
486
|
try {
|
|
487
487
|
normalizedPath = realFileSystem.realPath(normalizedPath);
|
|
488
|
-
} catch
|
|
488
|
+
} catch {}
|
|
489
489
|
return normalizedPath;
|
|
490
490
|
}
|
|
491
491
|
function isArtifact(path) {
|
package/lib/getIssuesWorker.js
CHANGED
|
@@ -600,7 +600,7 @@ function normalizeAndResolvePath(path) {
|
|
|
600
600
|
let normalizedPath = realFileSystem.normalizePath(path);
|
|
601
601
|
try {
|
|
602
602
|
normalizedPath = realFileSystem.realPath(normalizedPath);
|
|
603
|
-
} catch
|
|
603
|
+
} catch {}
|
|
604
604
|
return normalizedPath;
|
|
605
605
|
}
|
|
606
606
|
function isArtifact(path) {
|
|
@@ -756,7 +756,7 @@ function invalidateTsBuildInfo() {
|
|
|
756
756
|
const tsBuildInfoPath = typescript.getTsBuildInfoEmitOutputFilePath(parsedConfig.options);
|
|
757
757
|
if (tsBuildInfoPath) try {
|
|
758
758
|
system.deleteFile(tsBuildInfoPath);
|
|
759
|
-
} catch
|
|
759
|
+
} catch {}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
function emitTsBuildInfoIfNeeded(builderProgram) {
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*! LICENSE: index.js.LICENSE.txt */
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
3
|
"./node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js" (module) {
|
|
4
4
|
/*!
|
|
@@ -305,7 +305,7 @@ var __webpack_modules__ = {
|
|
|
305
305
|
if (shouldHighlight) return defs.reset(frame);
|
|
306
306
|
return frame;
|
|
307
307
|
}
|
|
308
|
-
exports1.
|
|
308
|
+
exports1.gl = codeFrameColumns;
|
|
309
309
|
},
|
|
310
310
|
"./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js" (__unused_rspack_module, exports1) {
|
|
311
311
|
"use strict";
|
|
@@ -1619,7 +1619,7 @@ var __webpack_exports__ = {};
|
|
|
1619
1619
|
const openPattern = /\\{/g;
|
|
1620
1620
|
const closePattern = /\\}/g;
|
|
1621
1621
|
const commaPattern = /\\,/g;
|
|
1622
|
-
const periodPattern =
|
|
1622
|
+
const periodPattern = /\\\./g;
|
|
1623
1623
|
const EXPANSION_MAX = 100000;
|
|
1624
1624
|
function numeric(str) {
|
|
1625
1625
|
return isNaN(str) ? str.charCodeAt(0) : parseInt(str, 10);
|
|
@@ -1708,7 +1708,7 @@ var __webpack_exports__ = {};
|
|
|
1708
1708
|
const x = numeric(n[0]);
|
|
1709
1709
|
const y = numeric(n[1]);
|
|
1710
1710
|
const width = Math.max(n[0].length, n[1].length);
|
|
1711
|
-
let incr = 3 === n.length && void 0 !== n[2] ? Math.abs(numeric(n[2])) : 1;
|
|
1711
|
+
let incr = 3 === n.length && void 0 !== n[2] ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
1712
1712
|
let test = lte;
|
|
1713
1713
|
const reverse = y < x;
|
|
1714
1714
|
if (reverse) {
|
|
@@ -1911,9 +1911,10 @@ var __webpack_exports__ = {};
|
|
|
1911
1911
|
];
|
|
1912
1912
|
};
|
|
1913
1913
|
const unescape_unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {})=>{
|
|
1914
|
-
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([
|
|
1915
|
-
return windowsPathsNoEscape ? s.replace(/\[([
|
|
1914
|
+
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, '$1') : s.replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2').replace(/\\([^/])/g, '$1');
|
|
1915
|
+
return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, '$1') : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2').replace(/\\([^/{}])/g, '$1');
|
|
1916
1916
|
};
|
|
1917
|
+
var _a;
|
|
1917
1918
|
const types = new Set([
|
|
1918
1919
|
'!',
|
|
1919
1920
|
'?',
|
|
@@ -1922,6 +1923,168 @@ var __webpack_exports__ = {};
|
|
|
1922
1923
|
'@'
|
|
1923
1924
|
]);
|
|
1924
1925
|
const isExtglobType = (c)=>types.has(c);
|
|
1926
|
+
const isExtglobAST = (c)=>isExtglobType(c.type);
|
|
1927
|
+
const adoptionMap = new Map([
|
|
1928
|
+
[
|
|
1929
|
+
'!',
|
|
1930
|
+
[
|
|
1931
|
+
'@'
|
|
1932
|
+
]
|
|
1933
|
+
],
|
|
1934
|
+
[
|
|
1935
|
+
'?',
|
|
1936
|
+
[
|
|
1937
|
+
'?',
|
|
1938
|
+
'@'
|
|
1939
|
+
]
|
|
1940
|
+
],
|
|
1941
|
+
[
|
|
1942
|
+
'@',
|
|
1943
|
+
[
|
|
1944
|
+
'@'
|
|
1945
|
+
]
|
|
1946
|
+
],
|
|
1947
|
+
[
|
|
1948
|
+
'*',
|
|
1949
|
+
[
|
|
1950
|
+
'*',
|
|
1951
|
+
'+',
|
|
1952
|
+
'?',
|
|
1953
|
+
'@'
|
|
1954
|
+
]
|
|
1955
|
+
],
|
|
1956
|
+
[
|
|
1957
|
+
'+',
|
|
1958
|
+
[
|
|
1959
|
+
'+',
|
|
1960
|
+
'@'
|
|
1961
|
+
]
|
|
1962
|
+
]
|
|
1963
|
+
]);
|
|
1964
|
+
const adoptionWithSpaceMap = new Map([
|
|
1965
|
+
[
|
|
1966
|
+
'!',
|
|
1967
|
+
[
|
|
1968
|
+
'?'
|
|
1969
|
+
]
|
|
1970
|
+
],
|
|
1971
|
+
[
|
|
1972
|
+
'@',
|
|
1973
|
+
[
|
|
1974
|
+
'?'
|
|
1975
|
+
]
|
|
1976
|
+
],
|
|
1977
|
+
[
|
|
1978
|
+
'+',
|
|
1979
|
+
[
|
|
1980
|
+
'?',
|
|
1981
|
+
'*'
|
|
1982
|
+
]
|
|
1983
|
+
]
|
|
1984
|
+
]);
|
|
1985
|
+
const adoptionAnyMap = new Map([
|
|
1986
|
+
[
|
|
1987
|
+
'!',
|
|
1988
|
+
[
|
|
1989
|
+
'?',
|
|
1990
|
+
'@'
|
|
1991
|
+
]
|
|
1992
|
+
],
|
|
1993
|
+
[
|
|
1994
|
+
'?',
|
|
1995
|
+
[
|
|
1996
|
+
'?',
|
|
1997
|
+
'@'
|
|
1998
|
+
]
|
|
1999
|
+
],
|
|
2000
|
+
[
|
|
2001
|
+
'@',
|
|
2002
|
+
[
|
|
2003
|
+
'?',
|
|
2004
|
+
'@'
|
|
2005
|
+
]
|
|
2006
|
+
],
|
|
2007
|
+
[
|
|
2008
|
+
'*',
|
|
2009
|
+
[
|
|
2010
|
+
'*',
|
|
2011
|
+
'+',
|
|
2012
|
+
'?',
|
|
2013
|
+
'@'
|
|
2014
|
+
]
|
|
2015
|
+
],
|
|
2016
|
+
[
|
|
2017
|
+
'+',
|
|
2018
|
+
[
|
|
2019
|
+
'+',
|
|
2020
|
+
'@',
|
|
2021
|
+
'?',
|
|
2022
|
+
'*'
|
|
2023
|
+
]
|
|
2024
|
+
]
|
|
2025
|
+
]);
|
|
2026
|
+
const usurpMap = new Map([
|
|
2027
|
+
[
|
|
2028
|
+
'!',
|
|
2029
|
+
new Map([
|
|
2030
|
+
[
|
|
2031
|
+
'!',
|
|
2032
|
+
'@'
|
|
2033
|
+
]
|
|
2034
|
+
])
|
|
2035
|
+
],
|
|
2036
|
+
[
|
|
2037
|
+
'?',
|
|
2038
|
+
new Map([
|
|
2039
|
+
[
|
|
2040
|
+
'*',
|
|
2041
|
+
'*'
|
|
2042
|
+
],
|
|
2043
|
+
[
|
|
2044
|
+
'+',
|
|
2045
|
+
'*'
|
|
2046
|
+
]
|
|
2047
|
+
])
|
|
2048
|
+
],
|
|
2049
|
+
[
|
|
2050
|
+
'@',
|
|
2051
|
+
new Map([
|
|
2052
|
+
[
|
|
2053
|
+
'!',
|
|
2054
|
+
'!'
|
|
2055
|
+
],
|
|
2056
|
+
[
|
|
2057
|
+
'?',
|
|
2058
|
+
'?'
|
|
2059
|
+
],
|
|
2060
|
+
[
|
|
2061
|
+
'@',
|
|
2062
|
+
'@'
|
|
2063
|
+
],
|
|
2064
|
+
[
|
|
2065
|
+
'*',
|
|
2066
|
+
'*'
|
|
2067
|
+
],
|
|
2068
|
+
[
|
|
2069
|
+
'+',
|
|
2070
|
+
'+'
|
|
2071
|
+
]
|
|
2072
|
+
])
|
|
2073
|
+
],
|
|
2074
|
+
[
|
|
2075
|
+
'+',
|
|
2076
|
+
new Map([
|
|
2077
|
+
[
|
|
2078
|
+
'?',
|
|
2079
|
+
'*'
|
|
2080
|
+
],
|
|
2081
|
+
[
|
|
2082
|
+
'*',
|
|
2083
|
+
'*'
|
|
2084
|
+
]
|
|
2085
|
+
])
|
|
2086
|
+
]
|
|
2087
|
+
]);
|
|
1925
2088
|
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
|
|
1926
2089
|
const startNoDot = '(?!\\.)';
|
|
1927
2090
|
const addPatternStart = new Set([
|
|
@@ -1937,6 +2100,7 @@ var __webpack_exports__ = {};
|
|
|
1937
2100
|
const qmark = '[^/]';
|
|
1938
2101
|
const star = qmark + '*?';
|
|
1939
2102
|
const starNoEmpty = qmark + '+?';
|
|
2103
|
+
let ID = 0;
|
|
1940
2104
|
class ast_AST {
|
|
1941
2105
|
type;
|
|
1942
2106
|
#root;
|
|
@@ -1950,6 +2114,22 @@ var __webpack_exports__ = {};
|
|
|
1950
2114
|
#options;
|
|
1951
2115
|
#toString;
|
|
1952
2116
|
#emptyExt = false;
|
|
2117
|
+
id = ++ID;
|
|
2118
|
+
get depth() {
|
|
2119
|
+
return (this.#parent?.depth ?? -1) + 1;
|
|
2120
|
+
}
|
|
2121
|
+
[Symbol.for('nodejs.util.inspect.custom')]() {
|
|
2122
|
+
return {
|
|
2123
|
+
'@@type': 'AST',
|
|
2124
|
+
id: this.id,
|
|
2125
|
+
type: this.type,
|
|
2126
|
+
root: this.#root.id,
|
|
2127
|
+
parent: this.#parent?.id,
|
|
2128
|
+
depth: this.depth,
|
|
2129
|
+
partsLength: this.#parts.length,
|
|
2130
|
+
parts: this.#parts
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
1953
2133
|
constructor(type, parent, options = {}){
|
|
1954
2134
|
this.type = type;
|
|
1955
2135
|
if (type) this.#hasMagic = true;
|
|
@@ -1968,9 +2148,7 @@ var __webpack_exports__ = {};
|
|
|
1968
2148
|
return this.#hasMagic;
|
|
1969
2149
|
}
|
|
1970
2150
|
toString() {
|
|
1971
|
-
|
|
1972
|
-
if (!this.type) return this.#toString = this.#parts.map((p)=>String(p)).join('');
|
|
1973
|
-
return this.#toString = this.type + '(' + this.#parts.map((p)=>String(p)).join('|') + ')';
|
|
2151
|
+
return void 0 !== this.#toString ? this.#toString : this.type ? this.#toString = this.type + '(' + this.#parts.map((p)=>String(p)).join('|') + ')' : this.#toString = this.#parts.map((p)=>String(p)).join('');
|
|
1974
2152
|
}
|
|
1975
2153
|
#fillNegs() {
|
|
1976
2154
|
if (this !== this.#root) throw new Error('should only call on root');
|
|
@@ -1995,7 +2173,7 @@ var __webpack_exports__ = {};
|
|
|
1995
2173
|
}
|
|
1996
2174
|
push(...parts) {
|
|
1997
2175
|
for (const p of parts)if ('' !== p) {
|
|
1998
|
-
if ('string' != typeof p && !(p instanceof
|
|
2176
|
+
if ('string' != typeof p && !(p instanceof _a && p.#parent === this)) throw new Error('invalid part: ' + p);
|
|
1999
2177
|
this.#parts.push(p);
|
|
2000
2178
|
}
|
|
2001
2179
|
}
|
|
@@ -2015,7 +2193,7 @@ var __webpack_exports__ = {};
|
|
|
2015
2193
|
const p = this.#parent;
|
|
2016
2194
|
for(let i = 0; i < this.#parentIndex; i++){
|
|
2017
2195
|
const pp = p.#parts[i];
|
|
2018
|
-
if (!(pp instanceof
|
|
2196
|
+
if (!(pp instanceof _a && '!' === pp.type)) return false;
|
|
2019
2197
|
}
|
|
2020
2198
|
return true;
|
|
2021
2199
|
}
|
|
@@ -2032,11 +2210,12 @@ var __webpack_exports__ = {};
|
|
|
2032
2210
|
else this.push(part.clone(this));
|
|
2033
2211
|
}
|
|
2034
2212
|
clone(parent) {
|
|
2035
|
-
const c = new
|
|
2213
|
+
const c = new _a(this.type, parent);
|
|
2036
2214
|
for (const p of this.#parts)c.copyIn(p);
|
|
2037
2215
|
return c;
|
|
2038
2216
|
}
|
|
2039
|
-
static #parseAST(str, ast, pos, opt) {
|
|
2217
|
+
static #parseAST(str, ast, pos, opt, extDepth) {
|
|
2218
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
2040
2219
|
let escaping = false;
|
|
2041
2220
|
let inBrace = false;
|
|
2042
2221
|
let braceStart = -1;
|
|
@@ -2065,11 +2244,12 @@ var __webpack_exports__ = {};
|
|
|
2065
2244
|
acc += c;
|
|
2066
2245
|
continue;
|
|
2067
2246
|
}
|
|
2068
|
-
|
|
2247
|
+
const doRecurse = !opt.noext && isExtglobType(c) && '(' === str.charAt(i) && extDepth <= maxDepth;
|
|
2248
|
+
if (doRecurse) {
|
|
2069
2249
|
ast.push(acc);
|
|
2070
2250
|
acc = '';
|
|
2071
|
-
const ext = new
|
|
2072
|
-
i =
|
|
2251
|
+
const ext = new _a(c, ast);
|
|
2252
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + 1);
|
|
2073
2253
|
ast.push(ext);
|
|
2074
2254
|
continue;
|
|
2075
2255
|
}
|
|
@@ -2079,7 +2259,7 @@ var __webpack_exports__ = {};
|
|
|
2079
2259
|
return i;
|
|
2080
2260
|
}
|
|
2081
2261
|
let i = pos + 1;
|
|
2082
|
-
let part = new
|
|
2262
|
+
let part = new _a(null, ast);
|
|
2083
2263
|
const parts = [];
|
|
2084
2264
|
let acc = '';
|
|
2085
2265
|
while(i < str.length){
|
|
@@ -2103,19 +2283,21 @@ var __webpack_exports__ = {};
|
|
|
2103
2283
|
acc += c;
|
|
2104
2284
|
continue;
|
|
2105
2285
|
}
|
|
2106
|
-
|
|
2286
|
+
const doRecurse = !opt.noext && isExtglobType(c) && '(' === str.charAt(i) && (extDepth <= maxDepth || ast && ast.#canAdoptType(c));
|
|
2287
|
+
if (doRecurse) {
|
|
2288
|
+
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
2107
2289
|
part.push(acc);
|
|
2108
2290
|
acc = '';
|
|
2109
|
-
const ext = new
|
|
2291
|
+
const ext = new _a(c, part);
|
|
2110
2292
|
part.push(ext);
|
|
2111
|
-
i =
|
|
2293
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
|
|
2112
2294
|
continue;
|
|
2113
2295
|
}
|
|
2114
2296
|
if ('|' === c) {
|
|
2115
2297
|
part.push(acc);
|
|
2116
2298
|
acc = '';
|
|
2117
2299
|
parts.push(part);
|
|
2118
|
-
part = new
|
|
2300
|
+
part = new _a(null, ast);
|
|
2119
2301
|
continue;
|
|
2120
2302
|
}
|
|
2121
2303
|
if (')' === c) {
|
|
@@ -2134,9 +2316,55 @@ var __webpack_exports__ = {};
|
|
|
2134
2316
|
];
|
|
2135
2317
|
return i;
|
|
2136
2318
|
}
|
|
2319
|
+
#canAdoptWithSpace(child) {
|
|
2320
|
+
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
2321
|
+
}
|
|
2322
|
+
#canAdopt(child, map = adoptionMap) {
|
|
2323
|
+
if (!child || 'object' != typeof child || null !== child.type || 1 !== child.#parts.length || null === this.type) return false;
|
|
2324
|
+
const gc = child.#parts[0];
|
|
2325
|
+
if (!gc || 'object' != typeof gc || null === gc.type) return false;
|
|
2326
|
+
return this.#canAdoptType(gc.type, map);
|
|
2327
|
+
}
|
|
2328
|
+
#canAdoptType(c, map = adoptionAnyMap) {
|
|
2329
|
+
return !!map.get(this.type)?.includes(c);
|
|
2330
|
+
}
|
|
2331
|
+
#adoptWithSpace(child, index) {
|
|
2332
|
+
const gc = child.#parts[0];
|
|
2333
|
+
const blank = new _a(null, gc, this.options);
|
|
2334
|
+
blank.#parts.push('');
|
|
2335
|
+
gc.push(blank);
|
|
2336
|
+
this.#adopt(child, index);
|
|
2337
|
+
}
|
|
2338
|
+
#adopt(child, index) {
|
|
2339
|
+
const gc = child.#parts[0];
|
|
2340
|
+
this.#parts.splice(index, 1, ...gc.#parts);
|
|
2341
|
+
for (const p of gc.#parts)if ('object' == typeof p) p.#parent = this;
|
|
2342
|
+
this.#toString = void 0;
|
|
2343
|
+
}
|
|
2344
|
+
#canUsurpType(c) {
|
|
2345
|
+
const m = usurpMap.get(this.type);
|
|
2346
|
+
return !!m?.has(c);
|
|
2347
|
+
}
|
|
2348
|
+
#canUsurp(child) {
|
|
2349
|
+
if (!child || 'object' != typeof child || null !== child.type || 1 !== child.#parts.length || null === this.type || 1 !== this.#parts.length) return false;
|
|
2350
|
+
const gc = child.#parts[0];
|
|
2351
|
+
if (!gc || 'object' != typeof gc || null === gc.type) return false;
|
|
2352
|
+
return this.#canUsurpType(gc.type);
|
|
2353
|
+
}
|
|
2354
|
+
#usurp(child) {
|
|
2355
|
+
const m = usurpMap.get(this.type);
|
|
2356
|
+
const gc = child.#parts[0];
|
|
2357
|
+
const nt = m?.get(gc.type);
|
|
2358
|
+
if (!nt) return false;
|
|
2359
|
+
this.#parts = gc.#parts;
|
|
2360
|
+
for (const p of this.#parts)if ('object' == typeof p) p.#parent = this;
|
|
2361
|
+
this.type = nt;
|
|
2362
|
+
this.#toString = void 0;
|
|
2363
|
+
this.#emptyExt = false;
|
|
2364
|
+
}
|
|
2137
2365
|
static fromGlob(pattern, options = {}) {
|
|
2138
|
-
const ast = new
|
|
2139
|
-
|
|
2366
|
+
const ast = new _a(null, void 0, options);
|
|
2367
|
+
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
2140
2368
|
return ast;
|
|
2141
2369
|
}
|
|
2142
2370
|
toMMPattern() {
|
|
@@ -2156,11 +2384,14 @@ var __webpack_exports__ = {};
|
|
|
2156
2384
|
}
|
|
2157
2385
|
toRegExpSource(allowDot) {
|
|
2158
2386
|
const dot = allowDot ?? !!this.#options.dot;
|
|
2159
|
-
if (this.#root === this)
|
|
2160
|
-
|
|
2387
|
+
if (this.#root === this) {
|
|
2388
|
+
this.#flatten();
|
|
2389
|
+
this.#fillNegs();
|
|
2390
|
+
}
|
|
2391
|
+
if (!isExtglobAST(this)) {
|
|
2161
2392
|
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s)=>'string' != typeof s);
|
|
2162
2393
|
const src = this.#parts.map((p)=>{
|
|
2163
|
-
const [re, _, hasMagic, uflag] = 'string' == typeof p ?
|
|
2394
|
+
const [re, _, hasMagic, uflag] = 'string' == typeof p ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
2164
2395
|
this.#hasMagic = this.#hasMagic || hasMagic;
|
|
2165
2396
|
this.#uflag = this.#uflag || uflag;
|
|
2166
2397
|
return re;
|
|
@@ -2192,11 +2423,12 @@ var __webpack_exports__ = {};
|
|
|
2192
2423
|
let body = this.#partsToRegExp(dot);
|
|
2193
2424
|
if (this.isStart() && this.isEnd() && !body && '!' !== this.type) {
|
|
2194
2425
|
const s = this.toString();
|
|
2195
|
-
|
|
2426
|
+
const me = this;
|
|
2427
|
+
me.#parts = [
|
|
2196
2428
|
s
|
|
2197
2429
|
];
|
|
2198
|
-
|
|
2199
|
-
|
|
2430
|
+
me.type = null;
|
|
2431
|
+
me.#hasMagic = void 0;
|
|
2200
2432
|
return [
|
|
2201
2433
|
s,
|
|
2202
2434
|
unescape_unescape(this.toString()),
|
|
@@ -2220,6 +2452,32 @@ var __webpack_exports__ = {};
|
|
|
2220
2452
|
this.#uflag
|
|
2221
2453
|
];
|
|
2222
2454
|
}
|
|
2455
|
+
#flatten() {
|
|
2456
|
+
if (isExtglobAST(this)) {
|
|
2457
|
+
let iterations = 0;
|
|
2458
|
+
let done = false;
|
|
2459
|
+
do {
|
|
2460
|
+
done = true;
|
|
2461
|
+
for(let i = 0; i < this.#parts.length; i++){
|
|
2462
|
+
const c = this.#parts[i];
|
|
2463
|
+
if ('object' == typeof c) {
|
|
2464
|
+
c.#flatten();
|
|
2465
|
+
if (this.#canAdopt(c)) {
|
|
2466
|
+
done = false;
|
|
2467
|
+
this.#adopt(c, i);
|
|
2468
|
+
} else if (this.#canAdoptWithSpace(c)) {
|
|
2469
|
+
done = false;
|
|
2470
|
+
this.#adoptWithSpace(c, i);
|
|
2471
|
+
} else if (this.#canUsurp(c)) {
|
|
2472
|
+
done = false;
|
|
2473
|
+
this.#usurp(c);
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}while (!done && ++iterations < 10);
|
|
2478
|
+
} else for (const p of this.#parts)if ('object' == typeof p) p.#flatten();
|
|
2479
|
+
this.#toString = void 0;
|
|
2480
|
+
}
|
|
2223
2481
|
#partsToRegExp(dot) {
|
|
2224
2482
|
return this.#parts.map((p)=>{
|
|
2225
2483
|
if ('string' == typeof p) throw new Error('string type in extglob ast??');
|
|
@@ -2278,6 +2536,7 @@ var __webpack_exports__ = {};
|
|
|
2278
2536
|
];
|
|
2279
2537
|
}
|
|
2280
2538
|
}
|
|
2539
|
+
_a = ast_AST;
|
|
2281
2540
|
const escape_escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {})=>{
|
|
2282
2541
|
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&');
|
|
2283
2542
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&');
|
|
@@ -2287,7 +2546,7 @@ var __webpack_exports__ = {};
|
|
|
2287
2546
|
if (!options.nocomment && '#' === pattern.charAt(0)) return false;
|
|
2288
2547
|
return new esm_Minimatch(pattern, options).match(p);
|
|
2289
2548
|
};
|
|
2290
|
-
const starDotExtRE = /^\*+([
|
|
2549
|
+
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
2291
2550
|
const starDotExtTest = (ext)=>(f)=>!f.startsWith('.') && f.endsWith(ext);
|
|
2292
2551
|
const starDotExtTestDot = (ext)=>(f)=>f.endsWith(ext);
|
|
2293
2552
|
const starDotExtTestNocase = (ext)=>{
|
|
@@ -2306,7 +2565,7 @@ var __webpack_exports__ = {};
|
|
|
2306
2565
|
const starRE = /^\*+$/;
|
|
2307
2566
|
const starTest = (f)=>0 !== f.length && !f.startsWith('.');
|
|
2308
2567
|
const starTestDot = (f)=>0 !== f.length && '.' !== f && '..' !== f;
|
|
2309
|
-
const qmarksRE = /^\?+([
|
|
2568
|
+
const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
|
|
2310
2569
|
const qmarksTestNocase = ([$0, ext = ''])=>{
|
|
2311
2570
|
const noext = qmarksTestNoExt([
|
|
2312
2571
|
$0
|
|
@@ -2434,11 +2693,13 @@ var __webpack_exports__ = {};
|
|
|
2434
2693
|
isWindows;
|
|
2435
2694
|
platform;
|
|
2436
2695
|
windowsNoMagicRoot;
|
|
2696
|
+
maxGlobstarRecursion;
|
|
2437
2697
|
regexp;
|
|
2438
2698
|
constructor(pattern, options = {}){
|
|
2439
2699
|
assertValidPattern(pattern);
|
|
2440
2700
|
options = options || {};
|
|
2441
2701
|
this.options = options;
|
|
2702
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
|
|
2442
2703
|
this.pattern = pattern;
|
|
2443
2704
|
this.platform = options.platform || defaultPlatform;
|
|
2444
2705
|
this.isWindows = 'win32' === this.platform;
|
|
@@ -2510,7 +2771,7 @@ var __webpack_exports__ = {};
|
|
|
2510
2771
|
}
|
|
2511
2772
|
preprocess(globParts) {
|
|
2512
2773
|
if (this.options.noglobstar) {
|
|
2513
|
-
for(
|
|
2774
|
+
for (const partset of globParts)for(let j = 0; j < partset.length; j++)if ('**' === partset[j]) partset[j] = '*';
|
|
2514
2775
|
}
|
|
2515
2776
|
const { optimizationLevel = 1 } = this.options;
|
|
2516
2777
|
if (optimizationLevel >= 2) {
|
|
@@ -2573,7 +2834,7 @@ var __webpack_exports__ = {};
|
|
|
2573
2834
|
let dd = 0;
|
|
2574
2835
|
while(-1 !== (dd = parts.indexOf('..', dd + 1))){
|
|
2575
2836
|
const p = parts[dd - 1];
|
|
2576
|
-
if (p && '.' !== p && '..' !== p && '**' !== p) {
|
|
2837
|
+
if (p && '.' !== p && '..' !== p && '**' !== p && !(this.isWindows && /^[a-z]:$/i.test(p))) {
|
|
2577
2838
|
didSomething = true;
|
|
2578
2839
|
parts.splice(dd - 1, 2);
|
|
2579
2840
|
dd -= 2;
|
|
@@ -2695,7 +2956,8 @@ var __webpack_exports__ = {};
|
|
|
2695
2956
|
this.negate = negate;
|
|
2696
2957
|
}
|
|
2697
2958
|
matchOne(file, pattern, partial = false) {
|
|
2698
|
-
|
|
2959
|
+
let fileStartIndex = 0;
|
|
2960
|
+
let patternStartIndex = 0;
|
|
2699
2961
|
if (this.isWindows) {
|
|
2700
2962
|
const fileDrive = 'string' == typeof file[0] && /^[a-z]:$/i.test(file[0]);
|
|
2701
2963
|
const fileUNC = !fileDrive && '' === file[0] && '' === file[1] && '?' === file[2] && /^[a-z]:$/i.test(file[3]);
|
|
@@ -2710,57 +2972,116 @@ var __webpack_exports__ = {};
|
|
|
2710
2972
|
];
|
|
2711
2973
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
2712
2974
|
pattern[pdi] = fd;
|
|
2713
|
-
|
|
2714
|
-
|
|
2975
|
+
patternStartIndex = pdi;
|
|
2976
|
+
fileStartIndex = fdi;
|
|
2715
2977
|
}
|
|
2716
2978
|
}
|
|
2717
2979
|
}
|
|
2718
2980
|
const { optimizationLevel = 1 } = this.options;
|
|
2719
2981
|
if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2982
|
+
if (pattern.includes(GLOBSTAR)) return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
2983
|
+
return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
2984
|
+
}
|
|
2985
|
+
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
2986
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
2987
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
2988
|
+
const [head, body, tail] = partial ? [
|
|
2989
|
+
pattern.slice(patternIndex, firstgs),
|
|
2990
|
+
pattern.slice(firstgs + 1),
|
|
2991
|
+
[]
|
|
2992
|
+
] : [
|
|
2993
|
+
pattern.slice(patternIndex, firstgs),
|
|
2994
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
2995
|
+
pattern.slice(lastgs + 1)
|
|
2996
|
+
];
|
|
2997
|
+
if (head.length) {
|
|
2998
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
2999
|
+
if (!this.#matchOne(fileHead, head, partial, 0, 0)) return false;
|
|
3000
|
+
fileIndex += head.length;
|
|
3001
|
+
patternIndex += head.length;
|
|
3002
|
+
}
|
|
3003
|
+
let fileTailMatch = 0;
|
|
3004
|
+
if (tail.length) {
|
|
3005
|
+
if (tail.length + fileIndex > file.length) return false;
|
|
3006
|
+
let tailStart = file.length - tail.length;
|
|
3007
|
+
if (this.#matchOne(file, tail, partial, tailStart, 0)) fileTailMatch = tail.length;
|
|
3008
|
+
else {
|
|
3009
|
+
if ('' !== file[file.length - 1] || fileIndex + tail.length === file.length) return false;
|
|
3010
|
+
tailStart--;
|
|
3011
|
+
if (!this.#matchOne(file, tail, partial, tailStart, 0)) return false;
|
|
3012
|
+
fileTailMatch = tail.length + 1;
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
if (!body.length) {
|
|
3016
|
+
let sawSome = !!fileTailMatch;
|
|
3017
|
+
for(let i = fileIndex; i < file.length - fileTailMatch; i++){
|
|
3018
|
+
const f = String(file[i]);
|
|
3019
|
+
sawSome = true;
|
|
3020
|
+
if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
|
|
3021
|
+
}
|
|
3022
|
+
return partial || sawSome;
|
|
3023
|
+
}
|
|
3024
|
+
const bodySegments = [
|
|
3025
|
+
[
|
|
3026
|
+
[],
|
|
3027
|
+
0
|
|
3028
|
+
]
|
|
3029
|
+
];
|
|
3030
|
+
let currentBody = bodySegments[0];
|
|
3031
|
+
let nonGsParts = 0;
|
|
3032
|
+
const nonGsPartsSums = [
|
|
3033
|
+
0
|
|
3034
|
+
];
|
|
3035
|
+
for (const b of body)if (b === GLOBSTAR) {
|
|
3036
|
+
nonGsPartsSums.push(nonGsParts);
|
|
3037
|
+
currentBody = [
|
|
3038
|
+
[],
|
|
3039
|
+
0
|
|
3040
|
+
];
|
|
3041
|
+
bodySegments.push(currentBody);
|
|
3042
|
+
} else {
|
|
3043
|
+
currentBody[0].push(b);
|
|
3044
|
+
nonGsParts++;
|
|
3045
|
+
}
|
|
3046
|
+
let i = bodySegments.length - 1;
|
|
3047
|
+
const fileLength = file.length - fileTailMatch;
|
|
3048
|
+
for (const b of bodySegments)b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
3049
|
+
return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
3050
|
+
}
|
|
3051
|
+
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
3052
|
+
const bs = bodySegments[bodyIndex];
|
|
3053
|
+
if (!bs) {
|
|
3054
|
+
for(let i = fileIndex; i < file.length; i++){
|
|
3055
|
+
sawTail = true;
|
|
3056
|
+
const f = file[i];
|
|
3057
|
+
if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
|
|
3058
|
+
}
|
|
3059
|
+
return sawTail;
|
|
3060
|
+
}
|
|
3061
|
+
const [body, after] = bs;
|
|
3062
|
+
while(fileIndex <= after){
|
|
3063
|
+
const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
3064
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
3065
|
+
const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
3066
|
+
if (false !== sub) return sub;
|
|
3067
|
+
}
|
|
3068
|
+
const f = file[fileIndex];
|
|
3069
|
+
if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
|
|
3070
|
+
fileIndex++;
|
|
3071
|
+
}
|
|
3072
|
+
return partial || null;
|
|
3073
|
+
}
|
|
3074
|
+
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
3075
|
+
let fi;
|
|
3076
|
+
let pi;
|
|
3077
|
+
let pl;
|
|
3078
|
+
let fl;
|
|
3079
|
+
for(fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++){
|
|
2726
3080
|
this.debug('matchOne loop');
|
|
2727
|
-
|
|
2728
|
-
|
|
3081
|
+
let p = pattern[pi];
|
|
3082
|
+
let f = file[fi];
|
|
2729
3083
|
this.debug(pattern, p, f);
|
|
2730
|
-
if (false === p) return false;
|
|
2731
|
-
if (p === GLOBSTAR) {
|
|
2732
|
-
this.debug('GLOBSTAR', [
|
|
2733
|
-
pattern,
|
|
2734
|
-
p,
|
|
2735
|
-
f
|
|
2736
|
-
]);
|
|
2737
|
-
var fr = fi;
|
|
2738
|
-
var pr = pi + 1;
|
|
2739
|
-
if (pr === pl) {
|
|
2740
|
-
this.debug('** at the end');
|
|
2741
|
-
for(; fi < fl; fi++)if ('.' === file[fi] || '..' === file[fi] || !options.dot && '.' === file[fi].charAt(0)) return false;
|
|
2742
|
-
return true;
|
|
2743
|
-
}
|
|
2744
|
-
while(fr < fl){
|
|
2745
|
-
var swallowee = file[fr];
|
|
2746
|
-
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
|
|
2747
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
2748
|
-
this.debug('globstar found match!', fr, fl, swallowee);
|
|
2749
|
-
return true;
|
|
2750
|
-
}
|
|
2751
|
-
if ('.' === swallowee || '..' === swallowee || !options.dot && '.' === swallowee.charAt(0)) {
|
|
2752
|
-
this.debug('dot detected!', file, fr, pattern, pr);
|
|
2753
|
-
break;
|
|
2754
|
-
}
|
|
2755
|
-
this.debug('globstar swallow a segment, and continue');
|
|
2756
|
-
fr++;
|
|
2757
|
-
}
|
|
2758
|
-
if (partial) {
|
|
2759
|
-
this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
|
|
2760
|
-
if (fr === fl) return true;
|
|
2761
|
-
}
|
|
2762
|
-
return false;
|
|
2763
|
-
}
|
|
3084
|
+
if (false === p || p === GLOBSTAR) return false;
|
|
2764
3085
|
let hit;
|
|
2765
3086
|
if ('string' == typeof p) {
|
|
2766
3087
|
hit = f === p;
|
|
@@ -2848,14 +3169,14 @@ var __webpack_exports__ = {};
|
|
|
2848
3169
|
this.regexp = new RegExp(re, [
|
|
2849
3170
|
...flags
|
|
2850
3171
|
].join(''));
|
|
2851
|
-
} catch
|
|
3172
|
+
} catch {
|
|
2852
3173
|
this.regexp = false;
|
|
2853
3174
|
}
|
|
2854
3175
|
return this.regexp;
|
|
2855
3176
|
}
|
|
2856
3177
|
slashSplit(p) {
|
|
2857
3178
|
if (this.preserveMultipleSlashes) return p.split('/');
|
|
2858
|
-
if (this.isWindows && /^\/\/[
|
|
3179
|
+
if (this.isWindows && /^\/\/[^/]+/.test(p)) return [
|
|
2859
3180
|
'',
|
|
2860
3181
|
...p.split(/\/+/)
|
|
2861
3182
|
];
|
|
@@ -2874,8 +3195,7 @@ var __webpack_exports__ = {};
|
|
|
2874
3195
|
this.debug(this.pattern, 'set', set);
|
|
2875
3196
|
let filename = ff[ff.length - 1];
|
|
2876
3197
|
if (!filename) for(let i = ff.length - 2; !filename && i >= 0; i--)filename = ff[i];
|
|
2877
|
-
for(
|
|
2878
|
-
const pattern = set[i];
|
|
3198
|
+
for (const pattern of set){
|
|
2879
3199
|
let file = ff;
|
|
2880
3200
|
if (options.matchBase && 1 === pattern.length) file = [
|
|
2881
3201
|
filename
|
|
@@ -3613,7 +3933,7 @@ var __webpack_exports__ = {};
|
|
|
3613
3933
|
return function(issue) {
|
|
3614
3934
|
const source = issue.file && external_node_fs_default().existsSync(issue.file) && external_node_fs_default().readFileSync(issue.file, 'utf-8');
|
|
3615
3935
|
let frame = '';
|
|
3616
|
-
if (source && issue.location) frame = (0, lib.
|
|
3936
|
+
if (source && issue.location) frame = (0, lib.gl)(source, issue.location, {
|
|
3617
3937
|
highlightCode: true,
|
|
3618
3938
|
...options || {}
|
|
3619
3939
|
}).split('\n').map((line)=>' ' + line).join(external_node_os_default().EOL);
|
|
@@ -7,4 +7,5 @@ interface IssueConfig {
|
|
|
7
7
|
defaultSeverity: IssueDefaultSeverity;
|
|
8
8
|
}
|
|
9
9
|
declare function createIssueConfig(compiler: rspack.Compiler, options: IssueOptions | undefined): IssueConfig;
|
|
10
|
-
export {
|
|
10
|
+
export { createIssueConfig };
|
|
11
|
+
export type { IssueConfig };
|
|
@@ -5,4 +5,5 @@ interface IssueLocation {
|
|
|
5
5
|
}
|
|
6
6
|
declare function compareIssueLocations(locationA?: IssueLocation, locationB?: IssueLocation): number;
|
|
7
7
|
declare function formatIssueLocation(location: IssueLocation): string;
|
|
8
|
-
export {
|
|
8
|
+
export { compareIssueLocations, formatIssueLocation };
|
|
9
|
+
export type { IssueLocation };
|
|
@@ -2,4 +2,5 @@ import type { IssuePredicate } from './issue-predicate';
|
|
|
2
2
|
import type { Issue } from './index';
|
|
3
3
|
type IssueMatch = Partial<Pick<Issue, 'severity' | 'code' | 'file'>>;
|
|
4
4
|
declare function createIssuePredicateFromIssueMatch(context: string, match: IssueMatch): IssuePredicate;
|
|
5
|
-
export {
|
|
5
|
+
export { createIssuePredicateFromIssueMatch };
|
|
6
|
+
export type { IssueMatch };
|
|
@@ -2,4 +2,5 @@ import type { Issue } from './index';
|
|
|
2
2
|
type IssuePredicate = (issue: Issue) => boolean;
|
|
3
3
|
declare function createTrivialIssuePredicate(result: boolean): IssuePredicate;
|
|
4
4
|
declare function composeIssuePredicates(predicates: IssuePredicate[]): IssuePredicate;
|
|
5
|
-
export {
|
|
5
|
+
export { createTrivialIssuePredicate, composeIssuePredicates };
|
|
6
|
+
export type { IssuePredicate };
|
package/lib/issue/issue.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ interface Issue {
|
|
|
9
9
|
}
|
|
10
10
|
declare function isIssue(value: unknown): value is Issue;
|
|
11
11
|
declare function deduplicateAndSortIssues(issues: Issue[]): Issue[];
|
|
12
|
-
export {
|
|
12
|
+
export { isIssue, deduplicateAndSortIssues };
|
|
13
|
+
export type { Issue };
|
package/lib/logger.d.ts
CHANGED
package/lib/plugin-config.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ interface TsCheckerRspackPluginConfig {
|
|
|
13
13
|
devServer: boolean;
|
|
14
14
|
}
|
|
15
15
|
declare function createPluginConfig(compiler: rspack.Compiler, options?: TsCheckerRspackPluginOptions): TsCheckerRspackPluginConfig;
|
|
16
|
-
export {
|
|
16
|
+
export { createPluginConfig };
|
|
17
|
+
export type { TsCheckerRspackPluginConfig };
|
package/lib/plugin-hooks.d.ts
CHANGED
|
@@ -33,4 +33,5 @@ declare function getPluginHooks(compiler: rspack.Compiler | rspack.MultiCompiler
|
|
|
33
33
|
}>;
|
|
34
34
|
issues: SyncWaterfallHook<[Issue[], rspack.Compilation | undefined], void>;
|
|
35
35
|
};
|
|
36
|
-
export { getPluginHooks
|
|
36
|
+
export { getPluginHooks };
|
|
37
|
+
export type { TsCheckerRspackPluginHooks };
|
package/lib/plugin-options.d.ts
CHANGED
package/lib/plugin-state.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ interface TsCheckerRspackPluginState {
|
|
|
13
13
|
DevServerDoneTap: any | undefined;
|
|
14
14
|
}
|
|
15
15
|
declare function createPluginState(): TsCheckerRspackPluginState;
|
|
16
|
-
export {
|
|
16
|
+
export { createPluginState };
|
|
17
|
+
export type { TsCheckerRspackPluginState };
|
package/lib/plugin.d.ts
CHANGED
|
@@ -17,19 +17,19 @@ declare class TsCheckerRspackPlugin {
|
|
|
17
17
|
private readonly options;
|
|
18
18
|
constructor(options?: TsCheckerRspackPluginOptions);
|
|
19
19
|
static getCompilerHooks(compiler: rspack.Compiler): {
|
|
20
|
-
start: import("@rspack/lite-tapable").AsyncSeriesWaterfallHook<[import("./files-change").FilesChange, rspack.Compilation], {
|
|
20
|
+
start: import("@rspack/lite-tapable", { with: { "resolution-mode": "import" } }).AsyncSeriesWaterfallHook<[import("./files-change").FilesChange, rspack.Compilation], {
|
|
21
21
|
_UnsetAdditionalOptions: true;
|
|
22
22
|
}>;
|
|
23
|
-
waiting: import("@rspack/lite-tapable").SyncHook<[rspack.Compilation], void, {
|
|
23
|
+
waiting: import("@rspack/lite-tapable", { with: { "resolution-mode": "import" } }).SyncHook<[rspack.Compilation], void, {
|
|
24
24
|
_UnsetAdditionalOptions: true;
|
|
25
25
|
}>;
|
|
26
|
-
canceled: import("@rspack/lite-tapable").SyncHook<[rspack.Compilation], void, {
|
|
26
|
+
canceled: import("@rspack/lite-tapable", { with: { "resolution-mode": "import" } }).SyncHook<[rspack.Compilation], void, {
|
|
27
27
|
_UnsetAdditionalOptions: true;
|
|
28
28
|
}>;
|
|
29
|
-
error: import("@rspack/lite-tapable").SyncHook<[unknown, rspack.Compilation], void, {
|
|
29
|
+
error: import("@rspack/lite-tapable", { with: { "resolution-mode": "import" } }).SyncHook<[unknown, rspack.Compilation], void, {
|
|
30
30
|
_UnsetAdditionalOptions: true;
|
|
31
31
|
}>;
|
|
32
|
-
issues: import("@rspack/lite-tapable").SyncWaterfallHook<[import("./issue").Issue[], rspack.Compilation | undefined], void>;
|
|
32
|
+
issues: import("@rspack/lite-tapable", { with: { "resolution-mode": "import" } }).SyncWaterfallHook<[import("./issue").Issue[], rspack.Compilation | undefined], void>;
|
|
33
33
|
};
|
|
34
34
|
apply(compiler: rspack.Compiler): void;
|
|
35
35
|
}
|
package/lib/rpc/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { exposeRpc } from './expose-rpc';
|
|
2
2
|
export { wrapRpc } from './wrap-rpc';
|
|
3
|
-
export { createRpcWorker, getRpcWorkerData
|
|
3
|
+
export { createRpcWorker, getRpcWorkerData } from './rpc-worker';
|
|
4
|
+
export type { RpcWorker } from './rpc-worker';
|
|
4
5
|
export { RpcExitError } from './rpc-error';
|
|
5
|
-
export { RpcRemoteMethod } from './types';
|
|
6
|
+
export type { RpcRemoteMethod } from './types';
|
package/lib/rpc/rpc-worker.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ interface RpcWorkerBase {
|
|
|
9
9
|
type RpcWorker<T extends RpcMethod = RpcMethod> = RpcWorkerBase & RpcRemoteMethod<T>;
|
|
10
10
|
declare function createRpcWorker<T extends RpcMethod>(modulePath: string, data: unknown, memoryLimit?: number): RpcWorker<T>;
|
|
11
11
|
declare function getRpcWorkerData(): unknown;
|
|
12
|
-
export { createRpcWorker, getRpcWorkerData
|
|
12
|
+
export { createRpcWorker, getRpcWorkerData };
|
|
13
|
+
export type { RpcWorker };
|
package/lib/rpc/types.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ interface RpcRejectMessage {
|
|
|
16
16
|
type RpcMessage = RpcCallMessage | RpcResolveMessage | RpcRejectMessage;
|
|
17
17
|
type RpcMethod = (...args: any[]) => any;
|
|
18
18
|
type RpcRemoteMethod<T extends RpcMethod> = T extends (...args: infer A) => infer R ? R extends Promise<any> ? (...args: A) => R : (...args: A) => Promise<R> : (...args: unknown[]) => Promise<unknown>;
|
|
19
|
-
export { RpcCallMessage, RpcResolveMessage, RpcRejectMessage, RpcMessage, RpcMethod, RpcRemoteMethod, };
|
|
19
|
+
export type { RpcCallMessage, RpcResolveMessage, RpcRejectMessage, RpcMessage, RpcMethod, RpcRemoteMethod, };
|
|
@@ -15,4 +15,5 @@ interface TypeScriptWorkerConfig {
|
|
|
15
15
|
typescriptPath: string;
|
|
16
16
|
}
|
|
17
17
|
declare function createTypeScriptWorkerConfig(compiler: rspack.Compiler, options: TypeScriptWorkerOptions | undefined): TypeScriptWorkerConfig;
|
|
18
|
-
export { createTypeScriptWorkerConfig
|
|
18
|
+
export { createTypeScriptWorkerConfig };
|
|
19
|
+
export type { TypeScriptWorkerConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-checker-rspack-plugin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Runs typescript type checker and linter on separate process.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rspack",
|
|
@@ -21,41 +21,30 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"lib"
|
|
23
23
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "rslib build",
|
|
26
|
-
"bump": "npx bumpp",
|
|
27
|
-
"dev": "rslib build -w",
|
|
28
|
-
"lint": "echo lint",
|
|
29
|
-
"precommit": "pnpm build && pnpm test:unit",
|
|
30
|
-
"prepare": "husky && pnpm build",
|
|
31
|
-
"test": "pnpm build && pnpm test:unit && pnpm test:e2e",
|
|
32
|
-
"test:e2e": "cd test/e2e && pnpm test",
|
|
33
|
-
"test:e2e:setup": "cd test/e2e && pnpm run setup",
|
|
34
|
-
"test:unit": "rstest --config=test/unit/rstest.config.ts"
|
|
35
|
-
},
|
|
36
24
|
"dependencies": {
|
|
37
25
|
"@rspack/lite-tapable": "^1.1.0",
|
|
38
26
|
"chokidar": "^3.6.0",
|
|
39
|
-
"memfs": "^4.
|
|
27
|
+
"memfs": "^4.57.2",
|
|
40
28
|
"picocolors": "^1.1.1"
|
|
41
29
|
},
|
|
42
30
|
"devDependencies": {
|
|
43
31
|
"@babel/code-frame": "^7.29.0",
|
|
44
|
-
"@rslib/core": "^0.
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
32
|
+
"@rslib/core": "^0.21.5",
|
|
33
|
+
"@rslint/core": "^0.5.3",
|
|
34
|
+
"@rspack/core": "^2.0.4",
|
|
35
|
+
"@rstest/core": "^0.10.2",
|
|
47
36
|
"@types/babel__code-frame": "^7.27.0",
|
|
48
37
|
"@types/is-glob": "^4.0.4",
|
|
49
38
|
"@types/mock-fs": "^4.13.4",
|
|
50
|
-
"@types/node": "^24.
|
|
39
|
+
"@types/node": "^24.12.4",
|
|
51
40
|
"cross-env": "^10.1.0",
|
|
52
41
|
"husky": "^9.1.7",
|
|
53
42
|
"is-glob": "^4.0.3",
|
|
54
|
-
"minimatch": "^10.2.
|
|
43
|
+
"minimatch": "^10.2.5",
|
|
55
44
|
"mock-fs": "^5.5.0",
|
|
56
|
-
"prettier": "^3.8.
|
|
57
|
-
"strip-ansi": "^
|
|
58
|
-
"typescript": "^
|
|
45
|
+
"prettier": "^3.8.3",
|
|
46
|
+
"strip-ansi": "^7.2.0",
|
|
47
|
+
"typescript": "^6.0.3"
|
|
59
48
|
},
|
|
60
49
|
"peerDependencies": {
|
|
61
50
|
"@rspack/core": "^1.0.0 || ^2.0.0-0",
|
|
@@ -66,9 +55,20 @@
|
|
|
66
55
|
"optional": true
|
|
67
56
|
}
|
|
68
57
|
},
|
|
69
|
-
"packageManager": "pnpm@10.28.2",
|
|
70
58
|
"publishConfig": {
|
|
71
59
|
"access": "public",
|
|
72
60
|
"registry": "https://registry.npmjs.org/"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "rslib",
|
|
64
|
+
"bump": "npx bumpp",
|
|
65
|
+
"dev": "rslib -w",
|
|
66
|
+
"lint": "rslint",
|
|
67
|
+
"lint:write": "rslint --fix",
|
|
68
|
+
"precommit": "pnpm build && pnpm test:unit",
|
|
69
|
+
"test": "pnpm build && pnpm test:unit && pnpm test:e2e",
|
|
70
|
+
"test:e2e": "cd test/e2e && pnpm test",
|
|
71
|
+
"test:e2e:setup": "cd test/e2e && pnpm run setup",
|
|
72
|
+
"test:unit": "rstest --config=test/unit/rstest.config.ts"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|