@stencil/core 4.43.2 → 4.43.3-dev.1773984292.05d12e5

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.
Files changed (38) hide show
  1. package/cli/index.cjs +379 -154
  2. package/cli/index.js +379 -154
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +2276 -2065
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +346 -137
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/app-globals/package.json +1 -1
  14. package/internal/client/index.js +1 -1
  15. package/internal/client/package.json +1 -1
  16. package/internal/client/patch-browser.js +1 -1
  17. package/internal/hydrate/index.js +423 -214
  18. package/internal/hydrate/package.json +1 -1
  19. package/internal/hydrate/runner.js +396 -189
  20. package/internal/package.json +1 -1
  21. package/internal/stencil-private.d.ts +1 -1
  22. package/internal/stencil-public-compiler.d.ts +61 -6
  23. package/internal/testing/index.js +410 -201
  24. package/internal/testing/package.json +1 -1
  25. package/mock-doc/index.cjs +2 -4
  26. package/mock-doc/index.d.ts +1 -1
  27. package/mock-doc/index.js +2 -4
  28. package/mock-doc/package.json +1 -1
  29. package/package.json +2 -2
  30. package/screenshot/index.js +341 -132
  31. package/screenshot/package.json +1 -1
  32. package/screenshot/pixel-match.js +1 -1
  33. package/sys/node/glob.js +1 -1
  34. package/sys/node/index.js +44 -46
  35. package/sys/node/package.json +1 -1
  36. package/sys/node/worker.js +1 -1
  37. package/testing/index.js +420 -211
  38. package/testing/package.json +1 -1
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v4.43.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v4.43.3-dev.1773984292.05d12e5 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -2565,6 +2565,7 @@ var BOOLEAN_CLI_FLAGS = [
2565
2565
  "dev",
2566
2566
  "devtools",
2567
2567
  "docs",
2568
+ // @deprecated - integrated testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
2568
2569
  "e2e",
2569
2570
  "es5",
2570
2571
  "esm",
@@ -2576,15 +2577,20 @@ var BOOLEAN_CLI_FLAGS = [
2576
2577
  "prod",
2577
2578
  "profile",
2578
2579
  "serviceWorker",
2580
+ // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
2579
2581
  "screenshot",
2580
2582
  "serve",
2581
2583
  "skipNodeCheck",
2584
+ // @deprecated - integrated testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
2582
2585
  "spec",
2583
2586
  "ssr",
2587
+ // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
2584
2588
  "updateScreenshot",
2585
2589
  "verbose",
2586
2590
  "version",
2587
2591
  "watch",
2592
+ // @deprecated - all JEST CLI options below are only used by integrated testing, which will be removed in Stencil v5.
2593
+ // See https://github.com/stenciljs/core/issues/6584.
2588
2594
  // JEST CLI OPTIONS
2589
2595
  "all",
2590
2596
  "automock",
@@ -2635,6 +2641,8 @@ var BOOLEAN_CLI_FLAGS = [
2635
2641
  ];
2636
2642
  var NUMBER_CLI_FLAGS = [
2637
2643
  "port",
2644
+ // @deprecated - all JEST CLI args below are only used by integrated testing, which will be removed in Stencil v5.
2645
+ // See https://github.com/stenciljs/core/issues/6584.
2638
2646
  // JEST CLI ARGS
2639
2647
  "maxConcurrency",
2640
2648
  "testTimeout"
@@ -2646,7 +2654,10 @@ var STRING_CLI_FLAGS = [
2646
2654
  "docsJson",
2647
2655
  "emulate",
2648
2656
  "root",
2657
+ // @deprecated - screenshot testing will be removed in Stencil v5. See https://github.com/stenciljs/core/issues/6584.
2649
2658
  "screenshotConnector",
2659
+ // @deprecated - all JEST CLI args below are only used by integrated testing, which will be removed in Stencil v5.
2660
+ // See https://github.com/stenciljs/core/issues/6584.
2650
2661
  // JEST CLI ARGS
2651
2662
  "cacheDirectory",
2652
2663
  "changedSince",
@@ -3053,8 +3064,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
3053
3064
  };
3054
3065
 
3055
3066
  // node_modules/minimatch/dist/esm/ast.js
3067
+ var _a;
3056
3068
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
3057
3069
  var isExtglobType = (c) => types.has(c);
3070
+ var isExtglobAST = (c) => isExtglobType(c.type);
3071
+ var adoptionMap = /* @__PURE__ */ new Map([
3072
+ ["!", ["@"]],
3073
+ ["?", ["?", "@"]],
3074
+ ["@", ["@"]],
3075
+ ["*", ["*", "+", "?", "@"]],
3076
+ ["+", ["+", "@"]]
3077
+ ]);
3078
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
3079
+ ["!", ["?"]],
3080
+ ["@", ["?"]],
3081
+ ["+", ["?", "*"]]
3082
+ ]);
3083
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
3084
+ ["!", ["?", "@"]],
3085
+ ["?", ["?", "@"]],
3086
+ ["@", ["?", "@"]],
3087
+ ["*", ["*", "+", "?", "@"]],
3088
+ ["+", ["+", "@", "?", "*"]]
3089
+ ]);
3090
+ var usurpMap = /* @__PURE__ */ new Map([
3091
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
3092
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
3093
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
3094
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
3095
+ ]);
3058
3096
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3059
3097
  var startNoDot = "(?!\\.)";
