@rsdoctor/rspack-plugin 1.5.11 → 2.0.0-alpha.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.
package/dist/index.cjs CHANGED
@@ -25,7 +25,7 @@ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_expo
25
25
  RsdoctorRspackPlugin: ()=>RsdoctorRspackPlugin
26
26
  });
27
27
  const build_utils_namespaceObject = require("@rsdoctor/core/build-utils"), plugins_namespaceObject = require("@rsdoctor/core/plugins"), sdk_namespaceObject = require("@rsdoctor/sdk"), types_namespaceObject = require("@rsdoctor/types"), external_path_namespaceObject = require("path");
28
- var external_path_default = __webpack_require__.n(external_path_namespaceObject), package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.11","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
28
+ var external_path_default = __webpack_require__.n(external_path_namespaceObject), package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"2.0.0-alpha.0","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
29
29
  const pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
30
30
  name: pluginTapName,
31
31
  stage: 999
@@ -77,8 +77,8 @@ class RsdoctorRspackPlugin {
77
77
  ...pluginTapPostOptions,
78
78
  stage: pluginTapPostOptions.stage + 100
79
79
  }, this.done.bind(this, compiler)), new plugins_namespaceObject.InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new build_utils_namespaceObject.Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
80
- types_namespaceObject.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders
81
- ]), common_namespaceObject.Loader.isVue(compiler) || new plugins_namespaceObject.InternalLoaderPlugin(this).apply(compiler)), this.options.features.plugins && new plugins_namespaceObject.InternalPluginsPlugin(this).apply(compiler), this.options.features.bundle && (new plugins_namespaceObject.InternalBundlePlugin(this).apply(compiler), new plugins_namespaceObject.InternalBundleTagPlugin(this).apply(compiler)), this.options.features.resolver && new plugins_namespaceObject.InternalResolverPlugin(this).apply(compiler), new plugins_namespaceObject.InternalRulesPlugin(this).apply(compiler), new plugins_namespaceObject.InternalErrorReporterPlugin(this).apply(compiler);
80
+ types_namespaceObject.Manifest.RsdoctorManifestClientRoutes.Loaders
81
+ ]), common_namespaceObject.Loader.isVue(compiler) || new plugins_namespaceObject.InternalLoaderPlugin(this).apply(compiler)), this.options.features.plugins && new plugins_namespaceObject.InternalPluginsPlugin(this).apply(compiler), this.options.features.bundle && new plugins_namespaceObject.InternalBundlePlugin(this).apply(compiler), this.options.features.resolver && new plugins_namespaceObject.InternalResolverPlugin(this).apply(compiler), new plugins_namespaceObject.InternalRulesPlugin(this).apply(compiler), new plugins_namespaceObject.InternalErrorReporterPlugin(this).apply(compiler);
82
82
  let RsdoctorRspackNativePlugin = compiler.webpack.experiments?.RsdoctorPlugin;
