@noma.to/qwik-mock 1.0.2 → 1.1.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 (53) hide show
  1. package/lib/lib/qwik-mock.cjs +24 -6
  2. package/lib/lib/qwik-mock.mjs +24 -6
  3. package/lib-types/index.d.ts +2 -1
  4. package/lib-types/lib/qwik-mock.d.ts +21 -19
  5. package/package.json +7 -6
  6. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -83
  7. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -83
  8. package/lib/node_modules/.pnpm/@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.cjs +0 -1785
  9. package/lib/node_modules/.pnpm/@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.mjs +0 -1785
  10. package/lib/node_modules/.pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.cjs +0 -964
  11. package/lib/node_modules/.pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.mjs +0 -964
  12. package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.cjs +0 -60
  13. package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.mjs +0 -60
  14. package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.cjs +0 -1102
  15. package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.mjs +0 -1102
  16. package/lib/node_modules/.pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.cjs +0 -1289
  17. package/lib/node_modules/.pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.mjs +0 -1289
  18. package/lib/node_modules/.pnpm/@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.cjs +0 -422
  19. package/lib/node_modules/.pnpm/@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.mjs +0 -422
  20. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs +0 -6
  21. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs +0 -6
  22. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.cjs +0 -98
  23. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +0 -98
  24. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.cjs +0 -1626
  25. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.mjs +0 -1626
  26. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.cjs +0 -690
  27. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.mjs +0 -690
  28. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.cjs +0 -39
  29. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.mjs +0 -39
  30. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.cjs +0 -151
  31. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.mjs +0 -151
  32. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/serialize.cjs +0 -114
  33. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/serialize.mjs +0 -114
  34. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.cjs +0 -125
  35. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.mjs +0 -125
  36. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.cjs +0 -22
  37. package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.mjs +0 -22
  38. package/lib/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.cjs +0 -4056
  39. package/lib/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs +0 -4056
  40. package/lib/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +0 -994
  41. package/lib/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +0 -994
  42. package/lib/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -101
  43. package/lib/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -101
  44. package/lib/node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.cjs +0 -84
  45. package/lib/node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.mjs +0 -84
  46. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.cjs +0 -4
  47. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +0 -4
  48. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.cjs +0 -51
  49. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.mjs +0 -51
  50. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/utils.DvEY5TfP.cjs +0 -45
  51. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/utils.DvEY5TfP.mjs +0 -45
  52. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/vi.2VT5v0um.cjs +0 -2609
  53. package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/vi.2VT5v0um.mjs +0 -2609
