ts-checker-rspack-plugin 1.3.0 → 1.3.2

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,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 { FilesChange, getFilesChange, consumeFilesChange, updateFilesChange, clearFilesChange, aggregateFilesChanges, };
17
+ export { getFilesChange, consumeFilesChange, updateFilesChange, clearFilesChange, aggregateFilesChanges, };
18
+ export type { FilesChange };
@@ -4,4 +4,4 @@ interface FilesMatch {
4
4
  excluded: string[];
5
5
  extensions: string[];
6
6
  }
7
- export { FilesMatch };
7
+ export type { FilesMatch };
@@ -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, BabelCodeFrameOptions };
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 { FormatterConfig, createFormatterConfig };
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, };
@@ -1,4 +1,4 @@
1
1
  import type { Issue } from '../issue';
2
2
  type Formatter = (issue: Issue) => string;
3
3
  type FormatterPathType = 'relative' | 'absolute';
4
- export { Formatter, FormatterPathType };
4
+ export type { Formatter, FormatterPathType };
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
10
10
  };
11
11
  })();
12
12
  (()=>{
13
- __webpack_require__.d = (exports1, definition)=>{
14
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
- enumerable: true,
16
- get: definition[key]
17
- });
13
+ __webpack_require__.d = (exports1, getters, values)=>{
14
+ var define = (defs, kind)=>{
15
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
16
+ enumerable: true,
17
+ [kind]: defs[key]
18
+ });
19
+ };
20
+ define(getters, "get");
21
+ define(values, "value");
18
22
  };
19
23
  })();
20
24
  (()=>{
@@ -485,7 +489,7 @@ function normalizeAndResolvePath(path) {
485
489
  let normalizedPath = realFileSystem.normalizePath(path);
486
490
  try {
487
491
  normalizedPath = realFileSystem.realPath(normalizedPath);
488
- } catch (error) {}
492
+ } catch {}
489
493
  return normalizedPath;
490
494
  }
491
495
  function isArtifact(path) {
@@ -10,11 +10,15 @@ var __webpack_require__ = {};
10
10
  };
11
11
  })();
12
12
  (()=>{
13
- __webpack_require__.d = (exports1, definition)=>{
14
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
- enumerable: true,
16
- get: definition[key]
17
- });
13
+ __webpack_require__.d = (exports1, getters, values)=>{
14
+ var define = (defs, kind)=>{
15
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
16
+ enumerable: true,
17
+ [kind]: defs[key]
18
+ });
19
+ };
20
+ define(getters, "get");
21
+ define(values, "value");
18
22
  };
19
23
  })();
20
24
  (()=>{
@@ -600,7 +604,7 @@ function normalizeAndResolvePath(path) {
600
604
  let normalizedPath = realFileSystem.normalizePath(path);
601
605
  try {
602
606
  normalizedPath = realFileSystem.realPath(normalizedPath);
603
- } catch (error) {}
607
+ } catch {}
604
608
  return normalizedPath;
605
609
  }
606
610
  function isArtifact(path) {
@@ -756,7 +760,7 @@ function invalidateTsBuildInfo() {
756
760
  const tsBuildInfoPath = typescript.getTsBuildInfoEmitOutputFilePath(parsedConfig.options);
757
761
  if (tsBuildInfoPath) try {
758
762
  system.deleteFile(tsBuildInfoPath);
759
- } catch (error) {}
763
+ } catch {}
760
764
  }
761
765
  }
