xhs-mp-compiler-cli 2.0.22 → 2.0.24

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
@@ -210,8 +210,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
210
210
  }
211
211
  catch (error) {
212
212
  todoPkgs.forEach(pkg => {
213
- var _a, _b;
214
- (_b = (_a = this.pendingPkgs[pkg].reject) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, fn => fn(error));
213
+ var _a, _b, _c;
214
+ (_c = (_b = (_a = this.pendingPkgs[pkg]) === null || _a === void 0 ? void 0 : _a.reject) === null || _b === void 0 ? void 0 : _b.forEach) === null || _c === void 0 ? void 0 : _c.call(_b, fn => fn(error));
215
215
  delete this.pendingPkgs[pkg];
216
216
  });
217
217
  }
@@ -297,13 +297,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
297
297
  }
298
298
  doCompilePkgs(opts) {
299
299
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
300
- var _a, _b, _c, _d;
300
+ var _a, _b, _c, _d, _e, _f, _g, _h;
301
301
  if (this.watching) {
302
302
  return resolve(null);
303
303
  }
304
304
  if (this.pendingTask) {
305
- (_a = this.pendingTask.resolve) === null || _a === void 0 ? void 0 : _a.push(resolve);
306
- (_b = this.pendingTask.reject) === null || _b === void 0 ? void 0 : _b.push(reject);
305
+ (_b = (_a = this.pendingTask) === null || _a === void 0 ? void 0 : _a.resolve) === null || _b === void 0 ? void 0 : _b.push(resolve);
306
+ (_d = (_c = this.pendingTask) === null || _c === void 0 ? void 0 : _c.reject) === null || _d === void 0 ? void 0 : _d.push(reject);
307
307
  return;
308
308
  }
309
309
  this.pendingTask = {
@@ -314,12 +314,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
314
314
  this.emit('buildStart');
315
315
  yield this.call('runTask', Object.assign({ action: 'dev' }, opts));
316
316
  this.watching = true;
317
- (_c = this.pendingTask.resolve) === null || _c === void 0 ? void 0 : _c.forEach(fn => fn());
317
+ (_f = (_e = this.pendingTask) === null || _e === void 0 ? void 0 : _e.resolve) === null || _f === void 0 ? void 0 : _f.forEach(fn => fn());
318
318
  this.emit('buildEnd');
319
319
  }
320
320
  catch (error) {
321
321
  this.watching = false;
322
- (_d = this.pendingTask.reject) === null || _d === void 0 ? void 0 : _d.forEach(fn => fn(error));
322
+ (_h = (_g = this.pendingTask) === null || _g === void 0 ? void 0 : _g.reject) === null || _h === void 0 ? void 0 : _h.forEach(fn => fn(error));
323
323
  }
324
324
  finally {
325
325
  this.pendingTask = undefined;
@@ -305,7 +305,3 @@ workerPool.worker(handlers);
305
305
  // } catch (error) {
306
306
  // console.error('workerPool error:', error)
307
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.22",
3
+ "version": "2.0.24",
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.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",
91
+ "xhs-mp-ml-loader": "2.0.24",
92
+ "xhs-mp-compiler-utils": "2.0.24",
93
+ "xhs-mp-pack": "2.0.24",
94
+ "xhs-mp-project": "2.0.24",
95
+ "xhs-mp-shared": "2.0.24",
96
+ "xhs-mp-shared-fs": "2.0.24",
97
+ "xhs-mp-sjs-loader": "2.0.24",
98
+ "xhs-mp-sketch-loader": "2.0.24",
99
99
  "yauzl": "^2.10.0"
100
100
  },
101
101
  "peerDependencies": {
102
- "xhs-mp-ml-parser": "2.0.22"
102
+ "xhs-mp-ml-parser": "2.0.24"
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.22"
125
+ "xhs-mp-ml-parser": "2.0.24"
126
126
  },
127
127
  "scripts": {
128
128
  "version": "formula changelog && git add .",