@rsdoctor/types 1.3.11 → 1.3.13-beta.0

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,6 +14,10 @@ interface StatsOptionsObj {
14
14
  chunkModules?: boolean;
15
15
  hash?: boolean;
16
16
  ids?: boolean;
17
+ orphanModules?: boolean;
18
+ runtimeModules?: boolean;
19
+ cachedModules?: boolean;
20
+ nestedModules?: boolean;
17
21
  /** Rspack not support below opts */
18
22
  cachedAssets?: boolean;
19
23
  groupAssetsByInfo?: boolean;
@@ -60,6 +64,10 @@ export interface StatsModule {
60
64
  assets?: Array<string | number>;
61
65
  reasons?: Array<StatsModuleReason>;
62
66
  source?: string | Buffer;
67
+ orphanModules?: Array<StatsModule>;
68
+ runtimeModules?: Array<StatsModule>;
69
+ cachedModules?: Array<StatsModule>;
70
+ nestedModules?: Array<StatsModule>;
63
71
  nameForCondition?: string;
64
72
  depth?: number | string;
65
73
  loc?: string;
@@ -1,4 +1,5 @@
1
- import type { RsdoctorPluginData } from '@rspack/core';
1
+ import type { RsdoctorPluginData, NormalModuleFactory, LoaderDefinitionFunction, ModuleGraph, Dependency } from '@rspack/core';
2
+ export type RspackNormalModuleFactory = NormalModuleFactory;
2
3
  export type RspackNativeAsset = RsdoctorPluginData.RsdoctorAsset;
3
4
  export type RspackNativeChunkGraph = RsdoctorPluginData.RsdoctorChunkGraph;
4
5
  export type RspackNativeModuleGraph = RsdoctorPluginData.RsdoctorModuleGraph;
@@ -20,3 +21,17 @@ export type RspackNativeModuleOriginalSource = RsdoctorPluginData.RsdoctorModule
20
21
  export type RspackNativeModuleSourcePatch = RsdoctorPluginData.RsdoctorModuleSourcesPatch;
21
22
  import rspack from '@rspack/core';
22
23
  export type RspackExportsExperiments = typeof rspack.experiments;
24
+ export type RspackSourceMapInput = Parameters<LoaderDefinitionFunction>[1];
25
+ export type RspackEntryPoint = boolean | 'auto';
26
+ export interface RspackExportInfo {
27
+ used: boolean;
28
+ provideInfo: boolean | null | undefined;
29
+ useInfo: boolean | null | undefined;
30
+ canMangle: boolean;
31
+ }
32
+ export type RspackExportsInfo = ReturnType<ModuleGraph['getExportsInfo']>;
33
+ export interface RspackHarmonyImportSpecifierDependency extends Dependency {
34
+ getIds(graph: ModuleGraph): string[];
35
+ name: string;
36
+ userRequest: string;
37
+ }
@@ -9,9 +9,9 @@ import { RuntimeContext, RuntimeContextOptions } from './context';
9
9
  import { Hooks } from './hooks';
10
10
  import { ChunkGraphInstance } from './chunk';
11
11
  import { RsdoctorServerInstance } from './server';
12
- import { PlainObject } from '@/common';
13
- import { BriefModeOptions } from '@/config';
14
- import { EmoCheckData } from '@/emo';
12
+ import { PlainObject } from '../common';
13
+ import { BriefModeOptions } from '../config';
14
+ import { EmoCheckData } from '../emo';
15
15
  import { SummaryData } from './summary';
16
16
  import { ConfigData } from './config';
17
17
  export type WriteStoreOptionsType = {};
@@ -265,7 +265,7 @@ export interface ModuleGraphInstance {
265
265
  /** get module by webpackId */
266
266
  getModuleByWebpackId(webpackId: string): ModuleInstance | undefined;
267
267
  /** Get module by path */
268
- getModuleByFile(file: string): ModuleInstance[] | [];
268
+ getModuleByFile(file: string, layer?: string): ModuleInstance[] | [];
269
269
  /** Add Module */
270
270
  addModule(module: ModuleInstance): void;
271
271
  /** Add module connection */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/types",
3
- "version": "1.3.11",
3
+ "version": "1.3.13-beta.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -19,9 +19,9 @@
19
19
  "source-map": "^0.7.6"
20
20
  },
21
21
  "devDependencies": {
22
- "@rspack/core": "1.6.3",
22
+ "@rspack/core": "1.6.5",
23
23
  "@types/node": "^22.8.1",
24
- "@types/react": "^18.3.26",
24
+ "@types/react": "^18.3.27",
25
25
  "tslib": "2.8.1",
26
26
  "typescript": "^5.9.2"
27
27
  },