@noma.to/qwik-testing-library 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +4 -3
  2. package/lib/lib/mock.qwik.cjs +3 -3
  3. package/lib/lib/mock.qwik.mjs +1 -1
  4. package/lib/lib/qwik-testing-library.qwik.cjs +2 -2
  5. package/lib/lib/qwik-testing-library.qwik.mjs +3 -3
  6. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.cjs +89 -0
  7. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.mjs +89 -0
  8. package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.cjs +321 -97
  9. package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.mjs +318 -94
  10. package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +312 -15
  11. package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +317 -20
  12. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +2 -2
  13. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +2 -2
  14. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.cjs +161 -69
  15. package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.mjs +158 -66
  16. package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.cjs +976 -538
  17. package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.mjs +976 -538
  18. package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.cjs +20 -3
  19. package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.mjs +20 -3
  20. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs} +7 -3
  21. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs} +7 -3
  22. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.cjs +491 -467
  23. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.mjs +491 -467
  24. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.cjs +6 -6
  25. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.mjs +3 -3
  26. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.cjs +474 -0
  27. package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.mjs +474 -0
  28. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/source-map.qwik.cjs +20 -20
  29. package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/source-map.qwik.mjs +20 -20
  30. package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.cjs +71 -39
  31. package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.mjs +71 -39
  32. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/error.qwik.cjs +7 -1
  33. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/error.qwik.mjs +7 -1
  34. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.mjs +6 -6
  35. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.cjs +1 -3
  36. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.mjs +1 -3
  37. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.cjs +1 -1
  38. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.mjs +1 -1
  39. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/string.qwik.cjs +1 -2
  40. package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/string.qwik.mjs +1 -2
  41. package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.cjs +44 -33
  42. package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.mjs +44 -33
  43. package/lib/node_modules/.pnpm/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.cjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.cjs} +2 -2
  44. package/lib/node_modules/.pnpm/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.mjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.mjs} +2 -2
  45. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +4 -0
  46. package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +5 -0
  47. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +66 -0
  48. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +66 -0
  49. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.cjs +2977 -0
  50. package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.mjs +2977 -0
  51. package/package.json +13 -13
  52. package/lib/_virtual/_commonjsHelpers.qwik.cjs +0 -4
  53. package/lib/_virtual/_commonjsHelpers.qwik.mjs +0 -4
  54. package/lib/_virtual/sourcemap-codec.umd.qwik.cjs +0 -4
  55. package/lib/_virtual/sourcemap-codec.umd.qwik.mjs +0 -4
  56. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.cjs +0 -425
  57. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.mjs +0 -425
  58. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.cjs +0 -81
  59. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.mjs +0 -81
  60. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +0 -7
  61. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +0 -8
  62. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.cjs +0 -6
  63. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.mjs +0 -6
  64. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.cjs +0 -16
  65. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.mjs +0 -16
  66. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.cjs +0 -2556
  67. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.mjs +0 -2556
  68. /package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.cjs +0 -0
  69. /package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.mjs +0 -0
  70. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.cjs +0 -0
  71. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.mjs +0 -0
  72. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.cjs +0 -0
  73. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.mjs +0 -0
  74. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.cjs +0 -0
  75. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.mjs +0 -0
  76. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.cjs +0 -0
  77. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.mjs +0 -0
  78. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.cjs +0 -0
  79. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.mjs +0 -0
  80. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.cjs +0 -0
  81. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.mjs +0 -0
  82. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.cjs +0 -0
  83. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.mjs +0 -0
  84. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.cjs +0 -0
  85. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.mjs +0 -0
  86. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.cjs +0 -0
  87. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.cjs +0 -0
  88. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.mjs +0 -0
  89. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.cjs +0 -0
  90. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.mjs +0 -0
  91. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.cjs +0 -0
  92. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.mjs +0 -0
  93. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.cjs +0 -0
  94. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.mjs +0 -0
  95. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.cjs +0 -0
  96. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.mjs +0 -0
  97. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.cjs +0 -0
  98. /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.mjs +0 -0
  99. /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.cjs +0 -0
  100. /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.mjs +0 -0
  101. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +0 -0
  102. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +0 -0
  103. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +0 -0
  104. /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const diff = require("./diff.qwik.cjs");
