@rsdoctor/webpack-plugin 0.0.2-beta.2 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import { Linter } from '@rsdoctor/types';
1
+ import type { Linter } from '@rsdoctor/types';
2
2
  import type { RsdoctorWebpackMultiplePluginOptions } from '@rsdoctor/core';
3
3
  import { RsdoctorWebpackPlugin } from './plugin';
4
4
  export declare class RsdoctorWebpackMultiplePlugin<Rules extends Linter.ExtendRuleData[]> extends RsdoctorWebpackPlugin<Rules> {
package/dist/plugin.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { RsdoctorPluginInstance, RsdoctorPluginOptionsNormalized, RsdoctorW
2
2
  import { ChunkGraph, ModuleGraph } from '@rsdoctor/graph';
3
3
  import { RsdoctorWebpackSDK } from '@rsdoctor/sdk';
4
4
  import { Linter } from '@rsdoctor/types';
5
- import { Compiler } from 'webpack';
5
+ import type { Compiler } from 'webpack';
6
6
  export declare class RsdoctorWebpackPlugin<Rules extends Linter.ExtendRuleData[]> implements RsdoctorPluginInstance<Compiler, Rules> {
7
7
  readonly name = "RsdoctorWebpackPlugin";
8
8
  readonly options: RsdoctorPluginOptionsNormalized<Rules>;
@@ -97,7 +97,7 @@ class RsdoctorResolverPlugin {
97
97
  getResolveRequest(request, ctx) {
98
98
  if (request)
99
99
  return request;
100
- if (ctx && ctx.stack) {
100
+ if (ctx?.stack) {
101
101
  const [target] = [...ctx.stack].map((e) => e.split(" ").map((e2) => e2.trim())).filter((e) => e.length > 2);
102
102
  if (target) {
103
103
  return target[target.length - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/webpack-plugin",
3
- "version": "0.0.2-beta.2",
3
+ "version": "0.1.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -16,10 +16,10 @@
16
16
  "fs-extra": "^11.1.1",
17
17
  "lodash": "^4.17.21",
18
18
  "webpack": "^5.89.0",
19
- "@rsdoctor/core": "0.0.2-beta.2",
20
- "@rsdoctor/sdk": "0.0.2-beta.2",
21
- "@rsdoctor/utils": "0.0.2-beta.2",
22
- "@rsdoctor/graph": "0.0.2-beta.2"
19
+ "@rsdoctor/core": "0.1.0",
20
+ "@rsdoctor/utils": "0.1.0",
21
+ "@rsdoctor/graph": "0.1.0",
22
+ "@rsdoctor/sdk": "0.1.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/fs-extra": "^11.0.2",
@@ -29,7 +29,7 @@
29
29
  "@types/webpack": "5.28.0",
30
30
  "tslib": "2.4.1",
31
31
  "typescript": "^5.2.2",
32
- "@rsdoctor/types": "0.0.2-beta.2"
32
+ "@rsdoctor/types": "0.1.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",