@rsdoctor/graph 0.0.2-beta.0 → 0.0.2-beta.2
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.
@@ -154,10 +154,14 @@ class Module {
|
|
154
154
|
source: this.source.source,
|
155
155
|
transformed: "",
|
156
156
|
parsedSource: ""
|
157
|
-
} : {
|
157
|
+
} : type === import_types.SDK.ToDataType.All ? {
|
158
158
|
source: this.source.source,
|
159
159
|
transformed: this.source.transformed,
|
160
160
|
parsedSource: this.source.parsedSource
|
161
|
+
} : {
|
162
|
+
source: this.source.source,
|
163
|
+
transformed: "",
|
164
|
+
parsedSource: this.source.parsedSource
|
161
165
|
};
|
162
166
|
}
|
163
167
|
setSourceMap(sourceMap) {
|
@@ -156,7 +156,9 @@ class PackageGraph {
|
|
156
156
|
}
|
157
157
|
getDuplicatePackages() {
|
158
158
|
return (0, import_lodash.unionBy)(
|
159
|
-
Array.from(this._pkgNameMap.values()).
|
159
|
+
Array.from(this._pkgNameMap.values()).map((pkgs) => {
|
160
|
+
return (0, import_lodash.unionBy)(pkgs, "version");
|
161
|
+
}).filter((pkgs) => pkgs.length > 1),
|
160
162
|
(pkgs) => pkgs[0].name
|
161
163
|
);
|
162
164
|
}
|
@@ -121,10 +121,14 @@ class Module {
|
|
121
121
|
source: this.source.source,
|
122
122
|
transformed: "",
|
123
123
|
parsedSource: ""
|
124
|
-
} : {
|
124
|
+
} : type === SDK.ToDataType.All ? {
|
125
125
|
source: this.source.source,
|
126
126
|
transformed: this.source.transformed,
|
127
127
|
parsedSource: this.source.parsedSource
|
128
|
+
} : {
|
129
|
+
source: this.source.source,
|
130
|
+
transformed: "",
|
131
|
+
parsedSource: this.source.parsedSource
|
128
132
|
};
|
129
133
|
}
|
130
134
|
setSourceMap(sourceMap) {
|
@@ -133,7 +133,9 @@ class PackageGraph {
|
|
133
133
|
}
|
134
134
|
getDuplicatePackages() {
|
135
135
|
return unionBy(
|
136
|
-
Array.from(this._pkgNameMap.values()).
|
136
|
+
Array.from(this._pkgNameMap.values()).map((pkgs) => {
|
137
|
+
return unionBy(pkgs, "version");
|
138
|
+
}).filter((pkgs) => pkgs.length > 1),
|
137
139
|
(pkgs) => pkgs[0].name
|
138
140
|
);
|
139
141
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rsdoctor/graph",
|
3
|
-
"version": "0.0.2-beta.
|
3
|
+
"version": "0.0.2-beta.2",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
@@ -17,7 +17,8 @@
|
|
17
17
|
"lodash": "^4.17.21",
|
18
18
|
"socket.io": "4.7.2",
|
19
19
|
"source-map": "^0.7.4",
|
20
|
-
"@rsdoctor/
|
20
|
+
"@rsdoctor/types": "0.0.2-beta.2",
|
21
|
+
"@rsdoctor/utils": "0.0.2-beta.2"
|
21
22
|
},
|
22
23
|
"devDependencies": {
|
23
24
|
"@types/body-parser": "1.19.2",
|
@@ -25,8 +26,7 @@
|
|
25
26
|
"@types/lodash": "^4.14.200",
|
26
27
|
"@types/node": "^16",
|
27
28
|
"tslib": "2.4.1",
|
28
|
-
"typescript": "^5.2.2"
|
29
|
-
"@rsdoctor/types": "0.0.2-beta.0"
|
29
|
+
"typescript": "^5.2.2"
|
30
30
|
},
|
31
31
|
"publishConfig": {
|
32
32
|
"access": "public",
|