4
- const chunkDisplay = require("./chunk-display.qwik.cjs");
5
- require("../../../../../tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.cjs");
6
- require("../../../../../loupe@3.1.1/node_modules/loupe/lib/index.qwik.cjs");
4
+ const chunk_commonjsHelpers = require("./chunk-_commonjsHelpers.qwik.cjs");
5
+ require("../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs");
6
+ require("../../../../../loupe@3.1.3/node_modules/loupe/lib/index.qwik.cjs");
7
7
  const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
8
8
  const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
9
9
  function isImmutable(v) {
@@ -42,7 +42,7 @@ function serializeValue(val, seen = /* @__PURE__ */ new WeakMap()) {
42
42
  return val.tagName;
43
43
  }
44
44
  if (typeof val.asymmetricMatch === "function") {
45
- return `${val.toString()} ${chunkDisplay.f(val.sample)}`;
45
+ return `${val.toString()} ${chunk_commonjsHelpers.f(val.sample)}`;
46
46
  }
47
47
  if (typeof val.toJSON === "function") {
48
48
  return serializeValue(val.toJSON(), seen);
@@ -103,10 +103,10 @@ function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
103
103
  });
104
104
  }
105
105
  if (typeof err.expected !== "string") {
106
- err.expected = chunkDisplay.s(err.expected, 10);
106
+ err.expected = chunk_commonjsHelpers.s(err.expected, 10);
107
107
  }
108
108
  if (typeof err.actual !== "string") {
109
- err.actual = chunkDisplay.s(err.actual, 10);
109
+ err.actual = chunk_commonjsHelpers.s(err.actual, 10);
110
110
  }