83
83
  if (RsdoctorRspackNativePlugin) {
84
84
  logger_namespaceObject.logger.debug('[RspackNativePlugin] Enabled');
@@ -121,10 +121,10 @@ class RsdoctorRspackPlugin {
121
121
  (0, logger_namespaceObject.time)('RsdoctorRspackPlugin.getRspackConfig');
122
122
  try {
123
123
  if (compiler.isChild()) return;
124
- let configuration = (0, plugins_namespaceObject.processCompilerConfig)(compiler.options), rspackVersion = compiler.webpack?.rspackVersion, webpackVersion = compiler.webpack?.version;
124
+ let configuration = (0, plugins_namespaceObject.processCompilerConfig)(compiler.options), rspackVersion = compiler.webpack?.rspackVersion || compiler.webpack?.version;
125
125
  this.sdk.reportConfiguration({
126
- name: rspackVersion ? 'rspack' : 'webpack',
127
- version: rspackVersion || webpackVersion || 'unknown',
126
+ name: 'rspack',
127
+ version: rspackVersion || 'unknown',
128
128
  config: configuration,
129
129
  root: (0, sdk_namespaceObject.findRoot)() || ''
130
130
  });
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  let globalController;
2
2
  import { Loader } from "@rsdoctor/core/build-utils";
3
- import { InternalBundlePlugin, InternalBundleTagPlugin, InternalErrorReporterPlugin, InternalLoaderPlugin, InternalPluginsPlugin, InternalResolverPlugin, InternalRulesPlugin, InternalSummaryPlugin, ensureModulesChunksGraphFn, handleBriefModeReport, normalizeRspackUserOptions, normalizeUserConfig, processCompilerConfig, setSDK } from "@rsdoctor/core/plugins";
3
+ import { InternalBundlePlugin, InternalErrorReporterPlugin, InternalLoaderPlugin, InternalPluginsPlugin, InternalResolverPlugin, InternalRulesPlugin, InternalSummaryPlugin, ensureModulesChunksGraphFn, handleBriefModeReport, normalizeRspackUserOptions, normalizeUserConfig, processCompilerConfig, setSDK } from "@rsdoctor/core/plugins";
4
4
  import { RsdoctorSDK, RsdoctorSDKController, findRoot } from "@rsdoctor/sdk";
5
5
  import { Constants, Manifest, SDK } from "@rsdoctor/types";
6
6
  import path from "path";
7
7
  import { ModuleGraph } from "@rsdoctor/graph";
8
8
  import { Loader as common_Loader } from "@rsdoctor/utils/common";
9
9
  import { logger, time, timeEnd } from "@rsdoctor/utils/logger";
10
- var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.11","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
10
+ var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"2.0.0-alpha.0","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
11
11
  let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
12
12
  name: pluginTapName,
13
13
  stage: 999
@@ -52,8 +52,8 @@ class RsdoctorRspackPlugin {
52
52
  ...pluginTapPostOptions,
53
53
  stage: pluginTapPostOptions.stage + 100
54
54
  }, this.done.bind(this, compiler)), new InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
55
- Manifest.RsdoctorManifestClientRoutes.WebpackLoaders
56
- ]), common_Loader.isVue(compiler) || new InternalLoaderPlugin(this).apply(compiler)), this.options.features.plugins && new InternalPluginsPlugin(this).apply(compiler), this.options.features.bundle && (new InternalBundlePlugin(this).apply(compiler), new InternalBundleTagPlugin(this).apply(compiler)), this.options.features.resolver && new InternalResolverPlugin(this).apply(compiler), new InternalRulesPlugin(this).apply(compiler), new InternalErrorReporterPlugin(this).apply(compiler);
55
+ Manifest.RsdoctorManifestClientRoutes.Loaders
56
+ ]), common_Loader.isVue(compiler) || new InternalLoaderPlugin(this).apply(compiler)), this.options.features.plugins && new InternalPluginsPlugin(this).apply(compiler), this.options.features.bundle && new InternalBundlePlugin(this).apply(compiler), this.options.features.resolver && new InternalResolverPlugin(this).apply(compiler), new InternalRulesPlugin(this).apply(compiler), new InternalErrorReporterPlugin(this).apply(compiler);
57
57
  let RsdoctorRspackNativePlugin = compiler.webpack.experiments?.RsdoctorPlugin;
