@qwik.dev/core 2.0.0-beta.16 → 2.0.0-beta.18

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/testing",
3
- "version": "2.0.0-beta.16-dev+a83ccf3",
3
+ "version": "2.0.0-beta.18-dev+a8081d4",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "name": "@qwik.dev/core",
3
3
  "description": "An open source framework for building instant loading web apps at any scale, without the extra effort.",
4
- "version": "2.0.0-beta.16",
4
+ "version": "2.0.0-beta.18",
5
5
  "author": "Qwik Team",
6
6
  "bin": {
7
7
  "qwik": "./qwik-cli.mjs"
8
8
  },
9
9
  "bugs": "https://github.com/QwikDev/qwik/issues",
10
10
  "dependencies": {
11
- "csstype": "^3.1.3",
12
- "launch-editor": "^2.11.1",
13
- "rollup": "^4.52.4",
14
- "ts-morph": "23.0.0"
11
+ "csstype": "^3.2.3",
12
+ "launch-editor": "^2.12.0",
13
+ "rollup": "^4.55.1",
14
+ "ts-morph": "27.0.2"
15
15
  },
16
16
  "devDependencies": {
17
- "@croct/json5-parser": "0.2.1",
17
+ "@croct/json5-parser": "0.2.2",
18
18
  "domino": "2.1.6",
19
19
  "ignore": "5.3.1",
20
20
  "image-size": "1.2.1",
21
21
  "kleur": "4.1.5",
22
- "prettier": "3.6.2",
23
- "vitest": "4.0.1",
24
- "@qwik.dev/core": "2.0.0-beta.16",
22
+ "prettier": "3.7.4",
23
+ "vitest": "4.0.16",
24
+ "@qwik.dev/core": "2.0.0-beta.18",
25
25
  "@qwik.dev/dom": "2.1.19"
26
26
  },
27
27
  "engines": {
@@ -171,7 +171,10 @@
171
171
  "url": "https://github.com/QwikDev/qwik.git",
172
172
  "directory": "packages/qwik"
173
173
  },
174
- "sideEffects": false,
174
+ "sideEffects": [
175
+ "./src/testing/vdom-diff.unit-util.ts",
176
+ "./src/testing/mocks.ts"
177
+ ],
175
178
  "type": "module",
176
179
  "types": "./public.d.ts",
