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