@rushstack/package-extractor 0.10.39 → 0.10.40

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/CHANGELOG.json CHANGED
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "name": "@rushstack/package-extractor",
3
3
  "entries": [
4
+ {
5
+ "version": "0.10.40",
6
+ "tag": "@rushstack/package-extractor_v0.10.40",
7
+ "date": "Tue, 30 Sep 2025 23:57:45 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.15.1`"
12
+ },
13
+ {
14
+ "comment": "Updating dependency \"@rushstack/terminal\" to `0.18.0`"
15
+ },
16
+ {
17
+ "comment": "Updating dependency \"@rushstack/ts-command-line\" to `5.0.5`"
18
+ },
19
+ {
20
+ "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `1.0.0`"
21
+ },
22
+ {
23
+ "comment": "Updating dependency \"@rushstack/heft\" to `1.0.0`"
24
+ },
25
+ {
26
+ "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.110`"
27
+ }
28
+ ]
29
+ }
30
+ },
4
31
  {
5
32
  "version": "0.10.39",
6
33
  "tag": "@rushstack/package-extractor_v0.10.39",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log - @rushstack/package-extractor
2
2
 
3
- This log was last generated on Tue, 30 Sep 2025 20:33:51 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 30 Sep 2025 23:57:45 GMT and should not be manually modified.
4
+
5
+ ## 0.10.40
6
+ Tue, 30 Sep 2025 23:57:45 GMT
7
+
8
+ _Version update only_
4
9
 
5
10
  ## 0.10.39
6
11
  Tue, 30 Sep 2025 20:33:51 GMT
@@ -3245,17 +3245,46 @@ const TerminalWritable_1 = __webpack_require__(/*! ./TerminalWritable */ 33900);
3245
3245
  class SplitterTransform extends TerminalWritable_1.TerminalWritable {
3246
3246
  constructor(options) {
3247
3247
  super();
3248
- this.destinations = [...options.destinations];
3248
+ this._destinations = new Set(options.destinations);
3249
+ }
3250
+ get destinations() {
3251
+ return this._destinations;
3252
+ }
3253
+ /**
3254
+ * Adds a destination to the set of destinations. Duplicates are ignored.
3255
+ * Only new chunks received after the destination is added will be sent to it.
3256
+ * @param destination - The destination to add.
3257
+ */
3258
+ addDestination(destination) {
3259
+ this._destinations.add(destination);
3260
+ }
3261
+ /**
3262
+ * Removes a destination from the set of destinations. It will no longer receive chunks, and will be closed, unless
3263
+ * `destination.preventAutoclose` is set to `true`.
3264
+ * @param destination - The destination to remove.
3265
+ * @param close - If `true` (default), the destination will be closed when removed, unless `destination.preventAutoclose` is set to `true`.
3266
+ * @returns `true` if the destination was removed, `false` if it was not found.
3267
+ * @remarks
3268
+ * If the destination is not found, it will not be closed.
3269
+ */
3270
+ removeDestination(destination, close = true) {
3271
+ if (this._destinations.delete(destination)) {
3272
+ if (close && !destination.preventAutoclose) {
3273
+ destination.close();
3274
+ }
3275
+ return true;
3276
+ }
3277
+ return false;
3249
3278
  }
3250
3279
  onWriteChunk(chunk) {
3251
- for (const destination of this.destinations) {
3280
+ for (const destination of this._destinations) {
3252
3281
  destination.writeChunk(chunk);
3253
3282
  }
3254
3283
  }
3255
3284
  onClose() {
3256
3285
  const errors = [];
3257
3286
  // If an exception is thrown, try to ensure that the other destinations get closed properly
3258
- for (const destination of this.destinations) {
3287
+ for (const destination of this._destinations) {
3259
3288
  if (!destination.preventAutoclose) {
3260
3289
  try {
3261
3290
  destination.close();
@@ -3265,6 +3294,7 @@ class SplitterTransform extends TerminalWritable_1.TerminalWritable {
3265
3294
  }
3266
3295
  }
3267
3296
  }
3297
+ this._destinations.clear();
3268
3298
  if (errors.length > 0) {
3269
3299
  throw errors[0];
3270
3300
  }
@@ -16973,6 +17003,8 @@ function applyPatternCaptures(spec, reMatch, captures, defaultSeverity) {
16973
17003
  }
16974
17004
  }
16975
17005
  function finalizeProblem(matcherName, captures, defaultSeverity) {
17006
+ // For multi-line patterns, use only the last non-empty message part
17007
+ const message = captures.messageParts.length > 0 ? captures.messageParts[captures.messageParts.length - 1] : '';
16976
17008
  return {
16977
17009
  matcherName,
16978
17010
  file: captures.file,
@@ -16982,7 +17014,7 @@ function finalizeProblem(matcherName, captures, defaultSeverity) {
16982
17014
  endColumn: captures.endColumn,
16983
17015
  severity: captures.severity || defaultSeverity,
16984
17016
  code: captures.code,
16985
- message: captures.messageParts.join('\n')
17017
+ message: message
16986
17018
  };
16987
17019
  }
16988
17020
  function createSingleLineMatcher(name, compiled, defaultSeverity) {
@@ -72697,6 +72729,7 @@ class ProblemCollector extends TerminalWritable_1.TerminalWritable {
72697
72729
  if (this._matchers.length === 0) {
72698
72730
  throw new Error('ProblemCollector requires at least one problem matcher.');
72699
72731
  }
72732
+ this._onProblem = options.onProblem;
72700
72733
  }
72701
72734
  /**
72702
72735
  * {@inheritdoc IProblemCollector}
@@ -72708,6 +72741,7 @@ class ProblemCollector extends TerminalWritable_1.TerminalWritable {
72708
72741
  * {@inheritdoc TerminalWritable}
72709
72742
  */
72710
72743
  onWriteChunk(chunk) {
72744
+ var _a;
72711
72745
  const text = chunk.text;
72712
72746
  if (text.length === 0 || text[text.length - 1] !== '\n') {
72713
72747
  throw new Error('ProblemCollector expects chunks that were split into newline terminated lines. ' +
@@ -72722,6 +72756,7 @@ class ProblemCollector extends TerminalWritable_1.TerminalWritable {
72722
72756
  matcherName: matcher.name
72723
72757
  };
72724
72758
  this._problems.add(finalized);
72759
+ (_a = this._onProblem) === null || _a === void 0 ? void 0 : _a.call(this, finalized);
72725
72760
  }
72726
72761
  }
72727
72762
  }
@@ -72729,6 +72764,7 @@ class ProblemCollector extends TerminalWritable_1.TerminalWritable {
72729
72764
  * {@inheritdoc TerminalWritable}
72730
72765
  */
72731
72766
  onClose() {
72767
+ var _a;
72732
72768
  for (const matcher of this._matchers) {
72733
72769
  if (matcher.flush) {
72734
72770
  const flushed = matcher.flush();
@@ -72739,6 +72775,7 @@ class ProblemCollector extends TerminalWritable_1.TerminalWritable {
72739
72775
  matcherName: matcher.name
72740
72776
  };
72741
72777
  this._problems.add(finalized);
72778
+ (_a = this._onProblem) === null || _a === void 0 ? void 0 : _a.call(this, finalized);
72742
72779
  }
72743
72780
  }
72744
72781
  }