@rsdoctor/core 1.5.0 → 1.5.1

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 +1 @@
1
- {"name":"axios","author":"Matt Zabriskie","version":"1.13.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"axios","author":"Matt Zabriskie","version":"1.13.4","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -75,6 +75,10 @@ function patchNativeModuleGraph(mg, cg, rawModuleGraph) {
75
75
  const module = mg.getModuleById(rawModule.ukey);
76
76
  module.setDependencies(rawModule.dependencies.map((ukey)=>mg.getDependencyById(ukey)).filter(Boolean));
77
77
  }
78
+ for (const rawModule of rawModules){
79
+ const module = mg.getModuleById(rawModule.ukey);
80
+ if (module && rawModule.bailoutReason) rawModule.bailoutReason.filter((reason)=>!reason.includes('ModuleConcatenation bailout')).forEach((reason)=>module.addBailoutReason(reason));
81
+ }
78
82
  }
79
83
  function patchNativeModuleIds(mg, rawModuleIdsPatch) {
80
84
  const { moduleIds: rawModuleIds } = rawModuleIdsPatch;
@@ -47,6 +47,10 @@ function patchNativeModuleGraph(mg, cg, rawModuleGraph) {
47
47
  const module = mg.getModuleById(rawModule.ukey);
48
48
  module.setDependencies(rawModule.dependencies.map((ukey)=>mg.getDependencyById(ukey)).filter(Boolean));
49
49
  }
50
+ for (const rawModule of rawModules){
51
+ const module = mg.getModuleById(rawModule.ukey);
52
+ if (module && rawModule.bailoutReason) rawModule.bailoutReason.filter((reason)=>!reason.includes('ModuleConcatenation bailout')).forEach((reason)=>module.addBailoutReason(reason));
53
+ }
50
54
  }