762
766
  function emitTsBuildInfoIfNeeded(builderProgram) {
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! For license information please see index.js.LICENSE.txt */
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
  /*!
@@ -136,11 +136,11 @@ var __webpack_modules__ = {
136
136
  "use strict";
137
137
  module.exports = require("picocolors");
138
138
  },
139
- "./node_modules/.pnpm/@babel+code-frame@7.29.0/node_modules/@babel/code-frame/lib/index.js" (__unused_rspack_module, exports1, __webpack_require__) {
139
+ "./node_modules/.pnpm/@babel+code-frame@7.29.7/node_modules/@babel/code-frame/lib/index.js" (__unused_rspack_module, exports1, __webpack_require__) {
140
140
  "use strict";
141
141
  var picocolors = __webpack_require__("picocolors");
142
142
  var jsTokens = __webpack_require__("./node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js");
143
- var helperValidatorIdentifier = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js");
143
+ var helperValidatorIdentifier = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js");
144
144
  function isColorSupported() {
145
145
  return "object" == typeof process && ("0" === process.env.FORCE_COLOR || "false" === process.env.FORCE_COLOR) ? false : picocolors.isColorSupported;
146
146
  }
@@ -305,9 +305,9 @@ var __webpack_modules__ = {
305
305
  if (shouldHighlight) return defs.reset(frame);
306
306
  return frame;
307
307
  }
308
- exports1.codeFrameColumns = codeFrameColumns;
308
+ exports1.gl = codeFrameColumns;
309
309
  },
310
- "./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js" (__unused_rspack_module, exports1) {
310
+ "./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js" (__unused_rspack_module, exports1) {
311
311
  "use strict";
312
312
  Object.defineProperty(exports1, "__esModule", {
313
313
  value: true
@@ -1316,7 +1316,7 @@ var __webpack_modules__ = {
1316
1316
  return !isFirst;
1317
1317
  }
1318
1318
  },
1319
- "./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/index.js" (__unused_rspack_module, exports1, __webpack_require__) {
1319
+ "./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js" (__unused_rspack_module, exports1, __webpack_require__) {
1320
1320
  "use strict";
1321
1321
  Object.defineProperty(exports1, "__esModule", {
1322
1322
  value: true
@@ -1369,10 +1369,10 @@ var __webpack_modules__ = {
1369
1369
  return _keyword.isStrictReservedWord;
1370
1370
  }
1371
1371
  });
1372
- var _identifier = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
1373
- var _keyword = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js");
1372
+ var _identifier = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
1373
+ var _keyword = __webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js");
1374
1374
  },
1375
- "./node_modules/.pnpm/@babel+helper-validator-identifier@7.28.5/node_modules/@babel/helper-validator-identifier/lib/keyword.js" (__unused_rspack_module, exports1) {
1375
+ "./node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js" (__unused_rspack_module, exports1) {
1376
1376
  "use strict";
1377
1377
  Object.defineProperty(exports1, "__esModule", {
1378
1378
  value: true
@@ -1476,11 +1476,15 @@ function __webpack_require__(moduleId) {
1476
1476
  };
1477
1477
  })();
1478
1478
  (()=>{
1479
- __webpack_require__.d = (exports1, definition)=>{
1480
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
1481
- enumerable: true,
1482
- get: definition[key]
1483
- });
1479
+ __webpack_require__.d = (exports1, getters, values)=>{
1480
+ var define = (defs, kind)=>{
1481
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
1482
+ enumerable: true,
1483
+ [kind]: defs[key]
1484
+ });
1485
+ };
1486
+ define(getters, "get");
1487
+ define(values, "value");
1484
1488
  };
1485
1489
  })();
1486
1490
  (()=>{
@@ -1619,7 +1623,7 @@ var __webpack_exports__ = {};
1619
1623
  const openPattern = /\\{/g;
1620
1624
  const closePattern = /\\}/g;
1621
1625
  const commaPattern = /\\,/g;
1622
- const periodPattern = /\\./g;
1626
+ const periodPattern = /\\\./g;
1623
1627
  const EXPANSION_MAX = 100000;
1624
1628
  function numeric(str) {
1625
1629
  return isNaN(str) ? str.charCodeAt(0) : parseInt(str, 10);
@@ -1708,7 +1712,7 @@ var __webpack_exports__ = {};
1708
1712
  const x = numeric(n[0]);
1709
1713
  const y = numeric(n[1]);
1710
1714
  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;
1715
+ let incr = 3 === n.length && void 0 !== n[2] ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
1712
1716
  let test = lte;
1713
1717
  const reverse = y < x;
1714
1718
  if (reverse) {
@@ -1911,9 +1915,10 @@ var __webpack_exports__ = {};
1911
1915
  ];
1912
1916
  };
1913
1917
  const unescape_unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {})=>{
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');
1918
+ if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, '$1') : s.replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2').replace(/\\([^/])/g, '$1');
1919
+ return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, '$1') : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2').replace(/\\([^/{}])/g, '$1');
1916
1920
  };
1921
+ var _a;
1917
1922
  const types = new Set([
1918
1923
  '!',
1919
1924
  '?',
@@ -1922,6 +1927,168 @@ var __webpack_exports__ = {};
1922
1927
  '@'
1923
1928
  ]);
1924
1929
  const isExtglobType = (c)=>types.has(c);
1930
+ const isExtglobAST = (c)=>isExtglobType(c.type);
1931
+ const adoptionMap = new Map([
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
+ '@'
1965
+ ]
1966
+ ]
1967
+ ]);
1968
+ const adoptionWithSpaceMap = new Map([
1969
+ [
1970
+ '!',
1971
+ [
1972
+ '?'
1973
+ ]
1974
+ ],
1975
+ [
1976
+ '@',
1977
+ [
1978
+ '?'
1979
+ ]
1980
+ ],
1981
+ [
1982
+ '+',
1983
+ [
1984
+ '?',
1985
+ '*'
1986
+ ]
1987
+ ]
1988
+ ]);
1989
+ const adoptionAnyMap = new Map([
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
+ '*'
2027
+ ]
2028
+ ]
2029
+ ]);
2030
+ const usurpMap = new Map([
2031
+ [
2032
+ '!',
2033
+ new Map([
2034
+ [
2035
+ '!',
2036
+ '@'
2037
+ ]
2038
+ ])
2039
+ ],
2040
+ [
2041
+ '?',
2042
+ new Map([
2043
+ [
2044
+ '*',
2045
+ '*'
2046
+ ],
2047
+ [
2048
+ '+',
2049
+ '*'
2050
+ ]
2051
+ ])
2052
+ ],
2053
+ [
2054
+ '@',
2055
+ new Map([
2056
+ [
2057
+ '!',
2058
+ '!'
2059
+ ],
2060
+ [
2061
+ '?',
2062
+ '?'
2063
+ ],
2064
+ [
2065
+ '@',
2066
+ '@'
2067
+ ],
2068
+ [
2069
+ '*',
2070
+ '*'
2071
+ ],
2072
+ [
2073
+ '+',
2074
+ '+'
2075
+ ]
2076
+ ])
2077
+ ],
2078
+ [
2079
+ '+',
2080
+ new Map([
2081
+ [
2082
+ '?',
2083
+ '*'
2084
+ ],
2085
+ [
2086
+ '*',
2087
+ '*'
2088
+ ]
2089
+ ])
2090
+ ]
2091
+ ]);
1925
2092
  const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
1926
2093
  const startNoDot = '(?!\\.)';
1927
2094
  const addPatternStart = new Set([
@@ -1937,6 +2104,7 @@ var __webpack_exports__ = {};
1937
2104
  const qmark = '[^/]';
1938
2105
  const star = qmark + '*?';
1939
2106
  const starNoEmpty = qmark + '+?';
2107
+ let ID = 0;
1940
2108
  class ast_AST {
1941
2109
  type;
1942
2110
  #root;
@@ -1950,6 +2118,22 @@ var __webpack_exports__ = {};
1950
2118
  #options;
1951
2119
  #toString;
1952
2120
  #emptyExt = false;
2121
+ id = ++ID;
2122
+ get depth() {
2123
+ return (this.#parent?.depth ?? -1) + 1;
2124
+ }
2125
+ [Symbol.for('nodejs.util.inspect.custom')]() {
2126
+ return {
2127
+ '@@type': 'AST',
2128
+ id: this.id,
2129
+ type: this.type,
2130
+ root: this.#root.id,
2131
+ parent: this.#parent?.id,
2132
+ depth: this.depth,
2133
+ partsLength: this.#parts.length,
2134
+ parts: this.#parts
2135
+ };
2136
+ }
1953
2137
  constructor(type, parent, options = {}){
1954
2138
  this.type = type;
1955
2139
  if (type) this.#hasMagic = true;
@@ -1968,9 +2152,7 @@ var __webpack_exports__ = {};
1968
2152
  return this.#hasMagic;
1969
2153
  }
1970
2154
  toString() {
1971
- if (void 0 !== this.#toString) return this.#toString;
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('|') + ')';
2155
+ 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
2156
  }
1975
2157
  #fillNegs() {
1976
2158
  if (this !== this.#root) throw new Error('should only call on root');
@@ -1995,7 +2177,7 @@ var __webpack_exports__ = {};
1995
2177
  }
1996
2178
  push(...parts) {
1997
2179
  for (const p of parts)if ('' !== p) {
1998
- if ('string' != typeof p && !(p instanceof ast_AST && p.#parent === this)) throw new Error('invalid part: ' + p);
2180
+ if ('string' != typeof p && !(p instanceof _a && p.#parent === this)) throw new Error('invalid part: ' + p);
1999
2181
  this.#parts.push(p);
2000
2182
  }
2001
2183
  }
@@ -2015,7 +2197,7 @@ var __webpack_exports__ = {};
2015
2197
  const p = this.#parent;
2016
2198
  for(let i = 0; i < this.#parentIndex; i++){
2017
2199
  const pp = p.#parts[i];
2018
- if (!(pp instanceof ast_AST && '!' === pp.type)) return false;
2200
+ if (!(pp instanceof _a && '!' === pp.type)) return false;
2019
2201
  }
2020
2202
  return true;
2021
2203
  }
@@ -2032,11 +2214,12 @@ var __webpack_exports__ = {};
2032
2214
  else this.push(part.clone(this));
2033
2215
  }
2034
2216
  clone(parent) {
2035
- const c = new ast_AST(this.type, parent);
2217
+ const c = new _a(this.type, parent);
2036
2218
  for (const p of this.#parts)c.copyIn(p);
2037
2219
  return c;
2038
2220
  }
2039
- static #parseAST(str, ast, pos, opt) {
2221
+ static #parseAST(str, ast, pos, opt, extDepth) {
2222
+ const maxDepth = opt.maxExtglobRecursion ?? 2;
2040
2223
  let escaping = false;
2041
2224
  let inBrace = false;
2042
2225
  let braceStart = -1;
@@ -2065,11 +2248,12 @@ var __webpack_exports__ = {};
2065
2248
  acc += c;
2066
2249
  continue;
2067
2250
  }
2068
- if (!opt.noext && isExtglobType(c) && '(' === str.charAt(i)) {
2251
+ const doRecurse = !opt.noext && isExtglobType(c) && '(' === str.charAt(i) && extDepth <= maxDepth;
2252
+ if (doRecurse) {
2069
2253
  ast.push(acc);
2070
2254
  acc = '';
2071
- const ext = new ast_AST(c, ast);
2072
- i = ast_AST.#parseAST(str, ext, i, opt);
2255
+ const ext = new _a(c, ast);
2256
+ i = _a.#parseAST(str, ext, i, opt, extDepth + 1);
2073
2257
  ast.push(ext);
2074
2258
  continue;
2075
2259
  }
@@ -2079,7 +2263,7 @@ var __webpack_exports__ = {};
2079
2263
  return i;
2080
2264
  }
2081
2265
  let i = pos + 1;
2082
- let part = new ast_AST(null, ast);
2266
+ let part = new _a(null, ast);
2083
2267
  const parts = [];
2084
2268
  let acc = '';
2085
2269
  while(i < str.length){
@@ -2103,19 +2287,21 @@ var __webpack_exports__ = {};
2103
2287
  acc += c;
2104
2288
  continue;
2105
2289
  }
2106
- if (isExtglobType(c) && '(' === str.charAt(i)) {
2290
+ const doRecurse = !opt.noext && isExtglobType(c) && '(' === str.charAt(i) && (extDepth <= maxDepth || ast && ast.#canAdoptType(c));
2291
+ if (doRecurse) {
2292
+ const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
2107
2293
  part.push(acc);
2108
2294
  acc = '';
2109
- const ext = new ast_AST(c, part);
2295
+ const ext = new _a(c, part);
2110
2296
  part.push(ext);
2111
- i = ast_AST.#parseAST(str, ext, i, opt);
2297
+ i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
2112
2298
  continue;
2113
2299
  }
2114
2300
  if ('|' === c) {
2115
2301
  part.push(acc);
2116
2302
  acc = '';
2117
2303
  parts.push(part);
2118
- part = new ast_AST(null, ast);
2304
+ part = new _a(null, ast);
2119
2305
  continue;
2120
2306
  }
2121
2307
  if (')' === c) {
@@ -2134,9 +2320,55 @@ var __webpack_exports__ = {};
2134
2320
  ];
2135
2321
  return i;
2136
2322
  }
2323
+ #canAdoptWithSpace(child) {
2324
+ return this.#canAdopt(child, adoptionWithSpaceMap);
2325
+ }
2326
+ #canAdopt(child, map = adoptionMap) {
2327
+ if (!child || 'object' != typeof child || null !== child.type || 1 !== child.#parts.length || null === this.type) return false;
2328
+ const gc = child.#parts[0];
2329
+ if (!gc || 'object' != typeof gc || null === gc.type) return false;
2330
+ return this.#canAdoptType(gc.type, map);
2331
+ }
2332
+ #canAdoptType(c, map = adoptionAnyMap) {
2333
+ return !!map.get(this.type)?.includes(c);
2334
+ }
2335
+ #adoptWithSpace(child, index) {
2336
+ const gc = child.#parts[0];
2337
+ const blank = new _a(null, gc, this.options);
2338
+ blank.#parts.push('');
2339
+ gc.push(blank);
2340
+ this.#adopt(child, index);
2341
+ }
2342
+ #adopt(child, index) {
2343
+ const gc = child.#parts[0];
2344
+ this.#parts.splice(index, 1, ...gc.#parts);
2345
+ for (const p of gc.#parts)if ('object' == typeof p) p.#parent = this;
2346
+ this.#toString = void 0;
2347
+ }
2348
+ #canUsurpType(c) {
2349
+ const m = usurpMap.get(this.type);
2350
+ return !!m?.has(c);
2351
+ }
2352
+ #canUsurp(child) {
2353
+ if (!child || 'object' != typeof child || null !== child.type || 1 !== child.#parts.length || null === this.type || 1 !== this.#parts.length) return false;
2354
+ const gc = child.#parts[0];
2355
+ if (!gc || 'object' != typeof gc || null === gc.type) return false;
2356
+ return this.#canUsurpType(gc.type);
2357
+ }
2358
+ #usurp(child) {
2359
+ const m = usurpMap.get(this.type);
2360
+ const gc = child.#parts[0];
2361
+ const nt = m?.get(gc.type);
2362
+ if (!nt) return false;
2363
+ this.#parts = gc.#parts;
2364
+ for (const p of this.#parts)if ('object' == typeof p) p.#parent = this;
2365
+ this.type = nt;
2366
+ this.#toString = void 0;
2367
+ this.#emptyExt = false;
2368
+ }
2137
2369
  static fromGlob(pattern, options = {}) {
2138
- const ast = new ast_AST(null, void 0, options);
2139
- ast_AST.#parseAST(pattern, ast, 0, options);
2370
+ const ast = new _a(null, void 0, options);
2371
+ _a.#parseAST(pattern, ast, 0, options, 0);
2140
2372
  return ast;
2141
2373
  }
2142
2374
  toMMPattern() {
@@ -2156,11 +2388,14 @@ var __webpack_exports__ = {};
2156
2388
  }
2157
2389
  toRegExpSource(allowDot) {
2158
2390
  const dot = allowDot ?? !!this.#options.dot;
2159
- if (this.#root === this) this.#fillNegs();
2160
- if (!this.type) {
2391
+ if (this.#root === this) {
2392
+ this.#flatten();
2393
+ this.#fillNegs();
2394
+ }
2395
+ if (!isExtglobAST(this)) {
2161
2396
  const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s)=>'string' != typeof s);
2162
2397
  const src = this.#parts.map((p)=>{
2163
- const [re, _, hasMagic, uflag] = 'string' == typeof p ? ast_AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
2398
+ const [re, _, hasMagic, uflag] = 'string' == typeof p ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
2164
2399
  this.#hasMagic = this.#hasMagic || hasMagic;
2165
2400
  this.#uflag = this.#uflag || uflag;
2166
2401
  return re;
@@ -2192,11 +2427,12 @@ var __webpack_exports__ = {};
2192
2427
  let body = this.#partsToRegExp(dot);
2193
2428
  if (this.isStart() && this.isEnd() && !body && '!' !== this.type) {
2194
2429
  const s = this.toString();
2195
- this.#parts = [
2430
+ const me = this;
2431
+ me.#parts = [
2196
2432
  s
2197
2433
  ];
2198
- this.type = null;
2199
- this.#hasMagic = void 0;
2434
+ me.type = null;
2435
+ me.#hasMagic = void 0;
2200
2436
  return [
2201
2437
  s,
2202
2438
  unescape_unescape(this.toString()),
@@ -2220,6 +2456,32 @@ var __webpack_exports__ = {};
2220
2456
  this.#uflag
2221
2457
  ];
2222
2458
  }
2459
+ #flatten() {
2460
+ if (isExtglobAST(this)) {
2461
+ let iterations = 0;
2462
+ let done = false;
2463
+ do {
2464
+ done = true;
2465
+ for(let i = 0; i < this.#parts.length; i++){
2466
+ const c = this.#parts[i];
2467
+ if ('object' == typeof c) {
2468
+ c.#flatten();
2469
+ if (this.#canAdopt(c)) {
2470
+ done = false;
2471
+ this.#adopt(c, i);
2472
+ } else if (this.#canAdoptWithSpace(c)) {
2473
+ done = false;
2474
+ this.#adoptWithSpace(c, i);
2475
+ } else if (this.#canUsurp(c)) {
2476
+ done = false;
2477
+ this.#usurp(c);
2478
+ }
2479
+ }
2480
+ }
2481
+ }while (!done && ++iterations < 10);
2482
+ } else for (const p of this.#parts)if ('object' == typeof p) p.#flatten();
2483
+ this.#toString = void 0;
2484
+ }
2223
2485
  #partsToRegExp(dot) {
2224
2486
  return this.#parts.map((p)=>{
2225
2487
  if ('string' == typeof p) throw new Error('string type in extglob ast??');
@@ -2278,6 +2540,7 @@ var __webpack_exports__ = {};
2278
2540
  ];
2279
2541
  }
2280
2542
  }
2543
+ _a = ast_AST;
2281
2544
  const escape_escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {})=>{
2282
2545
  if (magicalBraces) return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&');
2283
2546
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&');
@@ -2287,7 +2550,7 @@ var __webpack_exports__ = {};
2287
2550
  if (!options.nocomment && '#' === pattern.charAt(0)) return false;
2288
2551
  return new esm_Minimatch(pattern, options).match(p);
2289
2552
  };
2290
- const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
2553
+ const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
2291
2554
  const starDotExtTest = (ext)=>(f)=>!f.startsWith('.') && f.endsWith(ext);
2292
2555
  const starDotExtTestDot = (ext)=>(f)=>f.endsWith(ext);
2293
2556
  const starDotExtTestNocase = (ext)=>{
@@ -2306,7 +2569,7 @@ var __webpack_exports__ = {};
2306
2569
  const starRE = /^\*+$/;
2307
2570
  const starTest = (f)=>0 !== f.length && !f.startsWith('.');
2308
2571
  const starTestDot = (f)=>0 !== f.length && '.' !== f && '..' !== f;
2309
- const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
2572
+ const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
2310
2573
  const qmarksTestNocase = ([$0, ext = ''])=>{
2311
2574
  const noext = qmarksTestNoExt([
2312
2575
  $0
@@ -2434,11 +2697,13 @@ var __webpack_exports__ = {};
2434
2697
  isWindows;
2435
2698
  platform;
2436
2699
  windowsNoMagicRoot;
2700
+ maxGlobstarRecursion;
2437
2701
  regexp;
2438
2702
  constructor(pattern, options = {}){
2439
2703
  assertValidPattern(pattern);
2440
2704
  options = options || {};
2441
2705
  this.options = options;
2706
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
2442
2707
  this.pattern = pattern;
2443
2708
  this.platform = options.platform || defaultPlatform;
2444
2709
  this.isWindows = 'win32' === this.platform;
@@ -2510,7 +2775,7 @@ var __webpack_exports__ = {};
2510
2775
  }
2511
2776
  preprocess(globParts) {
2512
2777
  if (this.options.noglobstar) {
2513
- for(let i = 0; i < globParts.length; i++)for(let j = 0; j < globParts[i].length; j++)if ('**' === globParts[i][j]) globParts[i][j] = '*';
2778
+ for (const partset of globParts)for(let j = 0; j < partset.length; j++)if ('**' === partset[j]) partset[j] = '*';
2514
2779
  }
2515
2780
  const { optimizationLevel = 1 } = this.options;
2516
2781
  if (optimizationLevel >= 2) {
@@ -2573,7 +2838,7 @@ var __webpack_exports__ = {};
2573
2838
  let dd = 0;
2574
2839
  while(-1 !== (dd = parts.indexOf('..', dd + 1))){
2575
2840
  const p = parts[dd - 1];
2576
- if (p && '.' !== p && '..' !== p && '**' !== p) {
2841
+ if (p && '.' !== p && '..' !== p && '**' !== p && !(this.isWindows && /^[a-z]:$/i.test(p))) {
2577
2842
  didSomething = true;
2578
2843
  parts.splice(dd - 1, 2);
2579
2844
  dd -= 2;
@@ -2695,7 +2960,8 @@ var __webpack_exports__ = {};
2695
2960
  this.negate = negate;
2696
2961
  }
2697
2962
  matchOne(file, pattern, partial = false) {
2698
- const options = this.options;
2963
+ let fileStartIndex = 0;
2964
+ let patternStartIndex = 0;
2699
2965
  if (this.isWindows) {
2700
2966
  const fileDrive = 'string' == typeof file[0] && /^[a-z]:$/i.test(file[0]);
2701
2967
  const fileUNC = !fileDrive && '' === file[0] && '' === file[1] && '?' === file[2] && /^[a-z]:$/i.test(file[3]);
@@ -2710,57 +2976,116 @@ var __webpack_exports__ = {};
2710
2976
  ];
2711
2977
  if (fd.toLowerCase() === pd.toLowerCase()) {
2712
2978
  pattern[pdi] = fd;
2713
- if (pdi > fdi) pattern = pattern.slice(pdi);
2714
- else if (fdi > pdi) file = file.slice(fdi);
2979
+ patternStartIndex = pdi;
2980
+ fileStartIndex = fdi;
2715
2981
  }
2716
2982
  }
2717
2983
  }
2718
2984
  const { optimizationLevel = 1 } = this.options;
2719
2985
  if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
2720
- this.debug('matchOne', this, {
2721
- file,
2722
- pattern
2723
- });
2724
- this.debug('matchOne', file.length, pattern.length);
2725
- for(var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++){
2986
+ if (pattern.includes(GLOBSTAR)) return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
2987
+ return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
2988
+ }
2989
+ #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
2990
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
2991
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
2992
+ const [head, body, tail] = partial ? [
2993
+ pattern.slice(patternIndex, firstgs),
2994
+ pattern.slice(firstgs + 1),
2995
+ []
2996
+ ] : [
2997
+ pattern.slice(patternIndex, firstgs),
2998
+ pattern.slice(firstgs + 1, lastgs),
2999
+ pattern.slice(lastgs + 1)
3000
+ ];
3001
+ if (head.length) {
3002
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
3003
+ if (!this.#matchOne(fileHead, head, partial, 0, 0)) return false;
3004
+ fileIndex += head.length;
3005
+ patternIndex += head.length;
3006
+ }
3007
+ let fileTailMatch = 0;
3008
+ if (tail.length) {
3009
+ if (tail.length + fileIndex > file.length) return false;
3010
+ let tailStart = file.length - tail.length;
3011
+ if (this.#matchOne(file, tail, partial, tailStart, 0)) fileTailMatch = tail.length;
3012
+ else {
3013
+ if ('' !== file[file.length - 1] || fileIndex + tail.length === file.length) return false;
3014
+ tailStart--;
3015
+ if (!this.#matchOne(file, tail, partial, tailStart, 0)) return false;
3016
+ fileTailMatch = tail.length + 1;
3017
+ }
3018
+ }
3019
+ if (!body.length) {
3020
+ let sawSome = !!fileTailMatch;
3021
+ for(let i = fileIndex; i < file.length - fileTailMatch; i++){
3022
+ const f = String(file[i]);
3023
+ sawSome = true;
3024
+ if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
3025
+ }
3026
+ return partial || sawSome;
3027
+ }
3028
+ const bodySegments = [
3029
+ [
3030
+ [],
3031
+ 0
3032
+ ]
3033
+ ];
3034
+ let currentBody = bodySegments[0];
3035
+ let nonGsParts = 0;
3036
+ const nonGsPartsSums = [
3037
+ 0
3038
+ ];
3039
+ for (const b of body)if (b === GLOBSTAR) {
3040
+ nonGsPartsSums.push(nonGsParts);
3041
+ currentBody = [
3042
+ [],
3043
+ 0
3044
+ ];
3045
+ bodySegments.push(currentBody);
3046
+ } else {
3047
+ currentBody[0].push(b);
3048
+ nonGsParts++;
3049
+ }
3050
+ let i = bodySegments.length - 1;
3051
+ const fileLength = file.length - fileTailMatch;
3052
+ for (const b of bodySegments)b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
3053
+ return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
3054
+ }
3055
+ #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
3056
+ const bs = bodySegments[bodyIndex];
3057
+ if (!bs) {
3058
+ for(let i = fileIndex; i < file.length; i++){
3059
+ sawTail = true;
3060
+ const f = file[i];
3061
+ if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
3062
+ }
3063
+ return sawTail;
3064
+ }
3065
+ const [body, after] = bs;
3066
+ while(fileIndex <= after){
3067
+ const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
3068
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
3069
+ const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
3070
+ if (false !== sub) return sub;
3071
+ }
3072
+ const f = file[fileIndex];
3073
+ if ('.' === f || '..' === f || !this.options.dot && f.startsWith('.')) return false;
3074
+ fileIndex++;
3075
+ }
3076
+ return partial || null;
3077
+ }
3078
+ #matchOne(file, pattern, partial, fileIndex, patternIndex) {
3079
+ let fi;
3080
+ let pi;
3081
+ let pl;
3082
+ let fl;
3083
+ for(fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++){
2726
3084
  this.debug('matchOne loop');
2727
- var p = pattern[pi];
2728
- var f = file[fi];
3085
+ let p = pattern[pi];
3086
+ let f = file[fi];
2729
3087
  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
- }
3088
+ if (false === p || p === GLOBSTAR) return false;
2764
3089
  let hit;
2765
3090
  if ('string' == typeof p) {
2766
3091
  hit = f === p;
@@ -2848,14 +3173,14 @@ var __webpack_exports__ = {};
2848
3173
  this.regexp = new RegExp(re, [
2849
3174
  ...flags
2850
3175
  ].join(''));
2851
- } catch (ex) {
3176
+ } catch {
2852
3177
  this.regexp = false;
2853
3178
  }
2854
3179
  return this.regexp;
2855
3180
  }
2856
3181
  slashSplit(p) {
2857
3182
  if (this.preserveMultipleSlashes) return p.split('/');
2858
- if (this.isWindows && /^\/\/[^\/]+/.test(p)) return [
3183
+ if (this.isWindows && /^\/\/[^/]+/.test(p)) return [
2859
3184
  '',
2860
3185
  ...p.split(/\/+/)
2861
3186
  ];
@@ -2874,8 +3199,7 @@ var __webpack_exports__ = {};
2874
3199
  this.debug(this.pattern, 'set', set);
2875
3200
  let filename = ff[ff.length - 1];
2876
3201
  if (!filename) for(let i = ff.length - 2; !filename && i >= 0; i--)filename = ff[i];
2877
- for(let i = 0; i < set.length; i++){
2878
- const pattern = set[i];
3202
+ for (const pattern of set){
2879
3203
  let file = ff;
2880
3204
  if (options.matchBase && 1 === pattern.length) file = [
2881
3205
  filename
@@ -3605,7 +3929,7 @@ var __webpack_exports__ = {};
3605
3929
  return external_picocolors_default().gray(issue.code + ': ') + issue.message;
3606
3930
  };
3607
3931
  }
3608
- var lib = __webpack_require__("./node_modules/.pnpm/@babel+code-frame@7.29.0/node_modules/@babel/code-frame/lib/index.js");
3932
+ var lib = __webpack_require__("./node_modules/.pnpm/@babel+code-frame@7.29.7/node_modules/@babel/code-frame/lib/index.js");
3609
3933
  const external_node_fs_namespaceObject = require("node:fs");
3610
3934
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
3611
3935
  function createCodeFrameFormatter(options) {
@@ -3613,7 +3937,7 @@ var __webpack_exports__ = {};
3613
3937
  return function(issue) {
3614
3938
  const source = issue.file && external_node_fs_default().existsSync(issue.file) && external_node_fs_default().readFileSync(issue.file, 'utf-8');
3615
3939
  let frame = '';
3616
- if (source && issue.location) frame = (0, lib.codeFrameColumns)(source, issue.location, {
3940
+ if (source && issue.location) frame = (0, lib.gl)(source, issue.location, {
3617
3941
  highlightCode: true,
3618
3942
  ...options || {}
3619
3943
  }).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 { IssueConfig, createIssueConfig };
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 { IssueLocation, compareIssueLocations, formatIssueLocation };
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 { IssueMatch, createIssuePredicateFromIssueMatch };
5
+ export { createIssuePredicateFromIssueMatch };
6
+ export type { IssueMatch };
@@ -7,4 +7,4 @@ interface IssueOptions {
7
7
  exclude?: IssuePredicateOption;
8
8
  defaultSeverity?: IssueDefaultSeverity;
9
9
  }
10
- export { IssueOptions, IssuePredicateOption };
10
+ export type { IssueOptions, IssuePredicateOption };
@@ -3,4 +3,5 @@ interface IssuePosition {
3
3
  column: number;
4
4
  }
5
5
  declare function compareIssuePositions(positionA?: IssuePosition, positionB?: IssuePosition): number;
6
- export { IssuePosition, compareIssuePositions };
6
+ export { compareIssuePositions };
7
+ export type { IssuePosition };
@@ -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 { IssuePredicate, createTrivialIssuePredicate, composeIssuePredicates };
5
+ export { createTrivialIssuePredicate, composeIssuePredicates };
6
+ export type { IssuePredicate };
@@ -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 { Issue, isIssue, deduplicateAndSortIssues };
12
+ export { isIssue, deduplicateAndSortIssues };
13
+ export type { Issue };
package/lib/logger.d.ts CHANGED
@@ -2,4 +2,4 @@ interface Logger {
2
2
  log: (message: string) => void;
3
3
  error: (message: string) => void;
4
4
  }
5
- export { Logger };
5
+ export type { Logger };
@@ -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 { TsCheckerRspackPluginConfig, createPluginConfig };
16
+ export { createPluginConfig };
17
+ export type { TsCheckerRspackPluginConfig };
@@ -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, TsCheckerRspackPluginHooks };
36
+ export { getPluginHooks };
37
+ export type { TsCheckerRspackPluginHooks };
@@ -10,4 +10,4 @@ interface TsCheckerRspackPluginOptions {
10
10
  logger?: Logger | 'webpack-infrastructure';
11
11
  devServer?: boolean;
12
12
  }
13
- export { TsCheckerRspackPluginOptions };
13
+ export type { TsCheckerRspackPluginOptions };
@@ -13,4 +13,5 @@ interface TsCheckerRspackPluginState {
13
13
  DevServerDoneTap: any | undefined;
14
14
  }
15
15
  declare function createPluginState(): TsCheckerRspackPluginState;
16
- export { TsCheckerRspackPluginState, createPluginState };
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
  }
@@ -1,5 +1,6 @@
1
1
  export { exposeRpc } from './expose-rpc';
2
2
  export { wrapRpc } from './wrap-rpc';
3
- export { createRpcWorker, getRpcWorkerData, RpcWorker } from './rpc-worker';
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';
@@ -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, RpcWorker };
12
+ export { createRpcWorker, getRpcWorkerData };
13
+ export type { RpcWorker };
@@ -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, };
@@ -9,4 +9,4 @@ interface TypeScriptConfigOverwrite {
9
9
  prepend?: boolean;
10
10
  }[];
11
11
  }
12
- export { TypeScriptConfigOverwrite };
12
+ export type { TypeScriptConfigOverwrite };
@@ -4,4 +4,4 @@ interface TypeScriptDiagnosticsOptions {
4
4
  declaration: boolean;
5
5
  global: boolean;
6
6
  }
7
- export { TypeScriptDiagnosticsOptions };
7
+ export type { TypeScriptDiagnosticsOptions };
@@ -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, TypeScriptWorkerConfig };
18
+ export { createTypeScriptWorkerConfig };
19
+ export type { TypeScriptWorkerConfig };
@@ -11,4 +11,4 @@ type TypeScriptWorkerOptions = {
11
11
  profile?: boolean;
12
12
  typescriptPath?: string;
13
13
  };
14
- export { TypeScriptWorkerOptions };
14
+ export type { TypeScriptWorkerOptions };
@@ -6,4 +6,5 @@ interface Pool {
6
6
  readonly drained: Promise<void>;
7
7
  }
8
8
  declare function createPool(size: number): Pool;
9
- export { Pool, createPool };
9
+ export { createPool };
10
+ export type { Pool };
@@ -12,4 +12,4 @@ interface WatchFileSystem {
12
12
  };
13
13
  watch: Watch;
14
14
  }
15
- export { WatchFileSystem, Watchpack };
15
+ export type { WatchFileSystem, Watchpack };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-checker-rspack-plugin",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "rspack",
@@ -21,44 +21,33 @@
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
- "@rspack/lite-tapable": "^1.1.0",
25
+ "@rspack/lite-tapable": "^1.1.1",
38
26
  "chokidar": "^3.6.0",
39
- "memfs": "^4.56.10",
27
+ "memfs": "^4.57.3",
40
28
  "picocolors": "^1.1.1"
41
29
  },
42
30
  "devDependencies": {
43
- "@babel/code-frame": "^7.29.0",
44
- "@rslib/core": "^0.19.4",
45
- "@rspack/core": "^1.7.4",
46
- "@rstest/core": "^0.8.1",
31
+ "@babel/code-frame": "^7.29.7",
32
+ "@rslib/core": "^0.22.0",
33
+ "@rslint/core": "^0.5.3",
34
+ "@rspack/core": "^2.0.5",
35
+ "@rstest/core": "^0.10.3",
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.10.9",
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.2",
43
+ "minimatch": "^10.2.5",
55
44
  "mock-fs": "^5.5.0",
56
- "prettier": "^3.8.1",
57
- "strip-ansi": "^6.0.1",
58
- "typescript": "^5.9.3"
45
+ "prettier": "^3.8.3",
46
+ "strip-ansi": "^7.2.0",
47
+ "typescript": "^6.0.3"
59
48
  },
60
49
  "peerDependencies": {
61
- "@rspack/core": "^1.0.0 || ^2.0.0-0",
50
+ "@rspack/core": "^1.0.0 || ^2.0.0",
62
51
  "typescript": ">=3.8.0"
63
52
  },
64
53
  "peerDependenciesMeta": {
@@ -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
+ }