177
180
  "scripts": {
Binary file
@@ -1,471 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
- let wasm;
7
-
8
- function addToExternrefTable0(obj) {
9
- const idx = wasm.__externref_table_alloc();
10
- wasm.__wbindgen_export_2.set(idx, obj);
11
- return idx;
12
- }
13
-
14
- function handleError(f, args) {
15
- try {
16
- return f.apply(this, args);
17
- } catch (e) {
18
- const idx = addToExternrefTable0(e);
19
- wasm.__wbindgen_exn_store(idx);
20
- }
21
- }
22
-
23
- function debugString(val) {
24
- // primitive types
25
- const type = typeof val;
26
- if (type == 'number' || type == 'boolean' || val == null) {
27
- return `${val}`;
28
- }
29
- if (type == 'string') {
30
- return `"${val}"`;
31
- }
32
- if (type == 'symbol') {
33
- const description = val.description;
34
- if (description == null) {
35
- return 'Symbol';
36
- } else {
37
- return `Symbol(${description})`;
38
- }
39
- }
40
- if (type == 'function') {
41
- const name = val.name;
42
- if (typeof name == 'string' && name.length > 0) {
43
- return `Function(${name})`;
44
- } else {
45
- return 'Function';
46
- }
47
- }
48
- // objects
49
- if (Array.isArray(val)) {
50
- const length = val.length;
51
- let debug = '[';
52
- if (length > 0) {
53
- debug += debugString(val[0]);
54
- }
55
- for(let i = 1; i < length; i++) {
56
- debug += ', ' + debugString(val[i]);
57
- }
58
- debug += ']';
59
- return debug;
60
- }
61
- // Test for built-in
62
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
63
- let className;
64
- if (builtInMatches && builtInMatches.length > 1) {
65
- className = builtInMatches[1];
66
- } else {
67
- // Failed to match the standard '[object ClassName]'
68
- return toString.call(val);
69
- }
70
- if (className == 'Object') {
71
- // we're a user defined class or Object
72
- // JSON.stringify avoids problems with cycles, and is generally much
73
- // easier than looping through ownProperties of `val`.
74
- try {
75
- return 'Object(' + JSON.stringify(val) + ')';
76
- } catch (_) {
77
- return 'Object';
78
- }
79
- }
80
- // errors
81
- if (val instanceof Error) {
82
- return `${val.name}: ${val.message}\n${val.stack}`;
83
- }
84
- // TODO we could test for more things here, like `Set`s and `Map`s.
85
- return className;
86
- }
87
-
88
- let WASM_VECTOR_LEN = 0;
89
-
90
- let cachedUint8ArrayMemory0 = null;
91
-
92
- function getUint8ArrayMemory0() {
93
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
94
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
95
- }
96
- return cachedUint8ArrayMemory0;
97
- }
98
-
99
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
100
-
101
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
102
- ? function (arg, view) {
103
- return cachedTextEncoder.encodeInto(arg, view);
104
- }
105
- : function (arg, view) {
106
- const buf = cachedTextEncoder.encode(arg);
107
- view.set(buf);
108
- return {
109
- read: arg.length,
110
- written: buf.length
111
- };
112
- });
113
-
114
- function passStringToWasm0(arg, malloc, realloc) {
115
-
116
- if (realloc === undefined) {
117
- const buf = cachedTextEncoder.encode(arg);
118
- const ptr = malloc(buf.length, 1) >>> 0;
119
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
120
- WASM_VECTOR_LEN = buf.length;
121
- return ptr;
122
- }
123
-
124
- let len = arg.length;
125
- let ptr = malloc(len, 1) >>> 0;
126
-
127
- const mem = getUint8ArrayMemory0();
128
-
129
- let offset = 0;
130
-
131
- for (; offset < len; offset++) {
132
- const code = arg.charCodeAt(offset);
133
- if (code > 0x7F) break;
134
- mem[ptr + offset] = code;
135
- }
136
-
137
- if (offset !== len) {
138
- if (offset !== 0) {
139
- arg = arg.slice(offset);
140
- }
141
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
142
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
143
- const ret = encodeString(arg, view);
144
-
145
- offset += ret.written;
146
- ptr = realloc(ptr, len, offset, 1) >>> 0;
147
- }
148
-
149
- WASM_VECTOR_LEN = offset;
150
- return ptr;
151
- }
152
-
153
- let cachedDataViewMemory0 = null;
154
-
155
- function getDataViewMemory0() {
156
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
157
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
158
- }
159
- return cachedDataViewMemory0;
160
- }
161
-
162
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
163
-
164
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
165
- function getStringFromWasm0(ptr, len) {
166
- ptr = ptr >>> 0;
167
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
168
- }
169
-
170
- function isLikeNone(x) {
171
- return x === undefined || x === null;
172
- }
173
-
174
- function takeFromExternrefTable0(idx) {
175
- const value = wasm.__wbindgen_export_2.get(idx);
176
- wasm.__externref_table_dealloc(idx);
177
- return value;
178
- }
179
- /**
180
- * @param {any} config_val
181
- * @returns {any}
182
- */
183
- function transform_modules(config_val) {
184
- const ret = wasm.transform_modules(config_val);
185
- if (ret[2]) {
186
- throw takeFromExternrefTable0(ret[1]);
187
- }
188
- return takeFromExternrefTable0(ret[0]);
189
- }
190
-
191
- async function __wbg_load(module, imports) {
192
- if (typeof Response === 'function' && module instanceof Response) {
193
- if (typeof WebAssembly.instantiateStreaming === 'function') {
194
- try {
195
- return await WebAssembly.instantiateStreaming(module, imports);
196
-
197
- } catch (e) {
198
- if (module.headers.get('Content-Type') != 'application/wasm') {
199
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
200
-
201
- } else {
202
- throw e;
203
- }
204
- }
205
- }
206
-
207
- const bytes = await module.arrayBuffer();
208
- return await WebAssembly.instantiate(bytes, imports);
209
-
210
- } else {
211
- const instance = await WebAssembly.instantiate(module, imports);
212
-
213
- if (instance instanceof WebAssembly.Instance) {
214
- return { instance, module };
215
-
216
- } else {
217
- return instance;
218
- }
219
- }
220
- }
221
-
222
- function __wbg_get_imports() {
223
- const imports = {};
224
- imports.wbg = {};
225
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
226
- const ret = arg0.buffer;
227
- return ret;
228
- };
229
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
230
- const ret = arg0.call(arg1);
231
- return ret;
232
- }, arguments) };
233
- imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
234
- const ret = arg0.done;
235
- return ret;
236
- };
237
- imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
238
- const ret = Object.entries(arg0);
239
- return ret;
240
- };
241
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
242
- const ret = Reflect.get(arg0, arg1);
243
- return ret;
244
- }, arguments) };
245
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
246
- const ret = arg0[arg1 >>> 0];
247
- return ret;
248
- };
249
- imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
250
- const ret = arg0[arg1];
251
- return ret;
252
- };
253
- imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
254
- let result;
255
- try {
256
- result = arg0 instanceof ArrayBuffer;
257
- } catch (_) {
258
- result = false;
259
- }
260
- const ret = result;
261
- return ret;
262
- };
263
- imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
264
- let result;
265
- try {
266
- result = arg0 instanceof Uint8Array;
267
- } catch (_) {
268
- result = false;
269
- }
270
- const ret = result;
271
- return ret;
272
- };
273
- imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
274
- const ret = Array.isArray(arg0);
275
- return ret;
276
- };
277
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
278
- const ret = Symbol.iterator;
279
- return ret;
280
- };
281
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
282
- const ret = arg0.length;
283
- return ret;
284
- };
285
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
286
- const ret = arg0.length;
287
- return ret;
288
- };
289
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
290
- const ret = new Object();
291
- return ret;
292
- };
293
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
294
- const ret = new Array();
295
- return ret;
296
- };
297
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
298
- const ret = new Uint8Array(arg0);
299
- return ret;
300
- };
301
- imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
302
- const ret = arg0.next;
303
- return ret;
304
- };
305
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
306
- const ret = arg0.next();
307
- return ret;
308
- }, arguments) };
309
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
310
- arg0[arg1 >>> 0] = arg2;
311
- };
312
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
313
- arg0[arg1] = arg2;
314
- };
315
- imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
316
- arg0.set(arg1, arg2 >>> 0);
317
- };
318
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
319
- const ret = arg0.value;
320
- return ret;
321
- };
322
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
323
- const ret = BigInt.asUintN(64, arg0);
324
- return ret;
325
- };
326
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
327
- const v = arg0;
328
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
329
- return ret;
330
- };
331
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
332
- const ret = debugString(arg1);
333
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
- const len1 = WASM_VECTOR_LEN;
335
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
336
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
337
- };
338
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
339
- const ret = new Error(getStringFromWasm0(arg0, arg1));
340
- return ret;
341
- };
342
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
343
- const ret = arg0 in arg1;
344
- return ret;
345
- };
346
- imports.wbg.__wbindgen_init_externref_table = function() {
347
- const table = wasm.__wbindgen_export_2;
348
- const offset = table.grow(4);
349
- table.set(0, undefined);
350
- table.set(offset + 0, undefined);
351
- table.set(offset + 1, null);
352
- table.set(offset + 2, true);
353
- table.set(offset + 3, false);
354
- };
355
- imports.wbg.__wbindgen_is_function = function(arg0) {
356
- const ret = typeof(arg0) === 'function';
357
- return ret;
358
- };
359
- imports.wbg.__wbindgen_is_object = function(arg0) {
360
- const val = arg0;
361
- const ret = typeof(val) === 'object' && val !== null;
362
- return ret;
363
- };
364
- imports.wbg.__wbindgen_is_string = function(arg0) {
365
- const ret = typeof(arg0) === 'string';
366
- return ret;
367
- };
368
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
369
- const ret = arg0 === undefined;
370
- return ret;
371
- };
372
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
373
- const ret = arg0 == arg1;
374
- return ret;
375
- };
376
- imports.wbg.__wbindgen_memory = function() {
377
- const ret = wasm.memory;
378
- return ret;
379
- };
380
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
381
- const obj = arg1;
382
- const ret = typeof(obj) === 'number' ? obj : undefined;
383
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
384
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
385
- };
386
- imports.wbg.__wbindgen_number_new = function(arg0) {
387
- const ret = arg0;
388
- return ret;
389
- };
390
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
391
- const obj = arg1;
392
- const ret = typeof(obj) === 'string' ? obj : undefined;
393
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
394
- var len1 = WASM_VECTOR_LEN;
395
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
396
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
397
- };
398
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
399
- const ret = getStringFromWasm0(arg0, arg1);
400
- return ret;
401
- };
402
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
403
- throw new Error(getStringFromWasm0(arg0, arg1));
404
- };
405
-
406
- return imports;
407
- }
408
-
409
- function __wbg_finalize_init(instance, module) {
410
- wasm = instance.exports;
411
- __wbg_init.__wbindgen_wasm_module = module;
412
- cachedDataViewMemory0 = null;
413
- cachedUint8ArrayMemory0 = null;
414
-
415
-
416
- wasm.__wbindgen_start();
417
- return wasm;
418
- }
419
-
420
- function initSync(module) {
421
- if (wasm !== undefined) return wasm;
422
-
423
-
424
- if (typeof module !== 'undefined') {
425
- if (Object.getPrototypeOf(module) === Object.prototype) {
426
- ({module} = module);
427
- } else {
428
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
429
- }
430
- }
431
-
432
- const imports = __wbg_get_imports();
433
-
434
- if (!(module instanceof WebAssembly.Module)) {
435
- module = new WebAssembly.Module(module);
436
- }
437
-
438
- const instance = new WebAssembly.Instance(module, imports);
439
-
440
- return __wbg_finalize_init(instance, module);
441
- }
442
-
443
- async function __wbg_init(module_or_path) {
444
- if (wasm !== undefined) return wasm;
445
-
446
-
447
- if (typeof module_or_path !== 'undefined') {
448
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
449
- ({module_or_path} = module_or_path);
450
- } else {
451
- console.warn('using deprecated parameters for the initialization function; pass a single object instead');
452
- }
453
- }
454
-
455
- if (typeof module_or_path === 'undefined') {
456
- module_or_path = new URL('qwik_wasm_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('qwik.wasm.cjs', document.baseURI).href)));
457
- }
458
- const imports = __wbg_get_imports();
459
-
460
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
461
- module_or_path = fetch(module_or_path);
462
- }
463
-
464
- const { instance, module } = await __wbg_load(await module_or_path, imports);
465
-
466
- return __wbg_finalize_init(instance, module);
467
- }
468
-
469
- exports.default = __wbg_init;
470
- exports.initSync = initSync;
471
- exports.transform_modules = transform_modules;