51
55
  function patchNativeModuleIds(mg, rawModuleIdsPatch) {
52
56
  const { moduleIds: rawModuleIds } = rawModuleIdsPatch;
@@ -47,6 +47,8 @@ const parseBundle = (bundlePath, modulesData)=>{
47
47
  if ('.js' !== (0, external_path_namespaceObject.extname)(bundlePath)) return {};
48
48
  let content = external_fs_default().readFileSync(bundlePath, 'utf8');
49
49
  const tagCache = new Map();
50
+ const sourceMapRegex = /\/\/# sourceMappingURL=[^\n]*$/m;
51
+ content = content.replace(sourceMapRegex, '');
50
52
  let hasBannerPlugin = content.indexOf('RSDOCTOR_START::') > 0;
51
53
  if (hasBannerPlugin && !tagCache.get(bundlePath)) {
52
54
  const tagMatchResult = getStringBetween(content, 0, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_START::(.*?)[;,]/, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_END::(.*?)\)/);
@@ -11,6 +11,8 @@ const parseBundle = (bundlePath, modulesData)=>{
11
11
  if ('.js' !== extname(bundlePath)) return {};
12
12
  let content = fs.readFileSync(bundlePath, 'utf8');
13
13
  const tagCache = new Map();
14
+ const sourceMapRegex = /\/\/# sourceMappingURL=[^\n]*$/m;
15
+ content = content.replace(sourceMapRegex, '');
14
16
  let hasBannerPlugin = content.indexOf('RSDOCTOR_START::') > 0;
15
17
  if (hasBannerPlugin && !tagCache.get(bundlePath)) {
16
18
  const tagMatchResult = getStringBetween(content, 0, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_START::(.*?)[;,]/, /([a-z|A-Z|_]+\.[a-z]+)\(\SRSDOCTOR_END::(.*?)\)/);
@@ -110,9 +110,14 @@ async function doneHandler(_stats, _this, context, compiler) {
110
110
  const shouldParseBundle = false !== _this.options.supports.parseBundle;
111
111
  await getModulesInfos(compiler, _this.modulesGraph, _this.chunkGraph, shouldParseBundle, _this.sourceMapSets, _this.assetsWithoutSourceMap);
112
112
  logger_namespaceObject.logger.debug(`${build_namespaceObject.Process.getMemoryUsageMessage()}, '[After Transform ModuleGraph]'`);
113
+ logger_namespaceObject.logger.debug('reportModuleGraph start');
113
114
  _this.modulesGraph && await _this.sdk.reportModuleGraph(_this.modulesGraph);
115
+ logger_namespaceObject.logger.debug('reportModuleGraph done');
116
+ logger_namespaceObject.logger.debug('reportChunkGraph start');
114
117
  await _this.sdk.reportChunkGraph(_this.chunkGraph);
118
+ logger_namespaceObject.logger.debug('reportChunkGraph done');
115
119
  if (_this.options.supports.generateTileGraph) logger_namespaceObject.logger.warn(logger_namespaceObject.chalk.yellow('The option generateTileGraph is deprecated. Treemap (i.e. Tile Graph) is now supported by default.'));
120
+ logger_namespaceObject.logger.debug('doneHandler done');
116
121
  }
117
122
  const ensureDevtools = (compiler)=>{
118
123
  const devtool = compiler.options.devtool;
@@ -82,9 +82,14 @@ async function doneHandler(_stats, _this, context, compiler) {
82
82
  const shouldParseBundle = false !== _this.options.supports.parseBundle;
83
83
  await getModulesInfos(compiler, _this.modulesGraph, _this.chunkGraph, shouldParseBundle, _this.sourceMapSets, _this.assetsWithoutSourceMap);
84
84
  logger.debug(`${Process.getMemoryUsageMessage()}, '[After Transform ModuleGraph]'`);
85
+ logger.debug('reportModuleGraph start');
85
86
  _this.modulesGraph && await _this.sdk.reportModuleGraph(_this.modulesGraph);
87
+ logger.debug('reportModuleGraph done');
88
+ logger.debug('reportChunkGraph start');
86
89
  await _this.sdk.reportChunkGraph(_this.chunkGraph);
90
+ logger.debug('reportChunkGraph done');
87
91
  if (_this.options.supports.generateTileGraph) logger.warn(chalk.yellow('The option generateTileGraph is deprecated. Treemap (i.e. Tile Graph) is now supported by default.'));
92
+ logger.debug('doneHandler done');
88
93
  }
89
94
  const ensureDevtools = (compiler)=>{
90
95
  const devtool = compiler.options.devtool;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/core",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -62,21 +62,21 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "browserslist-load-config": "^1.0.1",
65
- "@rsbuild/plugin-check-syntax": "1.6.0",
65
+ "@rsbuild/plugin-check-syntax": "1.6.1",
66
66
  "enhanced-resolve": "5.12.0",
67
67
  "es-toolkit": "^1.43.0",
68
68
  "filesize": "^10.1.6",
69
69
  "fs-extra": "^11.1.1",
70
70
  "semver": "^7.7.3",
71
71
  "source-map": "^0.7.6",
72
- "@rsdoctor/graph": "1.5.0",
73
- "@rsdoctor/types": "1.5.0",
74
- "@rsdoctor/sdk": "1.5.0",
75
- "@rsdoctor/utils": "1.5.0"
72
+ "@rsdoctor/graph": "1.5.1",
73
+ "@rsdoctor/sdk": "1.5.1",
74
+ "@rsdoctor/utils": "1.5.1",
75
+ "@rsdoctor/types": "1.5.1"
76
76
  },
77
77
  "devDependencies": {
78
- "axios": "^1.13.2",
79
- "@rspack/core": "1.7.1",
78
+ "axios": "^1.13.4",
79
+ "@rspack/core": "1.7.4",
80
80
  "@types/fs-extra": "^11.0.4",
81
81
  "@types/node": "^22.8.1",
82
82
  "@types/node-fetch": "^2.6.13",