3060
3098
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3064,8 +3102,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3064
3102
  var qmark = "[^/]";
3065
3103
  var star = qmark + "*?";
3066
3104
  var starNoEmpty = qmark + "+?";
3067
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
3068
- var _AST = class _AST {
3105
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
3106
+ var AST = class {
3069
3107
  constructor(type, parent, options = {}) {
3070
3108
  __privateAdd(this, _AST_instances);
3071
3109
  __publicField(this, "type");
@@ -3118,44 +3156,44 @@ var _AST = class _AST {
3118
3156
  for (const p of parts) {
3119
3157
  if (p === "")
3120
3158
  continue;
3121
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
3159
+ if (typeof p !== "string" && !(p instanceof _a && __privateGet(p, _parent) === this)) {
3122
3160
  throw new Error("invalid part: " + p);
3123
3161
  }
3124
3162
  __privateGet(this, _parts).push(p);
3125
3163
  }
3126
3164
  }
3127
3165
  toJSON() {
3128
- var _a;
3166
+ var _a2;
3129
3167
  const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
3130
3168
  if (this.isStart() && !this.type)
3131
3169
  ret.unshift([]);
3132
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
3170
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
3133
3171
  ret.push({});
3134
3172
  }
3135
3173
  return ret;
3136
3174
  }
3137
3175
  isStart() {
3138
- var _a;
3176
+ var _a2;
3139
3177
  if (__privateGet(this, _root) === this)
3140
3178
  return true;
3141
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
3179
+ if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
3142
3180
  return false;
3143
3181
  if (__privateGet(this, _parentIndex) === 0)
3144
3182
  return true;
3145
3183
  const p = __privateGet(this, _parent);
3146
3184
  for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
3147
3185
  const pp = __privateGet(p, _parts)[i];
3148
- if (!(pp instanceof _AST && pp.type === "!")) {
3186
+ if (!(pp instanceof _a && pp.type === "!")) {
3149
3187
  return false;
3150
3188
  }
3151
3189
  }
3152
3190
  return true;
3153
3191
  }
3154
3192
  isEnd() {
3155
- var _a, _b, _c;
3193
+ var _a2, _b, _c;
3156
3194
  if (__privateGet(this, _root) === this)
3157
3195
  return true;
3158
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
3196
+ if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
3159
3197
  return true;
3160
3198
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
3161
3199
  return false;
@@ -3171,16 +3209,16 @@ var _AST = class _AST {
3171
3209
  this.push(part.clone(this));
3172
3210
  }
3173
3211
  clone(parent) {
3174
- const c = new _AST(this.type, parent);
3212
+ const c = new _a(this.type, parent);
3175
3213
  for (const p of __privateGet(this, _parts)) {
3176
3214
  c.copyIn(p);
3177
3215
  }
3178
3216
  return c;
3179
3217
  }
3180
3218
  static fromGlob(pattern, options = {}) {
3181
- var _a;
3182
- const ast = new _AST(null, void 0, options);
3183
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
3219
+ var _a2;
3220
+ const ast = new _a(null, void 0, options);
3221
+ __privateMethod(_a2 = _a, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options, 0);
3184
3222
  return ast;
3185
3223
  }
3186
3224
  // returns the regular expression if there's magic, or the unescaped
@@ -3273,15 +3311,17 @@ var _AST = class _AST {
3273
3311
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
3274
3312
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3275
3313
  toRegExpSource(allowDot) {
3276
- var _a;
3314
+ var _a2;
3277
3315
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
3278
- if (__privateGet(this, _root) === this)
3316
+ if (__privateGet(this, _root) === this) {
3317
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
3279
3318
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
3280
- if (!this.type) {
3319
+ }
3320
+ if (!isExtglobAST(this)) {
3281
3321
  const noEmpty = this.isStart() && this.isEnd();
3282
3322
  const src = __privateGet(this, _parts).map((p) => {
3283
- var _a2;
3284
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3323
+ var _a3;
3324
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _a, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3285
3325
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
3286
3326
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
3287
3327
  return re;
@@ -3304,7 +3344,7 @@ var _AST = class _AST {
3304
3344
  }
3305
3345
  }
3306
3346
  let end = "";
3307
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
3347
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
3308
3348
  end = "(?:$|\\/)";
3309
3349
  }
3310
3350
  const final2 = start2 + src + end;
@@ -3320,9 +3360,10 @@ var _AST = class _AST {
3320
3360
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
3321
3361
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3322
3362
  const s = this.toString();
3323
- __privateSet(this, _parts, [s]);
3324
- this.type = null;
3325
- __privateSet(this, _hasMagic, void 0);
3363
+ const me = this;
3364
+ __privateSet(me, _parts, [s]);
3365
+ me.type = null;
3366
+ __privateSet(me, _hasMagic, void 0);
3326
3367
  return [s, unescape(this.toString()), false, false];
3327
3368
  }
3328
3369
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -3391,8 +3432,9 @@ fillNegs_fn = function() {
3391
3432
  return this;
3392
3433
  };
3393
3434
  _AST_static = new WeakSet();
3394
- parseAST_fn = function(str, ast, pos, opt) {
3395
- var _a, _b;
3435
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
3436
+ var _a2, _b, _c, _d, _e;
3437
+ const maxDepth = (_a2 = opt.maxExtglobRecursion) != null ? _a2 : 2;
3396
3438
  let escaping = false;
3397
3439
  let inBrace = false;
3398
3440
  let braceStart = -1;
@@ -3424,11 +3466,12 @@ parseAST_fn = function(str, ast, pos, opt) {
3424
3466
  acc2 += c;
3425
3467
  continue;
3426
3468
  }
3427
- if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
3469
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
3470
+ if (doRecurse) {
3428
3471
  ast.push(acc2);
3429
3472
  acc2 = "";
3430
- const ext2 = new _AST(c, ast);
3431
- i2 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i2, opt);
3473
+ const ext2 = new _a(c, ast);
3474
+ i2 = __privateMethod(_b = _a, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
3432
3475
  ast.push(ext2);
3433
3476
  continue;
3434
3477
  }
@@ -3438,7 +3481,7 @@ parseAST_fn = function(str, ast, pos, opt) {
3438
3481
  return i2;
3439
3482
  }
3440
3483
  let i = pos + 1;
3441
- let part = new _AST(null, ast);
3484
+ let part = new _a(null, ast);
3442
3485
  const parts = [];
3443
3486
  let acc = "";
3444
3487
  while (i < str.length) {
@@ -3465,19 +3508,22 @@ parseAST_fn = function(str, ast, pos, opt) {
3465
3508
  acc += c;
3466
3509
  continue;
3467
3510
  }
3468
- if (isExtglobType(c) && str.charAt(i) === "(") {
3511
+ const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3512
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
3513
+ if (doRecurse) {
3514
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
3469
3515
  part.push(acc);
3470
3516
  acc = "";
3471
- const ext2 = new _AST(c, part);
3517
+ const ext2 = new _a(c, part);
3472
3518
  part.push(ext2);
3473
- i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
3519
+ i = __privateMethod(_e = _a, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
3474
3520
  continue;
3475
3521
  }
3476
3522
  if (c === "|") {
3477
3523
  part.push(acc);
3478
3524
  acc = "";
3479
3525
  parts.push(part);
3480
- part = new _AST(null, ast);
3526
+ part = new _a(null, ast);
3481
3527
  continue;
3482
3528
  }
3483
3529
  if (c === ")") {
@@ -3496,6 +3542,100 @@ parseAST_fn = function(str, ast, pos, opt) {
3496
3542
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
3497
3543
  return i;
3498
3544
  };
3545
+ canAdoptWithSpace_fn = function(child) {
3546
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
3547
+ };
3548
+ canAdopt_fn = function(child, map2 = adoptionMap) {
3549
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
3550
+ return false;
3551
+ }
3552
+ const gc = __privateGet(child, _parts)[0];
3553
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3554
+ return false;
3555
+ }
3556
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
3557
+ };
3558
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
3559
+ var _a2;
3560
+ return !!((_a2 = map2.get(this.type)) == null ? void 0 : _a2.includes(c));
3561
+ };
3562
+ adoptWithSpace_fn = function(child, index) {
3563
+ const gc = __privateGet(child, _parts)[0];
3564
+ const blank = new _a(null, gc, this.options);
3565
+ __privateGet(blank, _parts).push("");
3566
+ gc.push(blank);
3567
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
3568
+ };
3569
+ adopt_fn = function(child, index) {
3570
+ const gc = __privateGet(child, _parts)[0];
3571
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
3572
+ for (const p of __privateGet(gc, _parts)) {
3573
+ if (typeof p === "object")
3574
+ __privateSet(p, _parent, this);
3575
+ }
3576
+ __privateSet(this, _toString, void 0);
3577
+ };
3578
+ canUsurpType_fn = function(c) {
3579
+ const m = usurpMap.get(this.type);
3580
+ return !!(m == null ? void 0 : m.has(c));
3581
+ };
3582
+ canUsurp_fn = function(child) {
3583
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
3584
+ return false;
3585
+ }
3586
+ const gc = __privateGet(child, _parts)[0];
3587
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3588
+ return false;
3589
+ }
3590
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
3591
+ };
3592
+ usurp_fn = function(child) {
3593
+ const m = usurpMap.get(this.type);
3594
+ const gc = __privateGet(child, _parts)[0];
3595
+ const nt = m == null ? void 0 : m.get(gc.type);
3596
+ if (!nt)
3597
+ return false;
3598
+ __privateSet(this, _parts, __privateGet(gc, _parts));
3599
+ for (const p of __privateGet(this, _parts)) {
3600
+ if (typeof p === "object")
3601
+ __privateSet(p, _parent, this);
3602
+ }
3603
+ this.type = nt;
3604
+ __privateSet(this, _toString, void 0);
3605
+ __privateSet(this, _emptyExt, false);
3606
+ };
3607
+ flatten_fn = function() {
3608
+ var _a2, _b;
3609
+ if (!isExtglobAST(this)) {
3610
+ for (const p of __privateGet(this, _parts)) {
3611
+ if (typeof p === "object")
3612
+ __privateMethod(_a2 = p, _AST_instances, flatten_fn).call(_a2);
3613
+ }
3614
+ } else {
3615
+ let iterations = 0;
3616
+ let done = false;
3617
+ do {
3618
+ done = true;
3619
+ for (let i = 0; i < __privateGet(this, _parts).length; i++) {
3620
+ const c = __privateGet(this, _parts)[i];
3621
+ if (typeof c === "object") {
3622
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
3623
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
3624
+ done = false;
3625
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
3626
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
3627
+ done = false;
3628
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
3629
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
3630
+ done = false;
3631
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
3632
+ }
3633
+ }
3634
+ }
3635
+ } while (!done && ++iterations < 10);
3636
+ }
3637
+ __privateSet(this, _toString, void 0);
3638
+ };
3499
3639
  partsToRegExp_fn = function(dot) {
3500
3640
  return __privateGet(this, _parts).map((p) => {
3501
3641
  if (typeof p === "string") {
@@ -3510,11 +3650,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3510
3650
  let escaping = false;
3511
3651
  let re = "";
3512
3652
  let uflag = false;
3653
+ let inStar = false;
3513
3654
  for (let i = 0; i < glob.length; i++) {
3514
3655
  const c = glob.charAt(i);
3515
3656
  if (escaping) {
3516
3657
  escaping = false;
3517
3658
  re += (reSpecials.has(c) ? "\\" : "") + c;
3659
+ inStar = false;
3518
3660
  continue;
3519
3661
  }
3520
3662
  if (c === "\\") {
@@ -3532,16 +3674,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3532
3674
  uflag = uflag || needUflag;
3533
3675
  i += consumed - 1;
3534
3676
  hasMagic = hasMagic || magic;
3677
+ inStar = false;
3535
3678
  continue;
3536
3679
  }
3537
3680
  }
3538
3681
  if (c === "*") {
3539
- if (noEmpty && glob === "*")
3540
- re += starNoEmpty;
3541
- else
3542
- re += star;
3682
+ if (inStar)
3683
+ continue;
3684
+ inStar = true;
3685
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
3543
3686
  hasMagic = true;
3544
3687
  continue;
3688
+ } else {
3689
+ inStar = false;
3545
3690
  }
3546
3691
  if (c === "?") {
3547
3692
  re += qmark;
@@ -3552,8 +3697,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3552
3697
  }
3553
3698
  return [re, unescape(glob), !!hasMagic, uflag];
3554
3699
  };
3555
- __privateAdd(_AST, _AST_static);
3556
- var AST = _AST;
3700
+ __privateAdd(AST, _AST_static);
3701
+ _a = AST;
3557
3702
 
3558
3703
  // node_modules/minimatch/dist/esm/escape.js
3559
3704
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -3692,28 +3837,33 @@ var match = (list, pattern, options = {}) => {
3692
3837
  minimatch.match = match;
3693
3838
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
3694
3839
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3840
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
3695
3841
  var Minimatch = class {
3696
- options;
3697
- set;
3698
- pattern;
3699
- windowsPathsNoEscape;
3700
- nonegate;
3701
- negate;
3702
- comment;
3703
- empty;
3704
- preserveMultipleSlashes;
3705
- partial;
3706
- globSet;
3707
- globParts;
3708
- nocase;
3709
- isWindows;
3710
- platform;
3711
- windowsNoMagicRoot;
3712
- regexp;
3713
3842
  constructor(pattern, options = {}) {
3843
+ __privateAdd(this, _Minimatch_instances);
3844
+ __publicField(this, "options");
3845
+ __publicField(this, "set");
3846
+ __publicField(this, "pattern");
3847
+ __publicField(this, "windowsPathsNoEscape");
3848
+ __publicField(this, "nonegate");
3849
+ __publicField(this, "negate");
3850
+ __publicField(this, "comment");
3851
+ __publicField(this, "empty");
3852
+ __publicField(this, "preserveMultipleSlashes");
3853
+ __publicField(this, "partial");
3854
+ __publicField(this, "globSet");
3855
+ __publicField(this, "globParts");
3856
+ __publicField(this, "nocase");
3857
+ __publicField(this, "isWindows");
3858
+ __publicField(this, "platform");
3859
+ __publicField(this, "windowsNoMagicRoot");
3860
+ __publicField(this, "maxGlobstarRecursion");
3861
+ __publicField(this, "regexp");
3862
+ var _a2;
3714
3863
  assertValidPattern(pattern);
3715
3864
  options = options || {};
3716
3865
  this.options = options;
3866
+ this.maxGlobstarRecursion = (_a2 = options.maxGlobstarRecursion) != null ? _a2 : 200;
3717
3867
  this.pattern = pattern;
3718
3868
  this.platform = options.platform || defaultPlatform;
3719
3869
  this.isWindows = this.platform === "win32";
@@ -3981,10 +4131,11 @@ var Minimatch = class {
3981
4131
  for (let i = 0; i < globParts.length - 1; i++) {
3982
4132
  for (let j = i + 1; j < globParts.length; j++) {
3983
4133
  const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
3984
- if (!matched)
3985
- continue;
3986
- globParts[i] = matched;
3987
- globParts[j] = [];
4134
+ if (matched) {
4135
+ globParts[i] = [];
4136
+ globParts[j] = matched;
4137
+ break;
4138
+ }
3988
4139
  }
3989
4140
  }
3990
4141
  return globParts.filter((gs) => gs.length);
@@ -4045,7 +4196,8 @@ var Minimatch = class {
4045
4196
  // out of pattern, then that's fine, as long as all
4046
4197
  // the parts match.
4047
4198
  matchOne(file, pattern, partial = false) {
4048
- const options = this.options;
4199
+ let fileStartIndex = 0;
4200
+ let patternStartIndex = 0;
4049
4201
  if (this.isWindows) {
4050
4202
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4051
4203
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4054,14 +4206,14 @@ var Minimatch = class {
4054
4206
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4055
4207
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4056
4208
  if (typeof fdi === "number" && typeof pdi === "number") {
4057
- const [fd, pd] = [file[fdi], pattern[pdi]];
4209
+ const [fd, pd] = [
4210
+ file[fdi],
4211
+ pattern[pdi]
4212
+ ];
4058
4213
  if (fd.toLowerCase() === pd.toLowerCase()) {
4059
4214
  pattern[pdi] = fd;
4060
- if (pdi > fdi) {
4061
- pattern = pattern.slice(pdi);
4062
- } else if (fdi > pdi) {
4063
- file = file.slice(fdi);
4064
- }
4215
+ patternStartIndex = pdi;
4216
+ fileStartIndex = fdi;
4065
4217
  }
4066
4218
  }
4067
4219
  }
@@ -4069,71 +4221,10 @@ var Minimatch = class {
4069
4221
  if (optimizationLevel >= 2) {
4070
4222
  file = this.levelTwoFileOptimize(file);
4071
4223
  }
4072
- this.debug("matchOne", this, { file, pattern });
4073
- this.debug("matchOne", file.length, pattern.length);
4074
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4075
- this.debug("matchOne loop");
4076
- var p = pattern[pi];
4077
- var f = file[fi];
4078
- this.debug(pattern, p, f);
4079
- if (p === false) {
4080
- return false;
4081
- }
4082
- if (p === GLOBSTAR) {
4083
- this.debug("GLOBSTAR", [pattern, p, f]);
4084
- var fr = fi;
4085
- var pr = pi + 1;
4086
- if (pr === pl) {
4087
- this.debug("** at the end");
4088
- for (; fi < fl; fi++) {
4089
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4090
- return false;
4091
- }
4092
- return true;
4093
- }
4094
- while (fr < fl) {
4095
- var swallowee = file[fr];
4096
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4097
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
4098
- this.debug("globstar found match!", fr, fl, swallowee);
4099
- return true;
4100
- } else {
4101
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4102
- this.debug("dot detected!", file, fr, pattern, pr);
4103
- break;
4104
- }
4105
- this.debug("globstar swallow a segment, and continue");
4106
- fr++;
4107
- }
4108
- }
4109
- if (partial) {
4110
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4111
- if (fr === fl) {
4112
- return true;
4113
- }
4114
- }
4115
- return false;
4116
- }
4117
- let hit;
4118
- if (typeof p === "string") {
4119
- hit = f === p;
4120
- this.debug("string match", p, f, hit);
4121
- } else {
4122
- hit = p.test(f);
4123
- this.debug("pattern match", p, f, hit);
4124
- }
4125
- if (!hit)
4126
- return false;
4127
- }
4128
- if (fi === fl && pi === pl) {
4129
- return true;
4130
- } else if (fi === fl) {
4131
- return partial;
4132
- } else if (pi === pl) {
4133
- return fi === fl - 1 && file[fi] === "";
4134
- } else {
4135
- throw new Error("wtf?");
4224
+ if (pattern.includes(GLOBSTAR)) {
4225
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4136
4226
  }
4227
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4137
4228
  }
4138
4229
  braceExpand() {
4139
4230
  return braceExpand(this.pattern, this.options);
@@ -4272,6 +4363,135 @@ var Minimatch = class {
4272
4363
  return minimatch.defaults(def).Minimatch;
4273
4364
  }
4274
4365
  };
4366
+ _Minimatch_instances = new WeakSet();
4367
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4368
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4369
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4370
+ const [head, body, tail] = partial ? [
4371
+ pattern.slice(patternIndex, firstgs),
4372
+ pattern.slice(firstgs + 1),
4373
+ []
4374
+ ] : [
4375
+ pattern.slice(patternIndex, firstgs),
4376
+ pattern.slice(firstgs + 1, lastgs),
4377
+ pattern.slice(lastgs + 1)
4378
+ ];
4379
+ if (head.length) {
4380
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
4381
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
4382
+ return false;
4383
+ fileIndex += head.length;
4384
+ }
4385
+ let fileTailMatch = 0;
4386
+ if (tail.length) {
4387
+ if (tail.length + fileIndex > file.length)
4388
+ return false;
4389
+ let tailStart = file.length - tail.length;
4390
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
4391
+ fileTailMatch = tail.length;
4392
+ } else {
4393
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4394
+ return false;
4395
+ }
4396
+ tailStart--;
4397
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
4398
+ return false;
4399
+ fileTailMatch = tail.length + 1;
4400
+ }
4401
+ }
4402
+ if (!body.length) {
4403
+ let sawSome = !!fileTailMatch;
4404
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
4405
+ const f = String(file[i2]);
4406
+ sawSome = true;
4407
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4408
+ return false;
4409
+ }
4410
+ }
4411
+ return partial || sawSome;
4412
+ }
4413
+ const bodySegments = [[[], 0]];
4414
+ let currentBody = bodySegments[0];
4415
+ let nonGsParts = 0;
4416
+ const nonGsPartsSums = [0];
4417
+ for (const b of body) {
4418
+ if (b === GLOBSTAR) {
4419
+ nonGsPartsSums.push(nonGsParts);
4420
+ currentBody = [[], 0];
4421
+ bodySegments.push(currentBody);
4422
+ } else {
4423
+ currentBody[0].push(b);
4424
+ nonGsParts++;
4425
+ }
4426
+ }
4427
+ let i = bodySegments.length - 1;
4428
+ const fileLength = file.length - fileTailMatch;
4429
+ for (const b of bodySegments) {
4430
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
4431
+ }
4432
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
4433
+ };
4434
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
4435
+ const bs = bodySegments[bodyIndex];
4436
+ if (!bs) {
4437
+ for (let i = fileIndex; i < file.length; i++) {
4438
+ sawTail = true;
4439
+ const f = file[i];
4440
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4441
+ return false;
4442
+ }
4443
+ }
4444
+ return sawTail;
4445
+ }
4446
+ const [body, after] = bs;
4447
+ while (fileIndex <= after) {
4448
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
4449
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4450
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
4451
+ if (sub !== false)
4452
+ return sub;
4453
+ }
4454
+ const f = file[fileIndex];
4455
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4456
+ return false;
4457
+ }
4458
+ fileIndex++;
4459
+ }
4460
+ return partial || null;
4461
+ };
4462
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4463
+ let fi;
4464
+ let pi;
4465
+ let pl;
4466
+ let fl;
4467
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4468
+ this.debug("matchOne loop");
4469
+ let p = pattern[pi];
4470
+ let f = file[fi];
4471
+ this.debug(pattern, p, f);
4472
+ if (p === false || p === GLOBSTAR)
4473
+ return false;
4474
+ let hit;
4475
+ if (typeof p === "string") {
4476
+ hit = f === p;
4477
+ this.debug("string match", p, f, hit);
4478
+ } else {
4479
+ hit = p.test(f);
4480
+ this.debug("pattern match", p, f, hit);
4481
+ }
4482
+ if (!hit)
4483
+ return false;
4484
+ }
4485
+ if (fi === fl && pi === pl) {
4486
+ return true;
4487
+ } else if (fi === fl) {
4488
+ return partial;
4489
+ } else if (pi === pl) {
4490
+ return fi === fl - 1 && file[fi] === "";
4491
+ } else {
4492
+ throw new Error("wtf?");
4493
+ }
4494
+ };
4275
4495
  minimatch.AST = AST;
4276
4496
  minimatch.Minimatch = Minimatch;
4277
4497
  minimatch.escape = escape;
@@ -4908,9 +5128,9 @@ var taskWatch = async (coreCompiler, config) => {
4908
5128
  });
4909
5129
  if (devServer) {
4910
5130
  const rmDevServerLog = watcher.on("buildFinish", () => {
4911
- var _a;
5131
+ var _a2;
4912
5132
  rmDevServerLog();
4913
- const url = (_a = devServer == null ? void 0 : devServer.browserUrl) != null ? _a : "UNKNOWN URL";
5133
+ const url = (_a2 = devServer == null ? void 0 : devServer.browserUrl) != null ? _a2 : "UNKNOWN URL";
4914
5134
  config.logger.info(`${config.logger.cyan(url)}
4915
5135
  `);
4916
5136
  });
@@ -4944,8 +5164,8 @@ var isInteractive = (sys, flags, object) => {
4944
5164
  tty: sys.isTTY() ? true : false,
4945
5165
  ci: ["CI", "BUILD_ID", "BUILD_NUMBER", "BITBUCKET_COMMIT", "CODEBUILD_BUILD_ARN"].filter(
4946
5166
  (v) => {
4947
- var _a;
4948
- return !!((_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, v));
5167
+ var _a2;
5168
+ return !!((_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, v));
4949
5169
  }
4950
5170
  ).length > 0 || !!flags.ci
4951
5171
  });
@@ -5051,22 +5271,22 @@ function hasAppTarget(config) {
5051
5271
  );
5052
5272
  }
5053
5273
  function isUsingYarn(sys) {
5054
- var _a, _b;
5055
- return ((_b = (_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5274
+ var _a2, _b;
5275
+ return ((_b = (_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5056
5276
  }
5057
5277
  function getActiveTargets(config) {
5058
5278
  const result = config.outputTargets.map((t) => t.type);
5059
5279
  return Array.from(new Set(result));
5060
5280
  }
5061
5281
  var prepareData = async (coreCompiler, config, sys, duration_ms, component_count = void 0) => {
5062
- var _a, _b, _c;
5282
+ var _a2, _b, _c;
5063
5283
  const { typescript, rollup } = coreCompiler.versions || { typescript: "unknown", rollup: "unknown" };
5064
5284
  const { packages, packagesNoVersions } = await getInstalledPackages(sys, config);
5065
5285
  const targets = getActiveTargets(config);
5066
5286
  const yarn = isUsingYarn(sys);
5067
5287
  const stencil = coreCompiler.version || "unknown";
5068
5288
  const system = `${sys.name} ${sys.version}`;
5069
- const os_name = (_a = sys.details) == null ? void 0 : _a.platform;
5289
+ const os_name = (_a2 = sys.details) == null ? void 0 : _a2.platform;
5070
5290
  const os_version = (_b = sys.details) == null ? void 0 : _b.release;
5071
5291
  const cpu_model = (_c = sys.details) == null ? void 0 : _c.cpuModel;
5072
5292
  const build = coreCompiler.buildId || "unknown";
@@ -5183,21 +5403,21 @@ async function npmPackages(sys, ionicPackages) {
5183
5403
  const appRootDir = sys.getCurrentDirectory();
5184
5404
  const packageLockJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + "/package-lock.json"));
5185
5405
  return ionicPackages.map(([k, v]) => {
5186
- var _a, _b, _c, _d;
5187
- let version = (_d = (_c = (_a = packageLockJson == null ? void 0 : packageLockJson.dependencies[k]) == null ? void 0 : _a.version) != null ? _c : (_b = packageLockJson == null ? void 0 : packageLockJson.devDependencies[k]) == null ? void 0 : _b.version) != null ? _d : v;
5406
+ var _a2, _b, _c, _d;
5407
+ let version = (_d = (_c = (_a2 = packageLockJson == null ? void 0 : packageLockJson.dependencies[k]) == null ? void 0 : _a2.version) != null ? _c : (_b = packageLockJson == null ? void 0 : packageLockJson.devDependencies[k]) == null ? void 0 : _b.version) != null ? _d : v;
5188
5408
  version = version.includes("file:") ? sanitizeDeclaredVersion(v) : version;
5189
5409
  return `${k}@${version}`;
5190
5410
  });
5191
5411
  }
5192
5412
  async function yarnPackages(sys, ionicPackages) {
5193
- var _a;
5413
+ var _a2;
5194
5414
  const appRootDir = sys.getCurrentDirectory();
5195
5415
  const yarnLock = sys.readFileSync(sys.resolvePath(appRootDir + "/yarn.lock"));
5196
- const yarnLockYml = (_a = sys.parseYarnLockFile) == null ? void 0 : _a.call(sys, yarnLock);
5416
+ const yarnLockYml = (_a2 = sys.parseYarnLockFile) == null ? void 0 : _a2.call(sys, yarnLock);
5197
5417
  return ionicPackages.map(([k, v]) => {
5198
- var _a2;
5418
+ var _a3;
5199
5419
  const identifiedVersion = `${k}@${v}`;
5200
- let version = (_a2 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a2.version;
5420
+ let version = (_a3 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a3.version;
5201
5421
  version = version && version.includes("undefined") ? sanitizeDeclaredVersion(identifiedVersion) : version;
5202
5422
  return `${k}@${version}`;
5203
5423
  });
@@ -5512,8 +5732,8 @@ var toPascalCase = (str) => str.split("-").reduce((res, part) => res + part[0].t
5512
5732
 
5513
5733
  // src/cli/task-telemetry.ts
5514
5734
  var taskTelemetry = async (flags, sys, logger) => {
5515
- var _a;
5516
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5735
+ var _a2;
5736
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5517
5737
  const isEnabling = flags.args.includes("on");
5518
5738
  const isDisabling = flags.args.includes("off");
5519
5739
  const INFORMATION = `Opt in or out of telemetry. Information about the data we collect is available on our website: ${logger.bold(
@@ -5551,8 +5771,8 @@ var taskTelemetry = async (flags, sys, logger) => {
5551
5771
 
5552
5772
  // src/cli/task-help.ts
5553
5773
  var taskHelp = async (flags, logger, sys) => {
5554
- var _a;
5555
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5774
+ var _a2;
5775
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5556
5776
  console.log(`
5557
5777
  ${logger.bold("Build:")} ${logger.dim("Build components for development or production.")}
5558
5778
 
@@ -5651,7 +5871,12 @@ var taskServe = async (config) => {
5651
5871
 
5652
5872
  // src/cli/task-test.ts
5653
5873
  var taskTest = async (config) => {
5654
- var _a;
5874
+ var _a2;
5875
+ config.logger.warn(
5876
+ config.logger.yellow(
5877
+ `[DEPRECATION] Stencil's integrated testing (the 'test' task, --spec and --e2e flags) is deprecated and will be removed in Stencil v5. Migrate spec tests to @stencil/vitest (https://github.com/stenciljs/vitest) and e2e / browser tests to either @stencil/vitest (https://github.com/stenciljs/vitest) or @stencil/playwright (https://github.com/stenciljs/playwright). See https://github.com/stenciljs/core/issues/6584 for full details.`
5878
+ )
5879
+ );
5655
5880
  config.buildDocs = false;
5656
5881
  const testingRunOpts = {
5657
5882
  e2e: !!config.flags.e2e,
@@ -5671,7 +5896,7 @@ var taskTest = async (config) => {
5671
5896
  );
5672
5897
  }
5673
5898
  }
5674
- const diagnostics = await ((_a = config.sys.lazyRequire) == null ? void 0 : _a.ensure(config.rootDir, ensureModuleIds));
5899
+ const diagnostics = await ((_a2 = config.sys.lazyRequire) == null ? void 0 : _a2.ensure(config.rootDir, ensureModuleIds));
5675
5900
  if (diagnostics && diagnostics.length > 0) {
5676
5901
  config.logger.printDiagnostics(diagnostics);
5677
5902
  return config.sys.exit(1);
@@ -5757,8 +5982,8 @@ var run = async (init) => {
5757
5982
  }
5758
5983
  };
5759
5984
  var runTask = async (coreCompiler, config, task, sys) => {
5760
- var _a;
5761
- const flags = createConfigFlags((_a = config.flags) != null ? _a : { task });
5985
+ var _a2;
5986
+ const flags = createConfigFlags((_a2 = config.flags) != null ? _a2 : { task });
5762
5987
  config.flags = flags;
5763
5988
  if (!config.sys) {
5764
5989
  config.sys = sys;