@rsdoctor/utils 1.5.12 → 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/common/rspack.d.cts +1 -1
- package/dist/common/rspack.d.ts +1 -1
- package/dist/common.cjs +3 -3
- package/dist/common.js +3 -3
- package/package.json +2 -2
package/dist/common/rspack.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ export declare enum RspackSummaryCostsDataName {
|
|
|
11
11
|
* @param configs - Array of compiler configurations
|
|
12
12
|
* @returns Object containing compiler type and source map support status
|
|
13
13
|
*/
|
|
14
|
-
export declare function checkSourceMapSupport(configs: SDK.
|
|
14
|
+
export declare function checkSourceMapSupport(configs: SDK.BundlerConfigData[]): {
|
|
15
15
|
isRspack: boolean;
|
|
16
16
|
hasSourceMap: boolean;
|
|
17
17
|
};
|
package/dist/common/rspack.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare enum RspackSummaryCostsDataName {
|
|
|
11
11
|
* @param configs - Array of compiler configurations
|
|
12
12
|
* @returns Object containing compiler type and source map support status
|
|
13
13
|
*/
|
|
14
|
-
export declare function checkSourceMapSupport(configs: SDK.
|
|
14
|
+
export declare function checkSourceMapSupport(configs: SDK.BundlerConfigData[]): {
|
|
15
15
|
isRspack: boolean;
|
|
16
16
|
hasSourceMap: boolean;
|
|
17
17
|
};
|
package/dist/common.cjs
CHANGED
|
@@ -1348,7 +1348,7 @@ for(var __rspack_i in (()=>{
|
|
|
1348
1348
|
acc[chunk.id] || (acc[chunk.id] = []), acc[chunk.id].push(asset);
|
|
1349
1349
|
}), acc), {}), searchedChunksMap = new Map();
|
|
1350
1350
|
return moduleGraph?.modules.filter((module)=>{
|
|
1351
|
-
module.
|
|
1351
|
+
module.identifier.includes(moduleName) && module.chunks.forEach((chunk)=>{
|
|
1352
1352
|
searchedChunksMap.has(chunk) || (assetMap[chunk] || []).forEach((asset)=>{
|
|
1353
1353
|
asset.endsWith('.js') && searchedChunksMap.set(chunk, asset);
|
|
1354
1354
|
});
|
|
@@ -1361,7 +1361,7 @@ for(var __rspack_i in (()=>{
|
|
|
1361
1361
|
this.loader.loadData('root')
|
|
1362
1362
|
]).then((res)=>{
|
|
1363
1363
|
let [moduleGraph, root] = res, { moduleName, chunk } = body;
|
|
1364
|
-
return moduleName ? moduleGraph?.modules.filter((module)=>module.
|
|
1364
|
+
return moduleName ? moduleGraph?.modules.filter((module)=>module.identifier.includes(moduleName) && module.chunks.includes(chunk)).map((filteredModule)=>({
|
|
1365
1365
|
id: filteredModule.id,
|
|
1366
1366
|
path: filteredModule.path,
|
|
1367
1367
|
relativePath: (0, external_path_.relative)(root, filteredModule.path)
|
|
@@ -1417,7 +1417,7 @@ for(var __rspack_i in (()=>{
|
|
|
1417
1417
|
case types_.SDK.ServerAPI.API.GetAllModuleGraphFilter:
|
|
1418
1418
|
return this.loader.loadData('moduleGraph').then((moduleGraph)=>moduleGraph?.modules.map((m)=>({
|
|
1419
1419
|
id: m.id,
|
|
1420
|
-
|
|
1420
|
+
identifier: m.identifier,
|
|
1421
1421
|
path: m.path,
|
|
1422
1422
|
size: m.size,
|
|
1423
1423
|
chunks: m.chunks,
|
package/dist/common.js
CHANGED
|
@@ -1099,7 +1099,7 @@ class APIDataLoader {
|
|
|
1099
1099
|
acc[chunk.id] || (acc[chunk.id] = []), acc[chunk.id].push(asset);
|
|
1100
1100
|
}), acc), {}), searchedChunksMap = new Map();
|
|
1101
1101
|
return moduleGraph?.modules.filter((module)=>{
|
|
1102
|
-
module.
|
|
1102
|
+
module.identifier.includes(moduleName) && module.chunks.forEach((chunk)=>{
|
|
1103
1103
|
searchedChunksMap.has(chunk) || (assetMap[chunk] || []).forEach((asset)=>{
|
|
1104
1104
|
asset.endsWith('.js') && searchedChunksMap.set(chunk, asset);
|
|
1105
1105
|
});
|
|
@@ -1112,7 +1112,7 @@ class APIDataLoader {
|
|
|
1112
1112
|
this.loader.loadData('root')
|
|
1113
1113
|
]).then((res)=>{
|
|
1114
1114
|
let [moduleGraph, root] = res, { moduleName, chunk } = body;
|
|
1115
|
-
return moduleName ? moduleGraph?.modules.filter((module)=>module.
|
|
1115
|
+
return moduleName ? moduleGraph?.modules.filter((module)=>module.identifier.includes(moduleName) && module.chunks.includes(chunk)).map((filteredModule)=>({
|
|
1116
1116
|
id: filteredModule.id,
|
|
1117
1117
|
path: filteredModule.path,
|
|
1118
1118
|
relativePath: relative(root, filteredModule.path)
|
|
@@ -1168,7 +1168,7 @@ class APIDataLoader {
|
|
|
1168
1168
|
case SDK.ServerAPI.API.GetAllModuleGraphFilter:
|
|
1169
1169
|
return this.loader.loadData('moduleGraph').then((moduleGraph)=>moduleGraph?.modules.map((m)=>({
|
|
1170
1170
|
id: m.id,
|
|
1171
|
-
|
|
1171
|
+
identifier: m.identifier,
|
|
1172
1172
|
path: m.path,
|
|
1173
1173
|
size: m.size,
|
|
1174
1174
|
chunks: m.chunks,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"picocolors": "^1.1.1",
|
|
102
102
|
"rslog": "^2.1.1",
|
|
103
103
|
"strip-ansi": "^6.0.1",
|
|
104
|
-
"@rsdoctor/types": "
|
|
104
|
+
"@rsdoctor/types": "2.0.0-alpha.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@types/babel__code-frame": "7.27.0",
|