@swc/wasm 1.3.19 → 1.3.20
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/package.json +1 -1
- package/wasm.d.ts +11 -6
- package/wasm.js +69 -69
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -389,11 +389,11 @@ export interface TerserCompressOptions {
|
|
|
389
389
|
export interface TerserMangleOptions {
|
|
390
390
|
props?: TerserManglePropertiesOptions,
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
toplevel?: boolean,
|
|
393
393
|
|
|
394
|
-
|
|
394
|
+
keep_classnames?: boolean,
|
|
395
395
|
|
|
396
|
-
|
|
396
|
+
keep_fnames?: boolean,
|
|
397
397
|
|
|
398
398
|
keep_private_props?: boolean,
|
|
399
399
|
|
|
@@ -703,7 +703,7 @@ export interface JscConfig {
|
|
|
703
703
|
baseUrl?: string
|
|
704
704
|
|
|
705
705
|
paths?: {
|
|
706
|
-
[from: string]: [
|
|
706
|
+
[from: string]: string[]
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
minify?: JsMinifyOptions;
|
|
@@ -932,7 +932,7 @@ export interface GlobalPassOption {
|
|
|
932
932
|
envs?: string[];
|
|
933
933
|
}
|
|
934
934
|
|
|
935
|
-
export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig;
|
|
935
|
+
export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig;
|
|
936
936
|
|
|
937
937
|
export interface BaseModuleConfig {
|
|
938
938
|
/**
|
|
@@ -1093,6 +1093,8 @@ export interface BaseModuleConfig {
|
|
|
1093
1093
|
* If set to true, dynamic imports will be preserved.
|
|
1094
1094
|
*/
|
|
1095
1095
|
ignoreDynamic?: boolean;
|
|
1096
|
+
allowTopLevelThis?: boolean;
|
|
1097
|
+
preserveImportMeta?: boolean;
|
|
1096
1098
|
}
|
|
1097
1099
|
|
|
1098
1100
|
export interface Es6Config extends BaseModuleConfig {
|
|
@@ -1116,7 +1118,10 @@ export interface AmdConfig extends BaseModuleConfig {
|
|
|
1116
1118
|
type: "amd";
|
|
1117
1119
|
moduleId?: string;
|
|
1118
1120
|
}
|
|
1119
|
-
|
|
1121
|
+
export interface SystemjsConfig {
|
|
1122
|
+
type: "systemjs";
|
|
1123
|
+
allowTopLevelThis?: boolean;
|
|
1124
|
+
}
|
|
1120
1125
|
export interface Output {
|
|
1121
1126
|
/**
|
|
1122
1127
|
* Transformed code
|
package/wasm.js
CHANGED
|
@@ -293,13 +293,12 @@ module.exports.parse = function(s, opts) {
|
|
|
293
293
|
/**
|
|
294
294
|
* @param {any} s
|
|
295
295
|
* @param {any} opts
|
|
296
|
-
* @param {any} experimental_plugin_bytes_resolver
|
|
297
296
|
* @returns {any}
|
|
298
297
|
*/
|
|
299
|
-
module.exports.
|
|
298
|
+
module.exports.printSync = function(s, opts) {
|
|
300
299
|
try {
|
|
301
300
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
302
|
-
wasm.
|
|
301
|
+
wasm.printSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
303
302
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
304
303
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
305
304
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -315,23 +314,23 @@ module.exports.transformSync = function(s, opts, experimental_plugin_bytes_resol
|
|
|
315
314
|
/**
|
|
316
315
|
* @param {any} s
|
|
317
316
|
* @param {any} opts
|
|
318
|
-
* @param {any} experimental_plugin_bytes_resolver
|
|
319
317
|
* @returns {Promise<any>}
|
|
320
318
|
*/
|
|
321
|
-
module.exports.
|
|
322
|
-
const ret = wasm.
|
|
319
|
+
module.exports.print = function(s, opts) {
|
|
320
|
+
const ret = wasm.print(addHeapObject(s), addHeapObject(opts));
|
|
323
321
|
return takeObject(ret);
|
|
324
322
|
};
|
|
325
323
|
|
|
326
324
|
/**
|
|
327
325
|
* @param {any} s
|
|
328
326
|
* @param {any} opts
|
|
327
|
+
* @param {any} experimental_plugin_bytes_resolver
|
|
329
328
|
* @returns {any}
|
|
330
329
|
*/
|
|
331
|
-
module.exports.
|
|
330
|
+
module.exports.transformSync = function(s, opts, experimental_plugin_bytes_resolver) {
|
|
332
331
|
try {
|
|
333
332
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
334
|
-
wasm.
|
|
333
|
+
wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts), addHeapObject(experimental_plugin_bytes_resolver));
|
|
335
334
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
336
335
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
337
336
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -347,10 +346,11 @@ module.exports.printSync = function(s, opts) {
|
|
|
347
346
|
/**
|
|
348
347
|
* @param {any} s
|
|
349
348
|
* @param {any} opts
|
|
349
|
+
* @param {any} experimental_plugin_bytes_resolver
|
|
350
350
|
* @returns {Promise<any>}
|
|
351
351
|
*/
|
|
352
|
-
module.exports.
|
|
353
|
-
const ret = wasm.
|
|
352
|
+
module.exports.transform = function(s, opts, experimental_plugin_bytes_resolver) {
|
|
353
|
+
const ret = wasm.transform(addHeapObject(s), addHeapObject(opts), addHeapObject(experimental_plugin_bytes_resolver));
|
|
354
354
|
return takeObject(ret);
|
|
355
355
|
};
|
|
356
356
|
|
|
@@ -405,11 +405,6 @@ module.exports.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
|
|
|
405
405
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
module.exports.__wbg_new_268f7b7dd3430798 = function() {
|
|
409
|
-
const ret = new Map();
|
|
410
|
-
return addHeapObject(ret);
|
|
411
|
-
};
|
|
412
|
-
|
|
413
408
|
module.exports.__wbg_set_933729cf5b66ac11 = function(arg0, arg1, arg2) {
|
|
414
409
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
415
410
|
return addHeapObject(ret);
|
|
@@ -425,14 +420,9 @@ module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
|
425
420
|
return addHeapObject(ret);
|
|
426
421
|
};
|
|
427
422
|
|
|
428
|
-
module.exports.
|
|
429
|
-
const ret =
|
|
430
|
-
return ret;
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
434
|
-
const ret = getObject(arg0) === undefined;
|
|
435
|
-
return ret;
|
|
423
|
+
module.exports.__wbg_new_268f7b7dd3430798 = function() {
|
|
424
|
+
const ret = new Map();
|
|
425
|
+
return addHeapObject(ret);
|
|
436
426
|
};
|
|
437
427
|
|
|
438
428
|
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
@@ -444,48 +434,8 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
444
434
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
445
435
|
};
|
|
446
436
|
|
|
447
|
-
module.exports.
|
|
448
|
-
|
|
449
|
-
var state0 = {a: arg0, b: arg1};
|
|
450
|
-
var cb0 = (arg0, arg1) => {
|
|
451
|
-
const a = state0.a;
|
|
452
|
-
state0.a = 0;
|
|
453
|
-
try {
|
|
454
|
-
return __wbg_adapter_107(a, state0.b, arg0, arg1);
|
|
455
|
-
} finally {
|
|
456
|
-
state0.a = a;
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
const ret = new Promise(cb0);
|
|
460
|
-
return addHeapObject(ret);
|
|
461
|
-
} finally {
|
|
462
|
-
state0.a = state0.b = 0;
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
module.exports.__wbg_next_aaef7c8aa5e212ac = function() { return handleError(function (arg0) {
|
|
467
|
-
const ret = getObject(arg0).next();
|
|
468
|
-
return addHeapObject(ret);
|
|
469
|
-
}, arguments) };
|
|
470
|
-
|
|
471
|
-
module.exports.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
|
472
|
-
const ret = getObject(arg0).done;
|
|
473
|
-
return ret;
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
module.exports.__wbg_value_1ccc36bc03462d71 = function(arg0) {
|
|
477
|
-
const ret = getObject(arg0).value;
|
|
478
|
-
return addHeapObject(ret);
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
module.exports.__wbg_get_57245cc7d7c7619d = function(arg0, arg1) {
|
|
482
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
483
|
-
return addHeapObject(ret);
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
487
|
-
const v = getObject(arg0);
|
|
488
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
437
|
+
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
438
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
489
439
|
return ret;
|
|
490
440
|
};
|
|
491
441
|
|
|
@@ -505,9 +455,9 @@ module.exports.__wbg_length_6e3bbe7c8bd4dbd8 = function(arg0) {
|
|
|
505
455
|
return ret;
|
|
506
456
|
};
|
|
507
457
|
|
|
508
|
-
module.exports.
|
|
509
|
-
const ret = getObject(arg0)
|
|
510
|
-
return ret;
|
|
458
|
+
module.exports.__wbg_get_57245cc7d7c7619d = function(arg0, arg1) {
|
|
459
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
460
|
+
return addHeapObject(ret);
|
|
511
461
|
};
|
|
512
462
|
|
|
513
463
|
module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
@@ -515,11 +465,22 @@ module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
|
|
|
515
465
|
return addHeapObject(ret);
|
|
516
466
|
};
|
|
517
467
|
|
|
468
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
469
|
+
const ret = getObject(arg0) === undefined;
|
|
470
|
+
return ret;
|
|
471
|
+
};
|
|
472
|
+
|
|
518
473
|
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
519
474
|
const ret = getObject(arg0) in getObject(arg1);
|
|
520
475
|
return ret;
|
|
521
476
|
};
|
|
522
477
|
|
|
478
|
+
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
479
|
+
const v = getObject(arg0);
|
|
480
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
481
|
+
return ret;
|
|
482
|
+
};
|
|
483
|
+
|
|
523
484
|
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
524
485
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
525
486
|
return ret;
|
|
@@ -574,6 +535,45 @@ module.exports.__wbg_call_168da88779e35f61 = function() { return handleError(fun
|
|
|
574
535
|
return addHeapObject(ret);
|
|
575
536
|
}, arguments) };
|
|
576
537
|
|
|
538
|
+
module.exports.__wbindgen_is_null = function(arg0) {
|
|
539
|
+
const ret = getObject(arg0) === null;
|
|
540
|
+
return ret;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
module.exports.__wbg_next_aaef7c8aa5e212ac = function() { return handleError(function (arg0) {
|
|
544
|
+
const ret = getObject(arg0).next();
|
|
545
|
+
return addHeapObject(ret);
|
|
546
|
+
}, arguments) };
|
|
547
|
+
|
|
548
|
+
module.exports.__wbg_done_1b73b0672e15f234 = function(arg0) {
|
|
549
|
+
const ret = getObject(arg0).done;
|
|
550
|
+
return ret;
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
module.exports.__wbg_value_1ccc36bc03462d71 = function(arg0) {
|
|
554
|
+
const ret = getObject(arg0).value;
|
|
555
|
+
return addHeapObject(ret);
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
module.exports.__wbg_new_9962f939219f1820 = function(arg0, arg1) {
|
|
559
|
+
try {
|
|
560
|
+
var state0 = {a: arg0, b: arg1};
|
|
561
|
+
var cb0 = (arg0, arg1) => {
|
|
562
|
+
const a = state0.a;
|
|
563
|
+
state0.a = 0;
|
|
564
|
+
try {
|
|
565
|
+
return __wbg_adapter_107(a, state0.b, arg0, arg1);
|
|
566
|
+
} finally {
|
|
567
|
+
state0.a = a;
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
const ret = new Promise(cb0);
|
|
571
|
+
return addHeapObject(ret);
|
|
572
|
+
} finally {
|
|
573
|
+
state0.a = state0.b = 0;
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
|
|
577
577
|
module.exports.__wbg_new0_a57059d72c5b7aee = function() {
|
|
578
578
|
const ret = new Date();
|
|
579
579
|
return addHeapObject(ret);
|
|
@@ -719,7 +719,7 @@ module.exports.__wbg_then_11f7a54d67b4bfad = function(arg0, arg1) {
|
|
|
719
719
|
return addHeapObject(ret);
|
|
720
720
|
};
|
|
721
721
|
|
|
722
|
-
module.exports.
|
|
722
|
+
module.exports.__wbindgen_closure_wrapper18940 = function(arg0, arg1, arg2) {
|
|
723
723
|
const ret = makeMutClosure(arg0, arg1, 226, __wbg_adapter_50);
|
|
724
724
|
return addHeapObject(ret);
|
|
725
725
|
};
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|