Skip to content

Commit

Permalink
fix: stats typescript wrong (#7466)
Browse files Browse the repository at this point in the history
* fix: stats typescript wrong

* fix: remove comment
  • Loading branch information
SyMind authored Aug 6, 2024
1 parent c0ea8ac commit f420048
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 103 deletions.
3 changes: 1 addition & 2 deletions packages/rspack-test-tools/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import type { Stats as Stats_2 } from 'webpack';
import type { StatsCompilation } from '@rspack/core';
import type { StatsCompilation as StatsCompilation_2 } from 'webpack';
import type { StatsError } from '@rspack/core';
import type { StatsWarnings } from '@rspack/core';
import { TRunnerRequirer as TRunnerRequirer_2 } from '..';
import type { WebpackOptionsNormalized } from 'webpack';

Expand Down Expand Up @@ -1426,7 +1425,7 @@ export type TStatsAPICaseConfig = Omit<IStatsAPIProcessorOptions<ECompilerType.R
// @public (undocumented)
type TStatsDiagnostics = {
errors: StatsError[];
warnings: StatsWarnings[];
warnings: StatsError[];
};

// @public (undocumented)
Expand Down
6 changes: 3 additions & 3 deletions packages/rspack-test-tools/src/processor/error.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type fs from "node:fs";
import path from "node:path";
import type { StatsError, StatsWarnings } from "@rspack/core";
import type { StatsError } from "@rspack/core";
import prettyFormat from "pretty-format";
import merge from "webpack-merge";

Expand All @@ -15,7 +15,7 @@ import { SimpleTaskProcessor } from "./simple";

type TStatsDiagnostics = {
errors: StatsError[];
warnings: StatsWarnings[];
warnings: StatsError[];
};

const CWD_PATTERN = new RegExp(
Expand Down Expand Up @@ -163,7 +163,7 @@ export class ErrorProcessor<

await this._errorOptions.check?.({
errors: errors as StatsError[],
warnings: warnings as StatsWarnings[]
warnings: warnings as StatsError[]
});
}

Expand Down
Loading

2 comments on commit f420048

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rsbuild ❌ failure
examples ✅ success

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-08-06 9347ecc) Current Change
10000_development-mode + exec 2.32 s ± 38 ms 2.32 s ± 19 ms -0.06 %
10000_development-mode_hmr + exec 708 ms ± 18 ms 716 ms ± 8.7 ms +1.09 %
10000_production-mode + exec 2.86 s ± 26 ms 2.9 s ± 37 ms +1.50 %
arco-pro_development-mode + exec 1.86 s ± 68 ms 1.88 s ± 85 ms +0.70 %
arco-pro_development-mode_hmr + exec 434 ms ± 0.91 ms 433 ms ± 4.3 ms -0.17 %
arco-pro_production-mode + exec 3.44 s ± 91 ms 3.42 s ± 96 ms -0.58 %
threejs_development-mode_10x + exec 1.7 s ± 15 ms 1.72 s ± 16 ms +1.33 %
threejs_development-mode_10x_hmr + exec 808 ms ± 9.6 ms 830 ms ± 14 ms +2.66 %
threejs_production-mode_10x + exec 5.49 s ± 21 ms 5.52 s ± 31 ms +0.59 %

Please sign in to comment.