xhs-mp-compiler-cli 2.0.21 → 2.0.22

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/compiler.js CHANGED
@@ -320,7 +320,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
320
320
  catch (error) {
321
321
  this.watching = false;
322
322
  (_d = this.pendingTask.reject) === null || _d === void 0 ? void 0 : _d.forEach(fn => fn(error));
323
- throw error;
324
323
  }
325
324
  finally {
326
325
  this.pendingTask = undefined;
@@ -236,12 +236,11 @@ const handlers = {
236
236
  // 修改文件时构建
237
237
  const hasError = err || ((_a = stats === null || stats === void 0 ? void 0 : stats.hasErrors) === null || _a === void 0 ? void 0 : _a.call(stats));
238
238
  if (hasError) {
239
- throw formatOutputError(err, stats);
240
- // sendMessage({
241
- // event: 'compileErrorWhenFileChange',
242
- // data: formatOutputError(err, stats)
243
- // })
244
- // return
239
+ sendMessage({
240
+ event: 'compileErrorWhenFileChange',
241
+ data: formatOutputError(err, stats)
242
+ });
243
+ return;
245
244
  }
246
245
  sendMessage({
247
246
  event: 'compileFinishWhenFileChange'
@@ -306,3 +305,7 @@ workerPool.worker(handlers);
306
305
  // } catch (error) {
307
306
  // console.error('workerPool error:', error)
308
307
  // }
308
+ // @ts-ignore
309
+ globalThis.addEventListener('unhandledrejection', (err) => {
310
+ console.log(111, 'err', err);
311
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xhs-mp-compiler-cli",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "xhs mp command tool.",
5
5
  "preferGlobal": true,
6
6
  "category": "esm",
@@ -88,18 +88,18 @@
88
88
  "webpack-chain": "^6.5.1",
89
89
  "webpack-sources": "^3.2.2",
90
90
  "xhs-mp-workerpool": "^9.2.0",
91
- "xhs-mp-ml-loader": "2.0.21",
92
- "xhs-mp-compiler-utils": "2.0.21",
93
- "xhs-mp-pack": "2.0.21",
94
- "xhs-mp-project": "2.0.21",
95
- "xhs-mp-shared": "2.0.21",
96
- "xhs-mp-shared-fs": "2.0.21",
97
- "xhs-mp-sjs-loader": "2.0.21",
98
- "xhs-mp-sketch-loader": "2.0.21",
91
+ "xhs-mp-ml-loader": "2.0.22",
92
+ "xhs-mp-compiler-utils": "2.0.22",
93
+ "xhs-mp-pack": "2.0.22",
94
+ "xhs-mp-project": "2.0.22",
95
+ "xhs-mp-shared": "2.0.22",
96
+ "xhs-mp-shared-fs": "2.0.22",
97
+ "xhs-mp-sjs-loader": "2.0.22",
98
+ "xhs-mp-sketch-loader": "2.0.22",
99
99
  "yauzl": "^2.10.0"
100
100
  },
101
101
  "peerDependencies": {
102
- "xhs-mp-ml-parser": "2.0.21"
102
+ "xhs-mp-ml-parser": "2.0.22"
103
103
  },
104
104
  "devDependencies": {
105
105
  "@types/babel__generator": "7.6.3",
@@ -122,7 +122,7 @@
122
122
  "@types/node": "14",
123
123
  "typescript": "5.1.6",
124
124
  "webpack-dev-server": "4.0.0-beta.3",
125
- "xhs-mp-ml-parser": "2.0.21"
125
+ "xhs-mp-ml-parser": "2.0.22"
126
126
  },
127
127
  "scripts": {
128
128
  "version": "formula changelog && git add .",