mol_compare_deep 0.0.1467 → 0.0.1469
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/node.test.js +158 -164
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -217,133 +217,24 @@ var $;
|
|
|
217
217
|
$.$mol_fail_hidden = $mol_fail_hidden;
|
|
218
218
|
})($ || ($ = {}));
|
|
219
219
|
|
|
220
|
-
;
|
|
221
|
-
"use strict";
|
|
222
|
-
var $node = new Proxy({ require }, {
|
|
223
|
-
get(target, name, wrapper) {
|
|
224
|
-
if (target[name])
|
|
225
|
-
return target[name];
|
|
226
|
-
const $$ = $;
|
|
227
|
-
if ($$.$node_internal_check(name, target))
|
|
228
|
-
return target.require(name);
|
|
229
|
-
if (name[0] === '.')
|
|
230
|
-
return target.require(name);
|
|
231
|
-
try {
|
|
232
|
-
target.require.resolve(name);
|
|
233
|
-
}
|
|
234
|
-
catch {
|
|
235
|
-
try {
|
|
236
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
237
|
-
}
|
|
238
|
-
catch (e) {
|
|
239
|
-
if ($$.$mol_promise_like(e))
|
|
240
|
-
$$.$mol_fail_hidden(e);
|
|
241
|
-
}
|
|
242
|
-
try {
|
|
243
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
244
|
-
}
|
|
245
|
-
catch (e) {
|
|
246
|
-
if ($$.$mol_promise_like(e))
|
|
247
|
-
$$.$mol_fail_hidden(e);
|
|
248
|
-
$$.$mol_fail_log(e);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return target.require(name);
|
|
252
|
-
},
|
|
253
|
-
set(target, name, value) {
|
|
254
|
-
target[name] = value;
|
|
255
|
-
return true;
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
const cache = new Map();
|
|
259
|
-
require = (req => Object.assign(function require(name) {
|
|
260
|
-
return $node[name];
|
|
261
|
-
}, req))(require);
|
|
262
|
-
|
|
263
|
-
;
|
|
264
|
-
"use strict";
|
|
265
|
-
var $;
|
|
266
|
-
(function ($) {
|
|
267
|
-
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
268
|
-
})($ || ($ = {}));
|
|
269
|
-
|
|
270
|
-
;
|
|
271
|
-
"use strict";
|
|
272
|
-
var $;
|
|
273
|
-
(function ($) {
|
|
274
|
-
$.$mol_dom = $mol_dom_context;
|
|
275
|
-
})($ || ($ = {}));
|
|
276
|
-
|
|
277
220
|
;
|
|
278
221
|
"use strict";
|
|
279
222
|
var $;
|
|
280
223
|
(function ($) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
break;
|
|
292
|
-
}
|
|
293
|
-
if (nextNode == view) {
|
|
294
|
-
nextNode = nextNode.nextSibling;
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
298
|
-
if (node_set.has(nextNode)) {
|
|
299
|
-
el.insertBefore(view, nextNode);
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
const nn = nextNode.nextSibling;
|
|
304
|
-
el.removeChild(nextNode);
|
|
305
|
-
nextNode = nn;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
if (nextNode && nextNode.nodeName === '#text') {
|
|
312
|
-
const str = String(view);
|
|
313
|
-
if (nextNode.nodeValue !== str)
|
|
314
|
-
nextNode.nodeValue = str;
|
|
315
|
-
nextNode = nextNode.nextSibling;
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
319
|
-
el.insertBefore(textNode, nextNode);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
while (nextNode) {
|
|
324
|
-
const currNode = nextNode;
|
|
325
|
-
nextNode = currNode.nextSibling;
|
|
326
|
-
el.removeChild(currNode);
|
|
327
|
-
}
|
|
224
|
+
const catched = new WeakSet();
|
|
225
|
+
function $mol_fail_catch(error) {
|
|
226
|
+
if (typeof error !== 'object')
|
|
227
|
+
return false;
|
|
228
|
+
if ($mol_promise_like(error))
|
|
229
|
+
$mol_fail_hidden(error);
|
|
230
|
+
if (catched.has(error))
|
|
231
|
+
return false;
|
|
232
|
+
catched.add(error);
|
|
233
|
+
return true;
|
|
328
234
|
}
|
|
329
|
-
$.$
|
|
235
|
+
$.$mol_fail_catch = $mol_fail_catch;
|
|
330
236
|
})($ || ($ = {}));
|
|
331
237
|
|
|
332
|
-
;
|
|
333
|
-
"use strict";
|
|
334
|
-
|
|
335
|
-
;
|
|
336
|
-
"use strict";
|
|
337
|
-
|
|
338
|
-
;
|
|
339
|
-
"use strict";
|
|
340
|
-
|
|
341
|
-
;
|
|
342
|
-
"use strict";
|
|
343
|
-
|
|
344
|
-
;
|
|
345
|
-
"use strict";
|
|
346
|
-
|
|
347
238
|
;
|
|
348
239
|
"use strict";
|
|
349
240
|
var $;
|
|
@@ -746,13 +637,87 @@ var $;
|
|
|
746
637
|
"use strict";
|
|
747
638
|
var $;
|
|
748
639
|
(function ($) {
|
|
749
|
-
function $
|
|
750
|
-
|
|
751
|
-
|
|
640
|
+
function $mol_try(handler) {
|
|
641
|
+
try {
|
|
642
|
+
return handler();
|
|
643
|
+
}
|
|
644
|
+
catch (error) {
|
|
645
|
+
return error;
|
|
646
|
+
}
|
|
752
647
|
}
|
|
753
|
-
$.$
|
|
648
|
+
$.$mol_try = $mol_try;
|
|
649
|
+
})($ || ($ = {}));
|
|
650
|
+
|
|
651
|
+
;
|
|
652
|
+
"use strict";
|
|
653
|
+
var $;
|
|
654
|
+
(function ($) {
|
|
655
|
+
$mol_test({
|
|
656
|
+
'return result without errors'() {
|
|
657
|
+
$mol_assert_equal($mol_try(() => false), false);
|
|
658
|
+
},
|
|
659
|
+
});
|
|
660
|
+
})($ || ($ = {}));
|
|
661
|
+
|
|
662
|
+
;
|
|
663
|
+
"use strict";
|
|
664
|
+
var $;
|
|
665
|
+
(function ($) {
|
|
666
|
+
function $mol_fail_log(error) {
|
|
667
|
+
if ($mol_promise_like(error))
|
|
668
|
+
return false;
|
|
669
|
+
if (!$mol_fail_catch(error))
|
|
670
|
+
return false;
|
|
671
|
+
$mol_try(() => { $mol_fail_hidden(error); });
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
$.$mol_fail_log = $mol_fail_log;
|
|
675
|
+
})($ || ($ = {}));
|
|
676
|
+
|
|
677
|
+
;
|
|
678
|
+
"use strict";
|
|
679
|
+
var $;
|
|
680
|
+
(function ($_1) {
|
|
681
|
+
$mol_test_mocks.push($ => $.$mol_fail_log = () => false);
|
|
754
682
|
})($ || ($ = {}));
|
|
755
683
|
|
|
684
|
+
;
|
|
685
|
+
"use strict";
|
|
686
|
+
var $node = new Proxy({ require }, {
|
|
687
|
+
get(target, name, wrapper) {
|
|
688
|
+
if (target[name])
|
|
689
|
+
return target[name];
|
|
690
|
+
const $$ = $;
|
|
691
|
+
if ($$.$node_internal_check(name, target))
|
|
692
|
+
return target.require(name);
|
|
693
|
+
if (name[0] === '.')
|
|
694
|
+
return target.require(name);
|
|
695
|
+
try {
|
|
696
|
+
target.require.resolve(name);
|
|
697
|
+
}
|
|
698
|
+
catch {
|
|
699
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
700
|
+
try {
|
|
701
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
702
|
+
}
|
|
703
|
+
catch (e) {
|
|
704
|
+
if ($$.$mol_promise_like(e))
|
|
705
|
+
$$.$mol_fail_hidden(e);
|
|
706
|
+
$$.$mol_fail_log(e);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return target.require(name);
|
|
710
|
+
},
|
|
711
|
+
set(target, name, value) {
|
|
712
|
+
target[name] = value;
|
|
713
|
+
return true;
|
|
714
|
+
},
|
|
715
|
+
});
|
|
716
|
+
const cache = new Map();
|
|
717
|
+
require = (req => Object.assign(function require(name) {
|
|
718
|
+
return $node[name];
|
|
719
|
+
}, req))(require);
|
|
720
|
+
|
|
756
721
|
;
|
|
757
722
|
"use strict";
|
|
758
723
|
var $;
|
|
@@ -941,6 +906,15 @@ var $;
|
|
|
941
906
|
;
|
|
942
907
|
"use strict";
|
|
943
908
|
|
|
909
|
+
;
|
|
910
|
+
"use strict";
|
|
911
|
+
|
|
912
|
+
;
|
|
913
|
+
"use strict";
|
|
914
|
+
|
|
915
|
+
;
|
|
916
|
+
"use strict";
|
|
917
|
+
|
|
944
918
|
;
|
|
945
919
|
"use strict";
|
|
946
920
|
var $;
|
|
@@ -3316,66 +3290,86 @@ var $;
|
|
|
3316
3290
|
"use strict";
|
|
3317
3291
|
var $;
|
|
3318
3292
|
(function ($) {
|
|
3319
|
-
|
|
3320
|
-
function $mol_fail_catch(error) {
|
|
3321
|
-
if (typeof error !== 'object')
|
|
3322
|
-
return false;
|
|
3323
|
-
if ($mol_promise_like(error))
|
|
3324
|
-
$mol_fail_hidden(error);
|
|
3325
|
-
if (catched.has(error))
|
|
3326
|
-
return false;
|
|
3327
|
-
catched.add(error);
|
|
3328
|
-
return true;
|
|
3329
|
-
}
|
|
3330
|
-
$.$mol_fail_catch = $mol_fail_catch;
|
|
3293
|
+
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
3331
3294
|
})($ || ($ = {}));
|
|
3332
3295
|
|
|
3333
3296
|
;
|
|
3334
3297
|
"use strict";
|
|
3335
3298
|
var $;
|
|
3336
3299
|
(function ($) {
|
|
3337
|
-
|
|
3338
|
-
try {
|
|
3339
|
-
return handler();
|
|
3340
|
-
}
|
|
3341
|
-
catch (error) {
|
|
3342
|
-
return error;
|
|
3343
|
-
}
|
|
3344
|
-
}
|
|
3345
|
-
$.$mol_try = $mol_try;
|
|
3300
|
+
$.$mol_dom = $mol_dom_context;
|
|
3346
3301
|
})($ || ($ = {}));
|
|
3347
3302
|
|
|
3348
3303
|
;
|
|
3349
3304
|
"use strict";
|
|
3350
3305
|
var $;
|
|
3351
3306
|
(function ($) {
|
|
3352
|
-
$
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3307
|
+
function $mol_dom_render_children(el, childNodes) {
|
|
3308
|
+
const node_set = new Set(childNodes);
|
|
3309
|
+
let nextNode = el.firstChild;
|
|
3310
|
+
for (let view of childNodes) {
|
|
3311
|
+
if (view == null)
|
|
3312
|
+
continue;
|
|
3313
|
+
if (view instanceof $mol_dom_context.Node) {
|
|
3314
|
+
while (true) {
|
|
3315
|
+
if (!nextNode) {
|
|
3316
|
+
el.appendChild(view);
|
|
3317
|
+
break;
|
|
3318
|
+
}
|
|
3319
|
+
if (nextNode == view) {
|
|
3320
|
+
nextNode = nextNode.nextSibling;
|
|
3321
|
+
break;
|
|
3322
|
+
}
|
|
3323
|
+
else {
|
|
3324
|
+
if (node_set.has(nextNode)) {
|
|
3325
|
+
el.insertBefore(view, nextNode);
|
|
3326
|
+
break;
|
|
3327
|
+
}
|
|
3328
|
+
else {
|
|
3329
|
+
const nn = nextNode.nextSibling;
|
|
3330
|
+
el.removeChild(nextNode);
|
|
3331
|
+
nextNode = nn;
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
else {
|
|
3337
|
+
if (nextNode && nextNode.nodeName === '#text') {
|
|
3338
|
+
const str = String(view);
|
|
3339
|
+
if (nextNode.nodeValue !== str)
|
|
3340
|
+
nextNode.nodeValue = str;
|
|
3341
|
+
nextNode = nextNode.nextSibling;
|
|
3342
|
+
}
|
|
3343
|
+
else {
|
|
3344
|
+
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
3345
|
+
el.insertBefore(textNode, nextNode);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
while (nextNode) {
|
|
3350
|
+
const currNode = nextNode;
|
|
3351
|
+
nextNode = currNode.nextSibling;
|
|
3352
|
+
el.removeChild(currNode);
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
3357
3356
|
})($ || ($ = {}));
|
|
3358
3357
|
|
|
3359
3358
|
;
|
|
3360
3359
|
"use strict";
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
if ($mol_promise_like(error))
|
|
3365
|
-
return false;
|
|
3366
|
-
if (!$mol_fail_catch(error))
|
|
3367
|
-
return false;
|
|
3368
|
-
$mol_try(() => { $mol_fail_hidden(error); });
|
|
3369
|
-
return true;
|
|
3370
|
-
}
|
|
3371
|
-
$.$mol_fail_log = $mol_fail_log;
|
|
3372
|
-
})($ || ($ = {}));
|
|
3360
|
+
|
|
3361
|
+
;
|
|
3362
|
+
"use strict";
|
|
3373
3363
|
|
|
3374
3364
|
;
|
|
3375
3365
|
"use strict";
|
|
3376
3366
|
var $;
|
|
3377
|
-
(function ($
|
|
3378
|
-
$
|
|
3367
|
+
(function ($) {
|
|
3368
|
+
function $mol_dom_serialize(node) {
|
|
3369
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
3370
|
+
return serializer.serializeToString(node);
|
|
3371
|
+
}
|
|
3372
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
3379
3373
|
})($ || ($ = {}));
|
|
3380
3374
|
|
|
3381
3375
|
;
|