Skip to content

Commit

Permalink
chore(api-extractor): exclude warning and add forgotten exports to re…
Browse files Browse the repository at this point in the history
…port (#6352)

chore: exclude warning and add forgotten exports to report
  • Loading branch information
h-a-n-a authored Apr 24, 2024
1 parent 8ea3432 commit 9e5a265
Show file tree
Hide file tree
Showing 4 changed files with 7,694 additions and 757 deletions.
8 changes: 6 additions & 2 deletions api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/"
*/
"reportTempFolder": "<projectFolder>/temp/"
"reportTempFolder": "<projectFolder>/temp/",

/**
* Whether "forgotten exports" should be included in the API report file. Forgotten exports are declarations
Expand All @@ -191,7 +191,7 @@
*
* DEFAULT VALUE: "false"
*/
// "includeForgottenExports": false
"includeForgottenExports": true
},

/**
Expand Down Expand Up @@ -402,6 +402,10 @@
},
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-forgotten-export": {
"logLevel": "none",
"addToApiReportFile": false
}

// "ae-extra-release-tag": {
Expand Down
43 changes: 42 additions & 1 deletion packages/rspack-dev-server/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,54 @@ import WebpackDevServer from 'webpack-dev-server';

export { Configuration }

// @public (undocumented)
interface ResolvedDevServer extends Configuration {
// (undocumented)
allowedHosts: "auto" | string[] | "all";
// (undocumented)
bonjour: false | Record<string, never> | WebpackDevServer.BonjourOptions;
// (undocumented)
client: WebpackDevServer.ClientConfiguration;
// (undocumented)
compress: boolean;
// (undocumented)
devMiddleware: Configuration["devMiddleware"];
// (undocumented)
historyApiFallback: false | WebpackDevServer.ConnectHistoryApiFallbackOptions;
// (undocumented)
host?: string;
// (undocumented)
hot: boolean | "only";
// (undocumented)
ipc: string | undefined;
// (undocumented)
liveReload: boolean;
// (undocumented)
magicHtml: boolean;
// (undocumented)
open: WebpackDevServer.Open[];
// (undocumented)
port: number | string;
// (undocumented)
proxy: WebpackDevServer.ProxyConfigArray;
// (undocumented)
server: WebpackDevServer.ServerConfiguration;
// (undocumented)
setupExitSignals: boolean;
// (undocumented)
static: false | Array<WebpackDevServer.NormalizedStatic>;
// (undocumented)
watchFiles: WebpackDevServer.WatchFiles[];
// (undocumented)
webSocketServer: false | WebpackDevServer.WebSocketServerConfiguration;
}

// @public (undocumented)
export class RspackDevServer extends WebpackDevServer {
constructor(options: Configuration, compiler: Compiler | MultiCompiler);
compiler: Compiler | MultiCompiler;
// (undocumented)
initialize(): Promise<void>;
// Warning: (ae-forgotten-export) The symbol "ResolvedDevServer" needs to be exported by the entry point index.d.ts
options: ResolvedDevServer;
// (undocumented)
server: Server;
Expand Down
18 changes: 12 additions & 6 deletions packages/rspack-test-tools/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ export class HookTaskProcessor extends SnapshotProcessor<ECompilerType.Rspack> {
constructor(hookOptions: IHookProcessorOptions<ECompilerType.Rspack>);
// (undocumented)
config(context: ITestContext): Promise<void>;
// Warning: (ae-forgotten-export) The symbol "IHookProcessorOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
protected hookOptions: IHookProcessorOptions<ECompilerType.Rspack>;
}
Expand Down Expand Up @@ -405,6 +403,12 @@ export interface IFormatCodeOptions {
replacements?: Record<string, string>;
}

// @public (undocumented)
interface IHookProcessorOptions<T extends ECompilerType> extends ISnapshotProcessorOptions<T> {
// (undocumented)
options?: (context: ITestContext) => TCompilerOptions<T>;
}

// @public (undocumented)
export interface IMultiTaskProcessorOptions<T extends ECompilerType = ECompilerType.Rspack> {
// (undocumented)
Expand Down Expand Up @@ -473,14 +477,10 @@ export interface IRspackStatsProcessorOptions<T extends ECompilerType.Rspack> {

// @public (undocumented)
export interface IRspackWatchProcessorOptions {
// Warning: (ae-forgotten-export) The symbol "TRspackExperiments" needs to be exported by the entry point index.d.ts
//
// (undocumented)
experiments?: TRspackExperiments;
// (undocumented)
name: string;
// Warning: (ae-forgotten-export) The symbol "TRspackOptimization" needs to be exported by the entry point index.d.ts
//
// (undocumented)
optimization?: TRspackOptimization;
// (undocumented)
Expand Down Expand Up @@ -1106,6 +1106,12 @@ export type TModuleObject = {
// @public (undocumented)
export type TModuleTypeId = "normal" | "runtime";

// @public (undocumented)
type TRspackExperiments = TCompilerOptions<ECompilerType.Rspack>["experiments"];

// @public (undocumented)
type TRspackOptimization = TCompilerOptions<ECompilerType.Rspack>["optimization"];

// @public (undocumented)
export interface TRunnerFactory<T extends ECompilerType> {
// (undocumented)
Expand Down
Loading

2 comments on commit 9e5a265

@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, self-hosted, Linux, ci ❌ failure
_selftest, ubuntu-latest ✅ success
nx, ubuntu-latest ✅ success
rspress, ubuntu-latest ❌ failure
rsbuild, ubuntu-latest ❌ failure
compat, ubuntu-latest ✅ success
examples, ubuntu-latest ✅ 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-04-24 332b127) Current Change
10000_development-mode + exec 2.66 s ± 28 ms 2.69 s ± 24 ms +0.97 %
10000_development-mode_hmr + exec 682 ms ± 3.7 ms 685 ms ± 2.6 ms +0.49 %
10000_production-mode + exec 2.46 s ± 31 ms 2.51 s ± 18 ms +2.01 %
arco-pro_development-mode + exec 2.48 s ± 86 ms 2.5 s ± 79 ms +0.88 %
arco-pro_development-mode_hmr + exec 429 ms ± 1.2 ms 429 ms ± 2.7 ms +0.05 %
arco-pro_development-mode_hmr_intercept-plugin + exec 441 ms ± 5.4 ms 442 ms ± 1.8 ms +0.19 %
arco-pro_development-mode_intercept-plugin + exec 3.22 s ± 88 ms 3.2 s ± 65 ms -0.68 %
arco-pro_production-mode + exec 3.95 s ± 74 ms 4.02 s ± 71 ms +1.81 %
arco-pro_production-mode_intercept-plugin + exec 4.66 s ± 238 ms 4.79 s ± 86 ms +2.82 %
threejs_development-mode_10x + exec 2.05 s ± 16 ms 2.07 s ± 23 ms +0.64 %
threejs_development-mode_10x_hmr + exec 753 ms ± 13 ms 752 ms ± 14 ms -0.11 %
threejs_production-mode_10x + exec 5.14 s ± 40 ms 5.17 s ± 38 ms +0.76 %

Please sign in to comment.