58
58
  if (RsdoctorRspackNativePlugin) {
59
59
  logger.debug('[RspackNativePlugin] Enabled');
@@ -96,10 +96,10 @@ class RsdoctorRspackPlugin {
96
96
  time('RsdoctorRspackPlugin.getRspackConfig');
97
97
  try {
98
98
  if (compiler.isChild()) return;
99
- let configuration = processCompilerConfig(compiler.options), rspackVersion = compiler.webpack?.rspackVersion, webpackVersion = compiler.webpack?.version;
99
+ let configuration = processCompilerConfig(compiler.options), rspackVersion = compiler.webpack?.rspackVersion || compiler.webpack?.version;
100
100
  this.sdk.reportConfiguration({
101
- name: rspackVersion ? 'rspack' : 'webpack',
102
- version: rspackVersion || webpackVersion || 'unknown',
101
+ name: 'rspack',
102
+ version: rspackVersion || 'unknown',
103
103
  config: configuration,
104
104
  root: findRoot() || ''
105
105
  });
package/dist/plugin.d.cts CHANGED
@@ -13,10 +13,10 @@ export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]>
13
13
  constructor(options?: RsdoctorRspackPluginOptions<Rules>);
14
14
  apply(compiler: unknown): unknown;
15
15
  /**
16
- * @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis;
16
+ * @description Generate ModuleGraph and ChunkGraph from stats and Rspack module APIs.
17
17
  * @param {Compiler} compiler
18
18
  * @return {*}
19
- * @memberof RsdoctorWebpackPlugin
19
+ * @memberof RsdoctorRspackPlugin
20
20
  */
21
21
  ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
22
22
  afterPlugins: (compiler: Plugin.BaseCompilerType<"rspack">) => void;
package/dist/plugin.d.ts CHANGED
@@ -13,10 +13,10 @@ export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]>
13
13
  constructor(options?: RsdoctorRspackPluginOptions<Rules>);
14
14
  apply(compiler: unknown): unknown;
15
15
  /**
16
- * @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis;
16
+ * @description Generate ModuleGraph and ChunkGraph from stats and Rspack module APIs.
17
17
  * @param {Compiler} compiler
18
18
  * @return {*}
19
- * @memberof RsdoctorWebpackPlugin
19
+ * @memberof RsdoctorRspackPlugin
20
20
  */
21
21
  ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
22
22
  afterPlugins: (compiler: Plugin.BaseCompilerType<"rspack">) => void;
@@ -9,12 +9,12 @@ export interface RsdoctorRspackPluginOptions {
9
9
  /**
10
10
  * the switch for the Rsdoctor features.
11
11
  */
12
- features?: Plugin.RsdoctorWebpackPluginOptions<[]>['features'];
12
+ features?: Plugin.RsdoctorRspackPluginOptions<[]>['features'];
13
13
  /**
14
- * configuration of the interceptor for webpack loaders.
14
+ * configuration of the interceptor for bundler loaders.
15
15
  * @description worked when the `features.loader === true`.
16
16
  */
17
- loaderInterceptorOptions?: Plugin.RsdoctorWebpackPluginOptions<[
17
+ loaderInterceptorOptions?: Plugin.RsdoctorRspackPluginOptions<[
18
18
  ]>['loaderInterceptorOptions'];
19
19
  }
20
20
  export interface RsdoctorRspackPluginInstance extends RspackPluginInstance {
@@ -9,12 +9,12 @@ export interface RsdoctorRspackPluginOptions {
9
9
  /**
10
10
  * the switch for the Rsdoctor features.
11
11
  */
12
- features?: Plugin.RsdoctorWebpackPluginOptions<[]>['features'];
12
+ features?: Plugin.RsdoctorRspackPluginOptions<[]>['features'];
13
13
  /**
14
- * configuration of the interceptor for webpack loaders.
14
+ * configuration of the interceptor for bundler loaders.
15
15
  * @description worked when the `features.loader === true`.
16
16
  */
17
- loaderInterceptorOptions?: Plugin.RsdoctorWebpackPluginOptions<[
17
+ loaderInterceptorOptions?: Plugin.RsdoctorRspackPluginOptions<[
18
18
  ]>['loaderInterceptorOptions'];
19
19
  }
20
20
  export interface RsdoctorRspackPluginInstance extends RspackPluginInstance {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/rspack-plugin",
3
- "version": "1.5.11",
3
+ "version": "2.0.0-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -26,18 +26,18 @@
26
26
  },
27
27
  "type": "module",
28
28
  "dependencies": {
29
- "@rsdoctor/core": "1.5.11",
30
- "@rsdoctor/graph": "1.5.11",
31
- "@rsdoctor/types": "1.5.11",
32
- "@rsdoctor/sdk": "1.5.11",
33
- "@rsdoctor/utils": "1.5.11"
29
+ "@rsdoctor/core": "2.0.0-alpha.0",
30
+ "@rsdoctor/sdk": "2.0.0-alpha.0",
31
+ "@rsdoctor/graph": "2.0.0-alpha.0",
32
+ "@rsdoctor/types": "2.0.0-alpha.0",
33
+ "@rsdoctor/utils": "2.0.0-alpha.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@rspack/core": "2.0.2",
37
- "@types/node": "^22.8.1",
36
+ "@rspack/core": "2.0.4",
37
+ "@types/node": "^24.12.3",
38
38
  "@types/tapable": "2.3.0",
39
39
  "tslib": "2.8.1",
40
- "typescript": "^5.9.2"
40
+ "typescript": "^6.0.3"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@rspack/core": "*"