111
111
  try {
112
112
  if (typeof err.message === "string") {
@@ -1,7 +1,7 @@
1
1
  import { printDiffOrStringify } from "./diff.qwik.mjs";
2
- import { s as stringify, f as format } from "./chunk-display.qwik.mjs";
3
- import "../../../../../tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs";
4
- import "../../../../../loupe@3.1.1/node_modules/loupe/lib/index.qwik.mjs";
2
+ import { s as stringify, f as format } from "./chunk-_commonjsHelpers.qwik.mjs";
3
+ import "../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs";
4
+ import "../../../../../loupe@3.1.3/node_modules/loupe/lib/index.qwik.mjs";
5
5
  const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
6
6
  const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
7
7
  function isImmutable(v) {
@@ -0,0 +1,474 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs");
4
+ require("../../../../../loupe@3.1.3/node_modules/loupe/lib/index.qwik.cjs");
5
+ var jsTokens_1;
6
+ var hasRequiredJsTokens;
7
+ function requireJsTokens() {
8
+ if (hasRequiredJsTokens) return jsTokens_1;
9
+ hasRequiredJsTokens = 1;
10
+ var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
11
+ RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;
12
+ Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
13
+ Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;
14
+ StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y;
15
+ NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
16
+ Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y;
17
+ WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu;
18
+ LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
19
+ MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y;
20
+ SingleLineComment = /\/\/.*/y;
21
+ JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
22
+ JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;
23
+ JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y;
24
+ JSXText = /[^<>{}]+/y;
25
+ TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
26
+ TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
27
+ KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
28
+ KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;
29
+ Newline = RegExp(LineTerminatorSequence.source);
30
+ jsTokens_1 = function* (input, { jsx = false } = {}) {
31
+ var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
32
+ ({ length } = input);
33
+ lastIndex = 0;
34
+ lastSignificantToken = "";
35
+ stack = [
36
+ { tag: "JS" }
37
+ ];
38
+ braces = [];
39
+ parenNesting = 0;
40
+ postfixIncDec = false;
41
+ while (lastIndex < length) {
42
+ mode = stack[stack.length - 1];
43
+ switch (mode.tag) {
44
+ case "JS":
45
+ case "JSNonExpressionParen":
46
+ case "InterpolationInTemplate":
47
+ case "InterpolationInJSX":
48
+ if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
49
+ RegularExpressionLiteral.lastIndex = lastIndex;
50
+ if (match = RegularExpressionLiteral.exec(input)) {
51
+ lastIndex = RegularExpressionLiteral.lastIndex;
52
+ lastSignificantToken = match[0];
53
+ postfixIncDec = true;
54
+ yield {
55
+ type: "RegularExpressionLiteral",
56
+ value: match[0],
57
+ closed: match[1] !== void 0 && match[1] !== "\\"
58
+ };
59
+ continue;
60
+ }
61
+ }
62
+ Punctuator.lastIndex = lastIndex;
63
+ if (match = Punctuator.exec(input)) {
64
+ punctuator = match[0];
65
+ nextLastIndex = Punctuator.lastIndex;
66
+ nextLastSignificantToken = punctuator;
67
+ switch (punctuator) {
68
+ case "(":
69
+ if (lastSignificantToken === "?NonExpressionParenKeyword") {
70
+ stack.push({
71
+ tag: "JSNonExpressionParen",
72
+ nesting: parenNesting
73
+ });
74
+ }
75
+ parenNesting++;
76
+ postfixIncDec = false;
77
+ break;
78
+ case ")":
79
+ parenNesting--;
80
+ postfixIncDec = true;
81
+ if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) {
82
+ stack.pop();
83
+ nextLastSignificantToken = "?NonExpressionParenEnd";
84
+ postfixIncDec = false;
85
+ }
86
+ break;
87
+ case "{":
88
+ Punctuator.lastIndex = 0;
89
+ isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));
90
+ braces.push(isExpression);
91
+ postfixIncDec = false;
92
+ break;
93
+ case "}":
94
+ switch (mode.tag) {
95
+ case "InterpolationInTemplate":
96
+ if (braces.length === mode.nesting) {
97
+ Template.lastIndex = lastIndex;
98
+ match = Template.exec(input);
99
+ lastIndex = Template.lastIndex;
100
+ lastSignificantToken = match[0];
101
+ if (match[1] === "${") {
102
+ lastSignificantToken = "?InterpolationInTemplate";
103
+ postfixIncDec = false;
104
+ yield {
105
+ type: "TemplateMiddle",
106
+ value: match[0]
107
+ };
108
+ } else {
109
+ stack.pop();
110
+ postfixIncDec = true;
111
+ yield {
112
+ type: "TemplateTail",
113
+ value: match[0],
114
+ closed: match[1] === "`"
115
+ };
116
+ }
117
+ continue;
118
+ }
119
+ break;
120
+ case "InterpolationInJSX":
121
+ if (braces.length === mode.nesting) {
122
+ stack.pop();
123
+ lastIndex += 1;
124
+ lastSignificantToken = "}";
125
+ yield {
126
+ type: "JSXPunctuator",
127
+ value: "}"
128
+ };
129
+ continue;
130
+ }
131
+ }
132
+ postfixIncDec = braces.pop();
133
+ nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
134
+ break;
135
+ case "]":
136
+ postfixIncDec = true;
137
+ break;
138
+ case "++":
139
+ case "--":
140
+ nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
141
+ break;
142
+ case "<":
143
+ if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
144
+ stack.push({ tag: "JSXTag" });
145
+ lastIndex += 1;
146
+ lastSignificantToken = "<";
147
+ yield {
148
+ type: "JSXPunctuator",
149
+ value: punctuator
150
+ };
151
+ continue;
152
+ }
153
+ postfixIncDec = false;
154
+ break;
155
+ default:
156
+ postfixIncDec = false;
157
+ }
158
+ lastIndex = nextLastIndex;
159
+ lastSignificantToken = nextLastSignificantToken;
160
+ yield {
161
+ type: "Punctuator",
162
+ value: punctuator
163
+ };
164
+ continue;
165
+ }
166
+ Identifier.lastIndex = lastIndex;
167
+ if (match = Identifier.exec(input)) {
168
+ lastIndex = Identifier.lastIndex;
169
+ nextLastSignificantToken = match[0];
170
+ switch (match[0]) {
171
+ case "for":
172
+ case "if":
173
+ case "while":
174
+ case "with":
175
+ if (lastSignificantToken !== "." && lastSignificantToken !== "?.") {
176
+ nextLastSignificantToken = "?NonExpressionParenKeyword";
177
+ }
178
+ }
179
+ lastSignificantToken = nextLastSignificantToken;
180
+ postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);
181
+ yield {
182
+ type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
183
+ value: match[0]
184
+ };
185
+ continue;
186
+ }
187
+ StringLiteral.lastIndex = lastIndex;
188
+ if (match = StringLiteral.exec(input)) {
189
+ lastIndex = StringLiteral.lastIndex;
190
+ lastSignificantToken = match[0];
191
+ postfixIncDec = true;
192
+ yield {
193
+ type: "StringLiteral",
194
+ value: match[0],
195
+ closed: match[2] !== void 0
196
+ };
197
+ continue;
198
+ }
199
+ NumericLiteral.lastIndex = lastIndex;
200
+ if (match = NumericLiteral.exec(input)) {
201
+ lastIndex = NumericLiteral.lastIndex;
202
+ lastSignificantToken = match[0];
203
+ postfixIncDec = true;
204
+ yield {
205
+ type: "NumericLiteral",
206
+ value: match[0]
207
+ };
208
+ continue;
209
+ }
210
+ Template.lastIndex = lastIndex;
211
+ if (match = Template.exec(input)) {
212
+ lastIndex = Template.lastIndex;
213
+ lastSignificantToken = match[0];
214
+ if (match[1] === "${") {
215
+ lastSignificantToken = "?InterpolationInTemplate";
216
+ stack.push({
217
+ tag: "InterpolationInTemplate",
218
+ nesting: braces.length
219
+ });
220
+ postfixIncDec = false;
221
+ yield {
222
+ type: "TemplateHead",
223
+ value: match[0]
224
+ };
225
+ } else {
226
+ postfixIncDec = true;
227
+ yield {
228
+ type: "NoSubstitutionTemplate",
229
+ value: match[0],
230
+ closed: match[1] === "`"
231
+ };
232
+ }
233
+ continue;
234
+ }
235
+ break;
236
+ case "JSXTag":
237
+ case "JSXTagEnd":
238
+ JSXPunctuator.lastIndex = lastIndex;
239
+ if (match = JSXPunctuator.exec(input)) {
240
+ lastIndex = JSXPunctuator.lastIndex;
241
+ nextLastSignificantToken = match[0];
242
+ switch (match[0]) {
243
+ case "<":
244
+ stack.push({ tag: "JSXTag" });
245
+ break;
246
+ case ">":
247
+ stack.pop();
248
+ if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") {
249
+ nextLastSignificantToken = "?JSX";
250
+ postfixIncDec = true;
251
+ } else {
252
+ stack.push({ tag: "JSXChildren" });
253
+ }
254
+ break;
255
+ case "{":
256
+ stack.push({
257
+ tag: "InterpolationInJSX",
258
+ nesting: braces.length
259
+ });
260
+ nextLastSignificantToken = "?InterpolationInJSX";
261
+ postfixIncDec = false;
262
+ break;
263
+ case "/":
264
+ if (lastSignificantToken === "<") {
265
+ stack.pop();
266
+ if (stack[stack.length - 1].tag === "JSXChildren") {
267
+ stack.pop();
268
+ }
269
+ stack.push({ tag: "JSXTagEnd" });
270
+ }
271
+ }
272
+ lastSignificantToken = nextLastSignificantToken;
273
+ yield {
274
+ type: "JSXPunctuator",
275
+ value: match[0]
276
+ };
277
+ continue;
278
+ }
279
+ JSXIdentifier.lastIndex = lastIndex;
280
+ if (match = JSXIdentifier.exec(input)) {
281
+ lastIndex = JSXIdentifier.lastIndex;
282
+ lastSignificantToken = match[0];
283
+ yield {
284
+ type: "JSXIdentifier",
285
+ value: match[0]
286
+ };
287
+ continue;
288
+ }
289
+ JSXString.lastIndex = lastIndex;
290
+ if (match = JSXString.exec(input)) {
291
+ lastIndex = JSXString.lastIndex;
292
+ lastSignificantToken = match[0];
293
+ yield {
294
+ type: "JSXString",
295
+ value: match[0],
296
+ closed: match[2] !== void 0
297
+ };
298
+ continue;
299
+ }
300
+ break;
301
+ case "JSXChildren":
302
+ JSXText.lastIndex = lastIndex;
303
+ if (match = JSXText.exec(input)) {
304
+ lastIndex = JSXText.lastIndex;
305
+ lastSignificantToken = match[0];
306
+ yield {
307
+ type: "JSXText",
308
+ value: match[0]
309
+ };
310
+ continue;
311
+ }
312
+ switch (input[lastIndex]) {
313
+ case "<":
314
+ stack.push({ tag: "JSXTag" });
315
+ lastIndex++;
316
+ lastSignificantToken = "<";
317
+ yield {
318
+ type: "JSXPunctuator",
319
+ value: "<"
320
+ };
321
+ continue;
322
+ case "{":
323
+ stack.push({
324
+ tag: "InterpolationInJSX",
325
+ nesting: braces.length
326
+ });
327
+ lastIndex++;
328
+ lastSignificantToken = "?InterpolationInJSX";
329
+ postfixIncDec = false;
330
+ yield {
331
+ type: "JSXPunctuator",
332
+ value: "{"
333
+ };
334
+ continue;
335
+ }
336
+ }
337
+ WhiteSpace.lastIndex = lastIndex;
338
+ if (match = WhiteSpace.exec(input)) {
339
+ lastIndex = WhiteSpace.lastIndex;
340
+ yield {
341
+ type: "WhiteSpace",
342
+ value: match[0]
343
+ };
344
+ continue;
345
+ }
346
+ LineTerminatorSequence.lastIndex = lastIndex;
347
+ if (match = LineTerminatorSequence.exec(input)) {
348
+ lastIndex = LineTerminatorSequence.lastIndex;
349
+ postfixIncDec = false;
350
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
351
+ lastSignificantToken = "?NoLineTerminatorHere";
352
+ }
353
+ yield {
354
+ type: "LineTerminatorSequence",
355
+ value: match[0]
356
+ };
357
+ continue;
358
+ }
359
+ MultiLineComment.lastIndex = lastIndex;
360
+ if (match = MultiLineComment.exec(input)) {
361
+ lastIndex = MultiLineComment.lastIndex;
362
+ if (Newline.test(match[0])) {
363
+ postfixIncDec = false;
364
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
365
+ lastSignificantToken = "?NoLineTerminatorHere";
366
+ }
367
+ }
368
+ yield {
369
+ type: "MultiLineComment",
370
+ value: match[0],
371
+ closed: match[1] !== void 0
372
+ };
373
+ continue;
374
+ }
375
+ SingleLineComment.lastIndex = lastIndex;
376
+ if (match = SingleLineComment.exec(input)) {
377
+ lastIndex = SingleLineComment.lastIndex;
378
+ postfixIncDec = false;
379
+ yield {
380
+ type: "SingleLineComment",
381
+ value: match[0]
382
+ };
383
+ continue;
384
+ }
385
+ firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));
386
+ lastIndex += firstCodePoint.length;
387
+ lastSignificantToken = firstCodePoint;
388
+ postfixIncDec = false;
389
+ yield {
390
+ type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
391
+ value: firstCodePoint
392
+ };
393
+ }
394
+ return void 0;
395
+ };
396
+ return jsTokens_1;
397
+ }
398
+ requireJsTokens();
399
+ var reservedWords = {
400
+ keyword: [
401
+ "break",
402
+ "case",
403
+ "catch",
404
+ "continue",
405
+ "debugger",
406
+ "default",
407
+ "do",
408
+ "else",
409
+ "finally",
410
+ "for",
411
+ "function",
412
+ "if",
413
+ "return",
414
+ "switch",
415
+ "throw",
416
+ "try",
417
+ "var",
418
+ "const",
419
+ "while",
420
+ "with",
421
+ "new",
422
+ "this",
423
+ "super",
424
+ "class",
425
+ "extends",
426
+ "export",
427
+ "import",
428
+ "null",
429
+ "true",
430
+ "false",
431
+ "in",
432
+ "instanceof",
433
+ "typeof",
434
+ "void",
435
+ "delete"
436
+ ],
437
+ strict: [
438
+ "implements",
439
+ "interface",
440
+ "let",
441
+ "package",
442
+ "private",
443
+ "protected",
444
+ "public",
445
+ "static",
446
+ "yield"
447
+ ]
448
+ };
449
+ new Set(reservedWords.keyword);
450
+ new Set(reservedWords.strict);
451
+ const SAFE_TIMERS_SYMBOL = Symbol("vitest:SAFE_TIMERS");
452
+ function getSafeTimers() {
453
+ const {
454
+ setTimeout: safeSetTimeout,
455
+ setInterval: safeSetInterval,
456
+ clearInterval: safeClearInterval,
457
+ clearTimeout: safeClearTimeout,
458
+ setImmediate: safeSetImmediate,
459
+ clearImmediate: safeClearImmediate,
460
+ queueMicrotask: safeQueueMicrotask
461
+ } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
462
+ const { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || { nextTick: (cb) => cb() };
463
+ return {
464
+ nextTick: safeNextTick,
465
+ setTimeout: safeSetTimeout,
466
+ setInterval: safeSetInterval,
467
+ clearInterval: safeClearInterval,
468
+ clearTimeout: safeClearTimeout,
469
+ setImmediate: safeSetImmediate,
470
+ clearImmediate: safeClearImmediate,
471
+ queueMicrotask: safeQueueMicrotask
472
+ };
473
+ }
474
+ exports.getSafeTimers = getSafeTimers;