@next/swc-wasm-web 12.0.8-canary.5 → 12.0.8
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 +2 -2
- package/wasm.js +44 -44
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {any} opts
|
|
6
6
|
* @returns {any}
|
|
7
7
|
*/
|
|
8
|
-
export function
|
|
8
|
+
export function browserslist(query: string, opts: any): any;
|
|
9
9
|
/**
|
|
10
10
|
* @param {string} s
|
|
11
11
|
* @param {any} opts
|
|
@@ -23,7 +23,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
23
23
|
|
|
24
24
|
export interface InitOutput {
|
|
25
25
|
readonly memory: WebAssembly.Memory;
|
|
26
|
-
readonly
|
|
26
|
+
readonly browserslist: (a: number, b: number, c: number) => number;
|
|
27
27
|
readonly minifySync: (a: number, b: number, c: number) => number;
|
|
28
28
|
readonly transformSync: (a: number, b: number, c: number) => number;
|
|
29
29
|
readonly __wbindgen_malloc: (a: number) => number;
|
package/wasm.js
CHANGED
|
@@ -21,7 +21,18 @@ function takeObject(idx) {
|
|
|
21
21
|
return ret;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
function addHeapObject(obj) {
|
|
25
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
26
|
+
const idx = heap_next;
|
|
27
|
+
heap_next = heap[idx];
|
|
28
|
+
|
|
29
|
+
heap[idx] = obj;
|
|
30
|
+
return idx;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
34
|
+
|
|
35
|
+
cachedTextDecoder.decode();
|
|
25
36
|
|
|
26
37
|
let cachegetUint8Memory0 = null;
|
|
27
38
|
function getUint8Memory0() {
|
|
@@ -31,6 +42,12 @@ function getUint8Memory0() {
|
|
|
31
42
|
return cachegetUint8Memory0;
|
|
32
43
|
}
|
|
33
44
|
|
|
45
|
+
function getStringFromWasm0(ptr, len) {
|
|
46
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let WASM_VECTOR_LEN = 0;
|
|
50
|
+
|
|
34
51
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
35
52
|
|
|
36
53
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -84,6 +101,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
84
101
|
return ptr;
|
|
85
102
|
}
|
|
86
103
|
|
|
104
|
+
function isLikeNone(x) {
|
|
105
|
+
return x === undefined || x === null;
|
|
106
|
+
}
|
|
107
|
+
|
|
87
108
|
let cachegetInt32Memory0 = null;
|
|
88
109
|
function getInt32Memory0() {
|
|
89
110
|
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
@@ -91,36 +112,15 @@ function getInt32Memory0() {
|
|
|
91
112
|
}
|
|
92
113
|
return cachegetInt32Memory0;
|
|
93
114
|
}
|
|
94
|
-
|
|
95
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
96
|
-
|
|
97
|
-
cachedTextDecoder.decode();
|
|
98
|
-
|
|
99
|
-
function getStringFromWasm0(ptr, len) {
|
|
100
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function addHeapObject(obj) {
|
|
104
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
105
|
-
const idx = heap_next;
|
|
106
|
-
heap_next = heap[idx];
|
|
107
|
-
|
|
108
|
-
heap[idx] = obj;
|
|
109
|
-
return idx;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function isLikeNone(x) {
|
|
113
|
-
return x === undefined || x === null;
|
|
114
|
-
}
|
|
115
115
|
/**
|
|
116
116
|
* @param {string} query
|
|
117
117
|
* @param {any} opts
|
|
118
118
|
* @returns {any}
|
|
119
119
|
*/
|
|
120
|
-
export function
|
|
120
|
+
export function browserslist(query, opts) {
|
|
121
121
|
var ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
122
122
|
var len0 = WASM_VECTOR_LEN;
|
|
123
|
-
var ret = wasm.
|
|
123
|
+
var ret = wasm.browserslist(ptr0, len0, addHeapObject(opts));
|
|
124
124
|
return takeObject(ret);
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -210,26 +210,6 @@ async function init(input) {
|
|
|
210
210
|
var ret = getObject(arg0).getTimezoneOffset();
|
|
211
211
|
return ret;
|
|
212
212
|
};
|
|
213
|
-
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
214
|
-
const obj = getObject(arg1);
|
|
215
|
-
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
216
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
217
|
-
var len0 = WASM_VECTOR_LEN;
|
|
218
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
219
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
220
|
-
};
|
|
221
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
222
|
-
var ret = getStringFromWasm0(arg0, arg1);
|
|
223
|
-
return addHeapObject(ret);
|
|
224
|
-
};
|
|
225
|
-
imports.wbg.__wbg_new_7c995f2adeba6fb5 = function() {
|
|
226
|
-
var ret = new Array();
|
|
227
|
-
return addHeapObject(ret);
|
|
228
|
-
};
|
|
229
|
-
imports.wbg.__wbg_push_3f7c76b58919ce0d = function(arg0, arg1) {
|
|
230
|
-
var ret = getObject(arg0).push(getObject(arg1));
|
|
231
|
-
return ret;
|
|
232
|
-
};
|
|
233
213
|
imports.wbg.__wbg_self_35a0fda3eb965abe = handleError(function() {
|
|
234
214
|
var ret = self.self;
|
|
235
215
|
return addHeapObject(ret);
|
|
@@ -262,6 +242,10 @@ async function init(input) {
|
|
|
262
242
|
var ret = getObject(arg0);
|
|
263
243
|
return addHeapObject(ret);
|
|
264
244
|
};
|
|
245
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
246
|
+
var ret = getStringFromWasm0(arg0, arg1);
|
|
247
|
+
return addHeapObject(ret);
|
|
248
|
+
};
|
|
265
249
|
imports.wbg.__wbg_get_4e90ba4e3de362de = handleError(function(arg0, arg1) {
|
|
266
250
|
var ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
267
251
|
return addHeapObject(ret);
|
|
@@ -274,6 +258,22 @@ async function init(input) {
|
|
|
274
258
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
275
259
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
276
260
|
};
|
|
261
|
+
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
262
|
+
const obj = getObject(arg1);
|
|
263
|
+
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
264
|
+
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
var len0 = WASM_VECTOR_LEN;
|
|
266
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
267
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
268
|
+
};
|
|
269
|
+
imports.wbg.__wbg_new_7c995f2adeba6fb5 = function() {
|
|
270
|
+
var ret = new Array();
|
|
271
|
+
return addHeapObject(ret);
|
|
272
|
+
};
|
|
273
|
+
imports.wbg.__wbg_push_3f7c76b58919ce0d = function(arg0, arg1) {
|
|
274
|
+
var ret = getObject(arg0).push(getObject(arg1));
|
|
275
|
+
return ret;
|
|
276
|
+
};
|
|
277
277
|
imports.wbg.__wbg_new_693216e109162396 = function() {
|
|
278
278
|
var ret = new Error();
|
|
279
279
|
return addHeapObject(ret);
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|