@@ -1,125 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const chunkPathe_METhtNZ = require("./chunk-pathe.M-eThtNZ.cjs");
4
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
- var intToChar = new Uint8Array(64);
6
- var charToInt = new Uint8Array(128);
7
- for (let i = 0; i < chars.length; i++) {
8
- const c = chars.charCodeAt(i);
9
- intToChar[i] = c;
10
- charToInt[c] = i;
11
- }
12
- const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
13
- const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
14
- function extractLocation(urlLike) {
15
- if (!urlLike.includes(":")) {
16
- return [urlLike];
17
- }
18
- const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
19
- const parts = regExp.exec(urlLike.replace(/^\(|\)$/g, ""));
20
- if (!parts) {
21
- return [urlLike];
22
- }
23
- let url = parts[1];
24
- if (url.startsWith("async ")) {
25
- url = url.slice(6);
26
- }
27
- if (url.startsWith("http:") || url.startsWith("https:")) {
28
- const urlObj = new URL(url);
29
- urlObj.searchParams.delete("import");
30
- urlObj.searchParams.delete("browserv");
31
- url = urlObj.pathname + urlObj.hash + urlObj.search;
32
- }
33
- if (url.startsWith("/@fs/")) {
34
- const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
35
- url = url.slice(isWindows ? 5 : 4);
36
- }
37
- return [
38
- url,
39
- parts[2] || void 0,
40
- parts[3] || void 0
41
- ];
42
- }
43
- function parseSingleFFOrSafariStack(raw) {
44
- let line = raw.trim();
45
- if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {
46
- return null;
47
- }
48
- if (line.includes(" > eval")) {
49
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
50
- }
51
- if (!line.includes("@")) {
52
- return null;
53
- }
54
- let atIndex = -1;
55
- let locationPart = "";
56
- let functionName;
57
- for (let i = 0; i < line.length; i++) {
58
- if (line[i] === "@") {
59
- const candidateLocation = line.slice(i + 1);
60
- if (candidateLocation.includes(":") && candidateLocation.length >= 3) {
61
- atIndex = i;
62
- locationPart = candidateLocation;
63
- functionName = i > 0 ? line.slice(0, i) : void 0;
64
- break;
65
- }
66
- }
67
- }
68
- if (atIndex === -1 || !locationPart.includes(":") || locationPart.length < 3) {
69
- return null;
70
- }
71
- const [url, lineNumber, columnNumber] = extractLocation(locationPart);
72
- if (!url || !lineNumber || !columnNumber) {
73
- return null;
74
- }
75
- return {
76
- file: url,
77
- method: functionName || "",
78
- line: Number.parseInt(lineNumber),
79
- column: Number.parseInt(columnNumber)
80
- };
81
- }
82
- function parseSingleStack(raw) {
83
- const line = raw.trim();
84
- if (!CHROME_IE_STACK_REGEXP.test(line)) {
85
- return parseSingleFFOrSafariStack(line);
86
- }
87
- return parseSingleV8Stack(line);
88
- }
89
- function parseSingleV8Stack(raw) {
90
- let line = raw.trim();
91
- if (!CHROME_IE_STACK_REGEXP.test(line)) {
92
- return null;
93
- }
94
- if (line.includes("(eval ")) {
95
- line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
96
- }
97
- let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
98
- const location = sanitizedLine.match(/ (\(.+\)$)/);
99
- sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
100
- const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
101
- let method = location && sanitizedLine || "";
102
- let file = url && ["eval", "<anonymous>"].includes(url) ? void 0 : url;
103
- if (!file || !lineNumber || !columnNumber) {
104
- return null;
105
- }
106
- if (method.startsWith("async ")) {
107
- method = method.slice(6);
108
- }
109
- if (file.startsWith("file://")) {
110
- file = file.slice(7);
111
- }
112
- file = file.startsWith("node:") || file.startsWith("internal:") ? file : chunkPathe_METhtNZ.r(file);
113
- if (method) {
114
- method = method.replace(/__vite_ssr_import_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
115
- }
116
- return {
117
- method,
118
- file,
119
- line: Number.parseInt(lineNumber),
120
- column: Number.parseInt(columnNumber)
121
- };
122
- }
123
- exports.parseSingleFFOrSafariStack = parseSingleFFOrSafariStack;
124
- exports.parseSingleStack = parseSingleStack;
125
- exports.parseSingleV8Stack = parseSingleV8Stack;
@@ -1,125 +0,0 @@
1
- import { r as resolve } from "./chunk-pathe.M-eThtNZ.mjs";
2
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3
- var intToChar = new Uint8Array(64);
4
- var charToInt = new Uint8Array(128);
5
- for (let i = 0; i < chars.length; i++) {
6
- const c = chars.charCodeAt(i);
7
- intToChar[i] = c;
8
- charToInt[c] = i;
9
- }
10
- const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
11
- const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
12
- function extractLocation(urlLike) {
13
- if (!urlLike.includes(":")) {
14
- return [urlLike];
15
- }
16
- const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
17
- const parts = regExp.exec(urlLike.replace(/^\(|\)$/g, ""));
18
- if (!parts) {
19
- return [urlLike];
20
- }
21
- let url = parts[1];
22
- if (url.startsWith("async ")) {
23
- url = url.slice(6);
24
- }
25
- if (url.startsWith("http:") || url.startsWith("https:")) {
26
- const urlObj = new URL(url);
27
- urlObj.searchParams.delete("import");
28
- urlObj.searchParams.delete("browserv");
29
- url = urlObj.pathname + urlObj.hash + urlObj.search;
30
- }
31
- if (url.startsWith("/@fs/")) {
32
- const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
33
- url = url.slice(isWindows ? 5 : 4);
34
- }
35
- return [
36
- url,
37
- parts[2] || void 0,
38
- parts[3] || void 0
39
- ];
40
- }
41
- function parseSingleFFOrSafariStack(raw) {
42
- let line = raw.trim();
43
- if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {
44
- return null;
45
- }
46
- if (line.includes(" > eval")) {
47
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
48
- }
49
- if (!line.includes("@")) {
50
- return null;
51
- }
52
- let atIndex = -1;
53
- let locationPart = "";
54
- let functionName;
55
- for (let i = 0; i < line.length; i++) {
56
- if (line[i] === "@") {
57
- const candidateLocation = line.slice(i + 1);
58
- if (candidateLocation.includes(":") && candidateLocation.length >= 3) {
59
- atIndex = i;
60
- locationPart = candidateLocation;
61
- functionName = i > 0 ? line.slice(0, i) : void 0;
62
- break;
63
- }
64
- }
65
- }
66
- if (atIndex === -1 || !locationPart.includes(":") || locationPart.length < 3) {
67
- return null;
68
- }
69
- const [url, lineNumber, columnNumber] = extractLocation(locationPart);
70
- if (!url || !lineNumber || !columnNumber) {
71
- return null;
72
- }
73
- return {
74
- file: url,
75
- method: functionName || "",
76
- line: Number.parseInt(lineNumber),
77
- column: Number.parseInt(columnNumber)
78
- };
79
- }
80
- function parseSingleStack(raw) {
81
- const line = raw.trim();
82
- if (!CHROME_IE_STACK_REGEXP.test(line)) {
83
- return parseSingleFFOrSafariStack(line);
84
- }
85
- return parseSingleV8Stack(line);
86
- }
87
- function parseSingleV8Stack(raw) {
88
- let line = raw.trim();
89
- if (!CHROME_IE_STACK_REGEXP.test(line)) {
90
- return null;
91
- }
92
- if (line.includes("(eval ")) {
93
- line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
94
- }
95
- let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
96
- const location = sanitizedLine.match(/ (\(.+\)$)/);
97
- sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
98
- const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
99
- let method = location && sanitizedLine || "";
100
- let file = url && ["eval", "<anonymous>"].includes(url) ? void 0 : url;
101
- if (!file || !lineNumber || !columnNumber) {
102
- return null;
103
- }
104
- if (method.startsWith("async ")) {
105
- method = method.slice(6);
106
- }
107
- if (file.startsWith("file://")) {
108
- file = file.slice(7);
109
- }
110
- file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
111
- if (method) {
112
- method = method.replace(/__vite_ssr_import_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
113
- }
114
- return {
115
- method,
116
- file,
117
- line: Number.parseInt(lineNumber),
118
- column: Number.parseInt(columnNumber)
119
- };
120
- }
121
- export {
122
- parseSingleFFOrSafariStack,
123
- parseSingleStack,
124
- parseSingleV8Stack
125
- };
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SAFE_TIMERS_SYMBOL = /* @__PURE__ */ Symbol("vitest:SAFE_TIMERS");
4
- function getSafeTimers() {
5
- const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
6
- const { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || {};
7
- return {
8
- nextTick: safeNextTick,
9
- setTimeout: safeSetTimeout,
10
- setInterval: safeSetInterval,
11
- clearInterval: safeClearInterval,
12
- clearTimeout: safeClearTimeout,
13
- setImmediate: safeSetImmediate,
14
- clearImmediate: safeClearImmediate,
15
- queueMicrotask: safeQueueMicrotask
16
- };
17
- }
18
- function delay(timeout, scheduler = setTimeout) {
19
- return new Promise((resolve) => scheduler(resolve, timeout));
20
- }
21
- exports.delay = delay;
22
- exports.getSafeTimers = getSafeTimers;
@@ -1,22 +0,0 @@
1
- const SAFE_TIMERS_SYMBOL = /* @__PURE__ */ Symbol("vitest:SAFE_TIMERS");
2
- function getSafeTimers() {
3
- const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
4
- const { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || {};
5
- return {
6
- nextTick: safeNextTick,
7
- setTimeout: safeSetTimeout,
8
- setInterval: safeSetInterval,
9
- clearInterval: safeClearInterval,
10
- clearTimeout: safeClearTimeout,
11
- setImmediate: safeSetImmediate,
12
- clearImmediate: safeClearImmediate,
13
- queueMicrotask: safeQueueMicrotask
14
- };
15
- }
16
- function delay(timeout, scheduler = setTimeout) {
17
- return new Promise((resolve) => scheduler(resolve, timeout));
18
- }
19
- export {
20
- delay,
21
- getSafeTimers
22
- };