vis-dev-utils 3.0.2 → 3.0.5

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.
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * Development utilities for the Vis family projects.
8
8
  *
9
- * @version 3.0.2
10
- * @date 2022-03-08T21:19:41.531Z
9
+ * @version 3.0.5
10
+ * @date 2022-03-12T16:41:01.018Z
11
11
  *
12
12
  * @copyright (c) 2011-2017 Almende B.V, http://almende.com
13
13
  * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
@@ -108,7 +108,7 @@ var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallChec
108
108
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
109
109
  var _padStartInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_padStartInstanceProperty);
110
110
 
111
- var y = yargs__default['default'].strict(true).usage("test-e2e-interop [options]").hide("version").config().help().option("fail-command", {
111
+ var y = yargs__default["default"].strict(true).usage("test-e2e-interop [options]").hide("version").config().help().option("fail-command", {
112
112
  demandOption: false,
113
113
  describe: 'This command will be run in a shell (therefore commands like "$SHELL" will work) after failure to inspect the state.',
114
114
  type: "string"
@@ -139,10 +139,10 @@ function parseArguments() {
139
139
  }).parseSync();
140
140
  }
141
141
 
142
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); enumerableOnly && (symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
142
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
143
143
 
144
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default['default'](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty__default['default'](target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default['default'] ? _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)) : _forEachInstanceProperty__default['default'](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } return target; }
145
- var ProjectState = /*#__PURE__*/_createClass__default['default'](
144
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty__default["default"](target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
145
+ var ProjectState = /*#__PURE__*/_createClass__default["default"](
146
146
  /**
147
147
  * This will be resolved or rejected once all the tasks associated with this
148
148
  * project finish.
@@ -162,31 +162,33 @@ var ProjectState = /*#__PURE__*/_createClass__default['default'](
162
162
  function ProjectState() {
163
163
  var _this = this;
164
164
 
165
- _classCallCheck__default['default'](this, ProjectState);
165
+ _classCallCheck__default["default"](this, ProjectState);
166
166
 
167
- _defineProperty__default['default'](this, "promise", void 0);
167
+ _defineProperty__default["default"](this, "promise", void 0);
168
168
 
169
- _defineProperty__default['default'](this, "resolve", void 0);
169
+ _defineProperty__default["default"](this, "resolve", void 0);
170
170
 
171
- _defineProperty__default['default'](this, "reject", void 0);
171
+ _defineProperty__default["default"](this, "reject", void 0);
172
172
 
173
- _defineProperty__default['default'](this, "stage", "pending");
173
+ _defineProperty__default["default"](this, "stage", "pending");
174
174
 
175
- this.promise = new _Promise__default['default'](function (resolve, reject) {
175
+ this.promise = new _Promise__default["default"](function (resolve, reject) {
176
176
  _this.resolve = resolve;
177
177
  _this.reject = reject;
178
178
  });
179
179
  });
180
180
  /**
181
- * @param title
182
- * @param details
181
+ * Output formatted error message to stderr.
182
+ *
183
+ * @param title - Some explanatory text as to what's going on.
184
+ * @param details - The error or some other message as to what went wrong.
183
185
  */
184
186
 
185
187
  function logError(title, details) {
186
188
  var _context;
187
189
 
188
190
  var wrappedDetails = details != null ? "\n".concat(details instanceof Error ? details.message : details) : "";
189
- process.stderr.write(_concatInstanceProperty__default['default'](_context = "\n==> ".concat(title)).call(_context, wrappedDetails, "\n"));
191
+ process.stderr.write(_concatInstanceProperty__default["default"](_context = "\n==> ".concat(title)).call(_context, wrappedDetails, "\n"));
190
192
  }
191
193
  /**
192
194
  * @param title
@@ -197,7 +199,7 @@ function logInfo(title, details) {
197
199
  var _context2;
198
200
 
199
201
  var wrappedDetails = details ? ":\n".concat(details) : "";
200
- process.stdout.write(_concatInstanceProperty__default['default'](_context2 = "\n==> ".concat(title)).call(_context2, wrappedDetails, "\n"));
202
+ process.stdout.write(_concatInstanceProperty__default["default"](_context2 = "\n==> ".concat(title)).call(_context2, wrappedDetails, "\n"));
201
203
  }
202
204
  /**
203
205
  * @param cwd
@@ -242,29 +244,29 @@ function createSpawner(logDir, getState) {
242
244
  var getHeaderLines = function getHeaderLines() {
243
245
  var _context3;
244
246
 
245
- return _concatInstanceProperty__default['default'](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
246
- return _JSON$stringify__default['default'](word);
247
- }).join(" "), "states:"]).call(_context3, _toConsumableArray__default['default'](getState()));
247
+ return _concatInstanceProperty__default["default"](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
248
+ return _JSON$stringify__default["default"](word);
249
+ }).join(" "), "states:"]).call(_context3, _toConsumableArray__default["default"](getState()));
248
250
  };
249
251
 
250
252
  var getLogMessage = function getLogMessage() {
251
253
  var _context4;
252
254
 
253
- return _mapInstanceProperty__default['default'](_context4 = getHeaderLines()).call(_context4, function (line) {
255
+ return _mapInstanceProperty__default["default"](_context4 = getHeaderLines()).call(_context4, function (line) {
254
256
  return " " + line;
255
257
  }).join("\n");
256
258
  };
257
259
 
258
260
  logInfo("Start", getLogMessage());
259
- return new _Promise__default['default'](function (resolve, reject) {
261
+ return new _Promise__default["default"](function (resolve, reject) {
260
262
  var _context5;
261
263
 
262
- var commandLogPath = path.join(logDir, _padStartInstanceProperty__default['default'](_context5 = "" + id).call(_context5, 3, "0") + ".log");
264
+ var commandLogPath = path.join(logDir, [path.basename(cwd).replace(/[^a-zA-Z0-9]+/g, "-"), cmd.join("-").replace(/[^a-zA-Z0-9]+/g, "-"), "id-" + _padStartInstanceProperty__default["default"](_context5 = "" + id).call(_context5, 3, "0"), "log"].join("."));
263
265
  var logStream = fsExtra.createWriteStream(commandLogPath, {
264
266
  flags: "a"
265
267
  });
266
268
  logStream.write(getHeaderLines().join("\n") + "\n\n");
267
- var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default['default'](cmd).call(cmd, 1), {
269
+ var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default["default"](cmd).call(cmd, 1), {
268
270
  cwd: cwd,
269
271
  env: _objectSpread(_objectSpread({}, process.env), {}, {
270
272
  VIS_INTEROP: "1"
@@ -273,6 +275,20 @@ function createSpawner(logDir, getState) {
273
275
  });
274
276
  child.stdout.pipe(logStream);
275
277
  child.stderr.pipe(logStream);
278
+ /**
279
+ * Add status to the file name just before the .log extension on a best
280
+ * effort basis (no errors reported)..
281
+ *
282
+ * @param code - The code or other kind of status to append.
283
+ */
284
+
285
+ function addStatusCodeToFilename(code) {
286
+ var newPath = _sliceInstanceProperty__default["default"](commandLogPath).call(commandLogPath, 0, -4) + ".status-" + code + ".log";
287
+ fsExtra.rename(commandLogPath, newPath).catch(function (error) {
288
+ console.error("Failed to rename log file to ".concat(newPath, "."), error);
289
+ });
290
+ }
291
+
276
292
  var failed = false;
277
293
  child.on("close", function (code) {
278
294
  if (failed) ; else if (code !== 0) {
@@ -280,14 +296,14 @@ function createSpawner(logDir, getState) {
280
296
 
281
297
  logError("Fail", getLogMessage());
282
298
 
283
- var errorMessage = _concatInstanceProperty__default['default'](_context6 = "".concat(_mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
299
+ var errorMessage = _concatInstanceProperty__default["default"](_context6 = "".concat(_mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
284
300
  return "\"".concat(word, "\"");
285
301
  }).join(" "), ": exited with ")).call(_context6, code, ".");
286
302
 
287
303
  logStream.end(function () {
288
- _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
304
+ _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
289
305
  var commandOutput;
290
- return _regeneratorRuntime__default['default'].wrap(function _callee$(_context7) {
306
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context7) {
291
307
  while (1) {
292
308
  switch (_context7.prev = _context7.next) {
293
309
  case 0:
@@ -318,9 +334,11 @@ function createSpawner(logDir, getState) {
318
334
  }, _callee, null, [[1, 8]]);
319
335
  }))();
320
336
  });
337
+ addStatusCodeToFilename(code !== null && code !== void 0 ? code : "null");
321
338
  reject(new Error(errorMessage));
322
339
  } else {
323
340
  logInfo("Okay", getLogMessage());
341
+ addStatusCodeToFilename(code);
324
342
  resolve();
325
343
  }
326
344
  });
@@ -328,15 +346,16 @@ function createSpawner(logDir, getState) {
328
346
  failed = true;
329
347
  logError("Fail", getLogMessage());
330
348
  execFail(cwd, failCommand, error);
349
+ addStatusCodeToFilename("error");
331
350
  reject(error);
332
351
  });
333
352
  });
334
353
  };
335
354
  }
336
355
 
337
- function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol__default['default'] !== "undefined" && _getIteratorMethod__default['default'](o) || o["@@iterator"]; if (!it) { if (_Array$isArray__default['default'](o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
356
+ function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol__default["default"] !== "undefined" && _getIteratorMethod__default["default"](o) || o["@@iterator"]; if (!it) { if (_Array$isArray__default["default"](o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
338
357
 
339
- function _unsupportedIterableToArray$1(o, minLen) { var _context33; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default['default'](_context33 = Object.prototype.toString.call(o)).call(_context33, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default['default'](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
358
+ function _unsupportedIterableToArray$1(o, minLen) { var _context33; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default["default"](_context33 = Object.prototype.toString.call(o)).call(_context33, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default["default"](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
340
359
 
341
360
  function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
342
361
 
@@ -354,8 +373,8 @@ function prepareTmpDir(_x) {
354
373
 
355
374
 
356
375
  function _prepareTmpDir() {
357
- _prepareTmpDir = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(tmpPath) {
358
- return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
376
+ _prepareTmpDir = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(tmpPath) {
377
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
359
378
  while (1) {
360
379
  switch (_context.prev = _context.next) {
361
380
  case 0:
@@ -417,8 +436,8 @@ function copyTarball(_x2, _x3) {
417
436
 
418
437
 
419
438
  function _copyTarball() {
420
- _copyTarball = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(data, projectName) {
421
- return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
439
+ _copyTarball = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(data, projectName) {
440
+ return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
422
441
  while (1) {
423
442
  switch (_context2.prev = _context2.next) {
424
443
  case 0:
@@ -445,16 +464,16 @@ function getPackageDeps(_x4) {
445
464
 
446
465
 
447
466
  function _getPackageDeps() {
448
- _getPackageDeps = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(cwd) {
467
+ _getPackageDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(cwd) {
449
468
  var _context3;
450
469
 
451
470
  var packageJSONPath, packageJSON;
452
- return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context4) {
471
+ return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
453
472
  while (1) {
454
473
  switch (_context4.prev = _context4.next) {
455
474
  case 0:
456
475
  _context4.next = 2;
457
- return findUp__default['default']("package.json", {
476
+ return findUp__default["default"]("package.json", {
458
477
  cwd: cwd
459
478
  });
460
479
 
@@ -476,7 +495,7 @@ function _getPackageDeps() {
476
495
  case 8:
477
496
  _context4.t1 = _context4.sent;
478
497
  packageJSON = _context4.t0.parse.call(_context4.t0, _context4.t1);
479
- return _context4.abrupt("return", _toConsumableArray__default['default'](new _Set__default['default'](_concatInstanceProperty__default['default'](_context3 = []).call(_context3, _toConsumableArray__default['default'](_Object$keys__default['default'](packageJSON.dependencies || {})), _toConsumableArray__default['default'](_Object$keys__default['default'](packageJSON.devDependencies || {})), _toConsumableArray__default['default'](_Object$keys__default['default'](packageJSON.peerDependencies || {}))))));
498
+ return _context4.abrupt("return", _toConsumableArray__default["default"](new _Set__default["default"](_concatInstanceProperty__default["default"](_context3 = []).call(_context3, _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.dependencies || {})), _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.devDependencies || {})), _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.peerDependencies || {}))))));
480
499
 
481
500
  case 11:
482
501
  case "end":
@@ -499,17 +518,17 @@ function getPackageLocalDeps(_x5, _x6) {
499
518
 
500
519
 
501
520
  function _getPackageLocalDeps() {
502
- _getPackageLocalDeps = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(data, projectName) {
521
+ _getPackageLocalDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(data, projectName) {
503
522
  var _context5;
504
523
 
505
524
  var projectPaths, tmpReposResolve, cwd;
506
- return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context6) {
525
+ return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
507
526
  while (1) {
508
527
  switch (_context6.prev = _context6.next) {
509
528
  case 0:
510
529
  projectPaths = data.projectPaths, tmpReposResolve = data.tmpReposResolve;
511
530
  cwd = tmpReposResolve(projectName);
512
- _context6.t0 = _filterInstanceProperty__default['default'];
531
+ _context6.t0 = _filterInstanceProperty__default["default"];
513
532
  _context6.next = 5;
514
533
  return getPackageDeps(cwd);
515
534
 
@@ -539,9 +558,9 @@ function clone(_x7, _x8, _x9) {
539
558
 
540
559
 
541
560
  function _clone() {
542
- _clone = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(spawn, data, projectName) {
561
+ _clone = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(spawn, data, projectName) {
543
562
  var failCommand, projectPaths, tmpReposResolve, cwd, projectPath;
544
- return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context7) {
563
+ return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context7) {
545
564
  while (1) {
546
565
  switch (_context7.prev = _context7.next) {
547
566
  case 0:
@@ -594,16 +613,16 @@ function updatePackageDepVersions(_x10, _x11) {
594
613
 
595
614
 
596
615
  function _updatePackageDepVersions() {
597
- _updatePackageDepVersions = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(cwd, deps) {
616
+ _updatePackageDepVersions = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(cwd, deps) {
598
617
  var _context8, _packageJSON$dependen, _context9, _packageJSON$devDepen, _context10, _packageJSON$peerDepe;
599
618
 
600
619
  var packageJSONPath, packageJSON;
601
- return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context11) {
620
+ return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context11) {
602
621
  while (1) {
603
622
  switch (_context11.prev = _context11.next) {
604
623
  case 0:
605
624
  _context11.next = 2;
606
- return findUp__default['default']("package.json", {
625
+ return findUp__default["default"]("package.json", {
607
626
  cwd: cwd
608
627
  });
609
628
 
@@ -626,26 +645,26 @@ function _updatePackageDepVersions() {
626
645
  _context11.t1 = _context11.sent;
627
646
  packageJSON = _context11.t0.parse.call(_context11.t0, _context11.t1);
628
647
 
629
- _forEachInstanceProperty__default['default'](_context8 = _Object$keys__default['default']((_packageJSON$dependen = packageJSON.dependencies) !== null && _packageJSON$dependen !== void 0 ? _packageJSON$dependen : {})).call(_context8, function (key) {
648
+ _forEachInstanceProperty__default["default"](_context8 = _Object$keys__default["default"]((_packageJSON$dependen = packageJSON.dependencies) !== null && _packageJSON$dependen !== void 0 ? _packageJSON$dependen : {})).call(_context8, function (key) {
630
649
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
631
650
  packageJSON.dependencies[key] = "file:" + deps[key];
632
651
  }
633
652
  });
634
653
 
635
- _forEachInstanceProperty__default['default'](_context9 = _Object$keys__default['default']((_packageJSON$devDepen = packageJSON.devDependencies) !== null && _packageJSON$devDepen !== void 0 ? _packageJSON$devDepen : {})).call(_context9, function (key) {
654
+ _forEachInstanceProperty__default["default"](_context9 = _Object$keys__default["default"]((_packageJSON$devDepen = packageJSON.devDependencies) !== null && _packageJSON$devDepen !== void 0 ? _packageJSON$devDepen : {})).call(_context9, function (key) {
636
655
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
637
656
  packageJSON.devDependencies[key] = "file:" + deps[key];
638
657
  }
639
658
  });
640
659
 
641
- _forEachInstanceProperty__default['default'](_context10 = _Object$keys__default['default']((_packageJSON$peerDepe = packageJSON.peerDependencies) !== null && _packageJSON$peerDepe !== void 0 ? _packageJSON$peerDepe : {})).call(_context10, function (key) {
660
+ _forEachInstanceProperty__default["default"](_context10 = _Object$keys__default["default"]((_packageJSON$peerDepe = packageJSON.peerDependencies) !== null && _packageJSON$peerDepe !== void 0 ? _packageJSON$peerDepe : {})).call(_context10, function (key) {
642
661
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
643
662
  packageJSON.peerDependencies[key] = "file:" + deps[key];
644
663
  }
645
664
  });
646
665
 
647
666
  _context11.next = 15;
648
- return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default['default'](packageJSON, undefined, 4));
667
+ return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default["default"](packageJSON, undefined, 4));
649
668
 
650
669
  case 15:
651
670
  case "end":
@@ -666,12 +685,12 @@ function buildTestPack(_x12, _x13, _x14) {
666
685
 
667
686
 
668
687
  function _buildTestPack() {
669
- _buildTestPack = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(spawn, data, projectName) {
688
+ _buildTestPack = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(spawn, data, projectName) {
670
689
  var _context12;
671
690
 
672
691
  var failCommand, packageScripts, tmpReposResolve, cwd, packageLockPath, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
673
692
 
674
- return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context13) {
693
+ return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context13) {
675
694
  while (1) {
676
695
  switch (_context13.prev = _context13.next) {
677
696
  case 0:
@@ -679,7 +698,7 @@ function _buildTestPack() {
679
698
  cwd = tmpReposResolve(projectName);
680
699
  _context13.t0 = updatePackageDepVersions;
681
700
  _context13.t1 = cwd;
682
- _context13.t2 = _reduceInstanceProperty__default['default'];
701
+ _context13.t2 = _reduceInstanceProperty__default["default"];
683
702
  _context13.next = 7;
684
703
  return getPackageLocalDeps(data, projectName);
685
704
 
@@ -688,13 +707,13 @@ function _buildTestPack() {
688
707
  _context13.t4 = (0, _context13.t2)(_context13.t3).call(_context12, function (acc, key) {
689
708
  acc[key] = getTarballPath(data, key);
690
709
  return acc;
691
- }, _Object$create__default['default'](null));
710
+ }, _Object$create__default["default"](null));
692
711
  _context13.next = 11;
693
712
  return (0, _context13.t0)(_context13.t1, _context13.t4);
694
713
 
695
714
  case 11:
696
715
  _context13.next = 13;
697
- return findUp__default['default']("package-lock.json", {
716
+ return findUp__default["default"]("package-lock.json", {
698
717
  cwd: cwd
699
718
  });
700
719
 
@@ -819,9 +838,9 @@ function checkTmpPath(_x15) {
819
838
 
820
839
 
821
840
  function _checkTmpPath() {
822
- _checkTmpPath = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee8(data) {
841
+ _checkTmpPath = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(data) {
823
842
  var tmpDir;
824
- return _regeneratorRuntime__default['default'].wrap(function _callee8$(_context14) {
843
+ return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context14) {
825
844
  while (1) {
826
845
  switch (_context14.prev = _context14.next) {
827
846
  case 0:
@@ -854,26 +873,26 @@ function test(_x16) {
854
873
  }
855
874
 
856
875
  function _test() {
857
- _test = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee11(_ref2) {
876
+ _test = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(_ref2) {
858
877
  var _context18;
859
878
 
860
879
  var failCommand, packageScripts, projectPaths, tmpPath, data, projectStatuses, getStages, _context21, _context22, _context26, _context27, spawn, allSucceeded, _context28, _context29, _context30, _context31, _iterator3, _step3, _step3$value, projectName, promise;
861
880
 
862
- return _regeneratorRuntime__default['default'].wrap(function _callee11$(_context32) {
881
+ return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context32) {
863
882
  while (1) {
864
883
  switch (_context32.prev = _context32.next) {
865
884
  case 0:
866
885
  getStages = function _getStages() {
867
886
  var _context19;
868
887
 
869
- return _mapInstanceProperty__default['default'](_context19 = _toConsumableArray__default['default'](projectStatuses)).call(_context19, function (_ref3) {
888
+ return _mapInstanceProperty__default["default"](_context19 = _toConsumableArray__default["default"](projectStatuses)).call(_context19, function (_ref3) {
870
889
  var _context20;
871
890
 
872
- var _ref4 = _slicedToArray__default['default'](_ref3, 2),
891
+ var _ref4 = _slicedToArray__default["default"](_ref3, 2),
873
892
  key = _ref4[0],
874
893
  stage = _ref4[1].stage;
875
894
 
876
- return _concatInstanceProperty__default['default'](_context20 = " ".concat(key, ": ")).call(_context20, stage);
895
+ return _concatInstanceProperty__default["default"](_context20 = " ".concat(key, ": ")).call(_context20, stage);
877
896
  });
878
897
  };
879
898
 
@@ -889,7 +908,7 @@ function _test() {
889
908
  return _context32.abrupt("return", true);
890
909
 
891
910
  case 5:
892
- _context32.t0 = _Object$freeze__default['default'];
911
+ _context32.t0 = _Object$freeze__default["default"];
893
912
  _context32.t1 = failCommand;
894
913
  _context32.t2 = packageScripts;
895
914
  _context32.t3 = projectPaths;
@@ -906,7 +925,7 @@ function _test() {
906
925
  paths[_key] = arguments[_key];
907
926
  }
908
927
 
909
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
928
+ return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
910
929
  };
911
930
 
912
931
  _context32.t6 = function tmpReposResolve() {
@@ -916,7 +935,7 @@ function _test() {
916
935
  paths[_key2] = arguments[_key2];
917
936
  }
918
937
 
919
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
938
+ return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
920
939
  };
921
940
 
922
941
  _context32.t7 = function tmpRootResolve() {
@@ -926,7 +945,7 @@ function _test() {
926
945
  paths[_key3] = arguments[_key3];
927
946
  }
928
947
 
929
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context17 = [data.tmpDir.name]).call(_context17, paths));
948
+ return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context17 = [data.tmpDir.name]).call(_context17, paths));
930
949
  };
931
950
 
932
951
  _context32.t8 = process.cwd();
@@ -941,7 +960,7 @@ function _test() {
941
960
  visDevUtilsPath: _context32.t8
942
961
  };
943
962
  data = (0, _context32.t0)(_context32.t9);
944
- projectStatuses = new _Map__default['default'](_mapInstanceProperty__default['default'](_context18 = _Object$keys__default['default'](data.projectPaths)).call(_context18, function (project) {
963
+ projectStatuses = new _Map__default["default"](_mapInstanceProperty__default["default"](_context18 = _Object$keys__default["default"](data.projectPaths)).call(_context18, function (project) {
945
964
  return [project, new ProjectState()];
946
965
  }));
947
966
  /**
@@ -955,28 +974,28 @@ function _test() {
955
974
 
956
975
  case 23:
957
976
  _context32.next = 25;
958
- return _Promise__default['default'].all(_mapInstanceProperty__default['default'](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
977
+ return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
959
978
  return fsExtra.mkdir(path.resolve(data.tmpDir.name, dir));
960
979
  }));
961
980
 
962
981
  case 25:
963
982
  logInfo("Begin", getStages().join("\n"));
964
983
  _context32.next = 28;
965
- return _Promise__default['default'].all(_mapInstanceProperty__default['default'](_context22 = _toConsumableArray__default['default'](projectStatuses)).call(_context22, /*#__PURE__*/function () {
966
- var _ref6 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee10(_ref5) {
984
+ return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context22 = _toConsumableArray__default["default"](projectStatuses)).call(_context22, /*#__PURE__*/function () {
985
+ var _ref6 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(_ref5) {
967
986
  var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context24;
968
987
 
969
- return _regeneratorRuntime__default['default'].wrap(function _callee10$(_context25) {
988
+ return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context25) {
970
989
  while (1) {
971
990
  switch (_context25.prev = _context25.next) {
972
991
  case 0:
973
- _ref7 = _slicedToArray__default['default'](_ref5, 2), projectName = _ref7[0], state = _ref7[1];
992
+ _ref7 = _slicedToArray__default["default"](_ref5, 2), projectName = _ref7[0], state = _ref7[1];
974
993
  _context25.prev = 1;
975
994
  state.stage = "preparing";
976
995
  projectPath = data.projectPaths[projectName];
977
996
  _context25.next = 6;
978
- return _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee9() {
979
- return _regeneratorRuntime__default['default'].wrap(function _callee9$(_context23) {
997
+ return _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
998
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context23) {
980
999
  while (1) {
981
1000
  switch (_context23.prev = _context23.next) {
982
1001
  case 0:
@@ -1116,8 +1135,8 @@ function _test() {
1116
1135
  case 60:
1117
1136
  _context25.prev = 60;
1118
1137
  _context25.t2 = _context25["catch"](1);
1119
- logError(_concatInstanceProperty__default['default'](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
1120
- state.reject(_context25.t2);
1138
+ logError(_concatInstanceProperty__default["default"](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
1139
+ state.reject(_context25.t2 instanceof Error ? _context25.t2 : new Error("" + _context25.t2));
1121
1140
 
1122
1141
  case 64:
1123
1142
  case "end":
@@ -1133,9 +1152,9 @@ function _test() {
1133
1152
  }()));
1134
1153
 
1135
1154
  case 28:
1136
- _context32.t10 = _everyInstanceProperty__default['default'];
1155
+ _context32.t10 = _everyInstanceProperty__default["default"];
1137
1156
  _context32.next = 31;
1138
- return _Promise__default['default'].allSettled(_mapInstanceProperty__default['default'](_context27 = _toConsumableArray__default['default'](_valuesInstanceProperty__default['default'](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
1157
+ return _Promise__default["default"].allSettled(_mapInstanceProperty__default["default"](_context27 = _toConsumableArray__default["default"](_valuesInstanceProperty__default["default"](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
1139
1158
  return status.promise;
1140
1159
  }));
1141
1160
 
@@ -1172,7 +1191,7 @@ function _test() {
1172
1191
  break;
1173
1192
  }
1174
1193
 
1175
- _step3$value = _slicedToArray__default['default'](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
1194
+ _step3$value = _slicedToArray__default["default"](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
1176
1195
  _context32.prev = 45;
1177
1196
  _context32.next = 48;
1178
1197
  return promise;
@@ -1211,11 +1230,11 @@ function _test() {
1211
1230
  // Print the detailed logs for inspection (especially in CI).
1212
1231
  logInfo("Outputs");
1213
1232
  _context32.t14 = process.stdout;
1214
- _context32.t15 = _concatInstanceProperty__default['default'](_context28 = [""]);
1233
+ _context32.t15 = _concatInstanceProperty__default["default"](_context28 = [""]);
1215
1234
  _context32.t16 = _context28;
1216
- _context32.t17 = _toConsumableArray__default['default'];
1217
- _context32.t18 = _Promise__default['default'];
1218
- _context32.t19 = _mapInstanceProperty__default['default'];
1235
+ _context32.t17 = _toConsumableArray__default["default"];
1236
+ _context32.t18 = _Promise__default["default"];
1237
+ _context32.t19 = _mapInstanceProperty__default["default"];
1219
1238
  _context32.next = 72;
1220
1239
  return fsExtra.readdir(data.tmpLogsResolve());
1221
1240
 
@@ -1231,7 +1250,7 @@ function _test() {
1231
1250
  _context32.t22 = _context32.sent;
1232
1251
  _context32.t23 = (0, _context32.t17)(_context32.t22);
1233
1252
  _context32.t24 = [""];
1234
- _context32.t25 = _context32.t15.call.call(_context32.t15, _context32.t16, _context32.t23, _context32.t24).join("\n\n" + _repeatInstanceProperty__default['default'](_context30 = _repeatInstanceProperty__default['default'](_context31 = "-").call(_context31, 80) + "\n").call(_context30, 2) + "\n");
1253
+ _context32.t25 = _context32.t15.call.call(_context32.t15, _context32.t16, _context32.t23, _context32.t24).join("\n\n" + _repeatInstanceProperty__default["default"](_context30 = _repeatInstanceProperty__default["default"](_context31 = "-").call(_context31, 80) + "\n").call(_context30, 2) + "\n");
1235
1254
 
1236
1255
  _context32.t14.write.call(_context32.t14, _context32.t25);
1237
1256
 
@@ -1250,16 +1269,16 @@ function _test() {
1250
1269
 
1251
1270
  var _context, _context2;
1252
1271
 
1253
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol__default['default'] !== "undefined" && _getIteratorMethod__default['default'](o) || o["@@iterator"]; if (!it) { if (_Array$isArray__default['default'](o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
1272
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol__default["default"] !== "undefined" && _getIteratorMethod__default["default"](o) || o["@@iterator"]; if (!it) { if (_Array$isArray__default["default"](o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
1254
1273
 
1255
- function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty__default['default'](_context3 = Object.prototype.toString.call(o)).call(_context3, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default['default'](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1274
+ function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty__default["default"](_context3 = Object.prototype.toString.call(o)).call(_context3, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default["default"](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1256
1275
 
1257
1276
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1258
1277
  var argv = parseArguments();
1259
1278
 
1260
- var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapInstanceProperty__default['default'](_context2 = argv["project"]).call(_context2, function (raw) {
1279
+ var projectPaths = _reduceInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = argv["project"]).call(_context2, function (raw) {
1261
1280
  var _raw$split = raw.split(" ", 2),
1262
- _raw$split2 = _slicedToArray__default['default'](_raw$split, 2),
1281
+ _raw$split2 = _slicedToArray__default["default"](_raw$split, 2),
1263
1282
  name = _raw$split2[0],
1264
1283
  path$1 = _raw$split2[1];
1265
1284
 
@@ -1276,7 +1295,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
1276
1295
  process.exit(1);
1277
1296
  }
1278
1297
  })).call(_context, function (acc, _ref) {
1279
- var _ref2 = _slicedToArray__default['default'](_ref, 2),
1298
+ var _ref2 = _slicedToArray__default["default"](_ref, 2),
1280
1299
  name = _ref2[0],
1281
1300
  path = _ref2[1];
1282
1301
 
@@ -1286,7 +1305,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
1286
1305
 
1287
1306
  var rawPackageScriptArg = argv["package-script"];
1288
1307
 
1289
- var packageScripts = _flatMapInstanceProperty__default['default'](rawPackageScriptArg).call(rawPackageScriptArg, function (raw) {
1308
+ var packageScripts = _flatMapInstanceProperty__default["default"](rawPackageScriptArg).call(rawPackageScriptArg, function (raw) {
1290
1309
  var packageScripts = [];
1291
1310
  var packageName = null;
1292
1311
 
@@ -1297,12 +1316,12 @@ var packageScripts = _flatMapInstanceProperty__default['default'](rawPackageScri
1297
1316
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
1298
1317
  var part = _step.value;
1299
1318
 
1300
- var mode = _sliceInstanceProperty__default['default'](part).call(part, -1);
1319
+ var mode = _sliceInstanceProperty__default["default"](part).call(part, -1);
1301
1320
 
1302
1321
  if (mode === "?" || mode === "!") {
1303
1322
  packageScripts.push({
1304
1323
  packageName: packageName,
1305
- scriptName: _sliceInstanceProperty__default['default'](part).call(part, 0, -1),
1324
+ scriptName: _sliceInstanceProperty__default["default"](part).call(part, 0, -1),
1306
1325
  skipIfMissing: mode === "?"
1307
1326
  });
1308
1327
  } else {