@swc/wasm 1.2.131 → 1.2.135

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "강동윤 <kdy1997.dev@gmail.com>"
5
5
  ],
6
6
  "description": "wasm module for swc",
7
- "version": "1.2.131",
7
+ "version": "1.2.135",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",
package/wasm.d.ts CHANGED
@@ -24,9 +24,3 @@ export function printSync(s: any, opts: any): any;
24
24
  * @returns {any}
25
25
  */
26
26
  export function transformSync(s: string, opts: any): any;
27
- /**
28
- * @param {string} query
29
- * @param {any} opts
30
- * @returns {any}
31
- */
32
- export function browserslist(query: string, opts: any): any;
package/wasm.js CHANGED
@@ -36,6 +36,18 @@ function addHeapObject(obj) {
36
36
 
37
37
  function getObject(idx) { return heap[idx]; }
38
38
 
39
+ function dropObject(idx) {
40
+ if (idx < 36) return;
41
+ heap[idx] = heap_next;
42
+ heap_next = idx;
43
+ }
44
+
45
+ function takeObject(idx) {
46
+ const ret = getObject(idx);
47
+ dropObject(idx);
48
+ return ret;
49
+ }
50
+
39
51
  let WASM_VECTOR_LEN = 0;
40
52
 
41
53
  let cachedTextEncoder = new TextEncoder('utf-8');
@@ -98,22 +110,6 @@ function getInt32Memory0() {
98
110
  }
99
111
  return cachegetInt32Memory0;
100
112
  }
101
-
102
- function dropObject(idx) {
103
- if (idx < 36) return;
104
- heap[idx] = heap_next;
105
- heap_next = idx;
106
- }
107
-
108
- function takeObject(idx) {
109
- const ret = getObject(idx);
110
- dropObject(idx);
111
- return ret;
112
- }
113
-
114
- function isLikeNone(x) {
115
- return x === undefined || x === null;
116
- }
117
113
  /**
118
114
  * @param {string} s
119
115
  * @param {any} opts
@@ -160,29 +156,13 @@ module.exports.transformSync = function(s, opts) {
160
156
  return takeObject(ret);
161
157
  };
162
158
 
163
- /**
164
- * @param {string} query
165
- * @param {any} opts
166
- * @returns {any}
167
- */
168
- module.exports.browserslist = function(query, opts) {
169
- var ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
170
- var len0 = WASM_VECTOR_LEN;
171
- var ret = wasm.browserslist(ptr0, len0, addHeapObject(opts));
172
- return takeObject(ret);
159
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
160
+ var ret = getStringFromWasm0(arg0, arg1);
161
+ return addHeapObject(ret);
173
162
  };
174
163
 
175
- function handleError(f, args) {
176
- try {
177
- return f.apply(this, args);
178
- } catch (e) {
179
- wasm.__wbindgen_exn_store(addHeapObject(e));
180
- }
181
- }
182
-
183
- module.exports.__wbindgen_json_parse = function(arg0, arg1) {
184
- var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
185
- return addHeapObject(ret);
164
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
165
+ takeObject(arg0);
186
166
  };
187
167
 
188
168
  module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
@@ -194,12 +174,8 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
194
174
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
195
175
  };
196
176
 
197
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
198
- takeObject(arg0);
199
- };
200
-
201
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
202
- var ret = getStringFromWasm0(arg0, arg1);
177
+ module.exports.__wbindgen_json_parse = function(arg0, arg1) {
178
+ var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
203
179
  return addHeapObject(ret);
204
180
  };
205
181
 
@@ -218,70 +194,6 @@ module.exports.__wbg_getTimezoneOffset_d3e5a22a1b7fb1d8 = function(arg0) {
218
194
  return ret;
219
195
  };
220
196
 
221
- module.exports.__wbg_self_c6fbdfc2918d5e58 = function() { return handleError(function () {
222
- var ret = self.self;
223
- return addHeapObject(ret);
224
- }, arguments) };
225
-
226
- module.exports.__wbg_window_baec038b5ab35c54 = function() { return handleError(function () {
227
- var ret = window.window;
228
- return addHeapObject(ret);
229
- }, arguments) };
230
-
231
- module.exports.__wbg_globalThis_3f735a5746d41fbd = function() { return handleError(function () {
232
- var ret = globalThis.globalThis;
233
- return addHeapObject(ret);
234
- }, arguments) };
235
-
236
- module.exports.__wbg_global_1bc0b39582740e95 = function() { return handleError(function () {
237
- var ret = global.global;
238
- return addHeapObject(ret);
239
- }, arguments) };
240
-
241
- module.exports.__wbindgen_is_undefined = function(arg0) {
242
- var ret = getObject(arg0) === undefined;
243
- return ret;
244
- };
245
-
246
- module.exports.__wbg_newnoargs_be86524d73f67598 = function(arg0, arg1) {
247
- var ret = new Function(getStringFromWasm0(arg0, arg1));
248
- return addHeapObject(ret);
249
- };
250
-
251
- module.exports.__wbg_call_888d259a5fefc347 = function() { return handleError(function (arg0, arg1) {
252
- var ret = getObject(arg0).call(getObject(arg1));
253
- return addHeapObject(ret);
254
- }, arguments) };
255
-
256
- module.exports.__wbindgen_object_clone_ref = function(arg0) {
257
- var ret = getObject(arg0);
258
- return addHeapObject(ret);
259
- };
260
-
261
- module.exports.__wbg_get_4d0f21c2f823742e = function() { return handleError(function (arg0, arg1) {
262
- var ret = Reflect.get(getObject(arg0), getObject(arg1));
263
- return addHeapObject(ret);
264
- }, arguments) };
265
-
266
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
267
- const obj = getObject(arg1);
268
- var ret = typeof(obj) === 'string' ? obj : undefined;
269
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
270
- var len0 = WASM_VECTOR_LEN;
271
- getInt32Memory0()[arg0 / 4 + 1] = len0;
272
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
273
- };
274
-
275
- module.exports.__wbg_new_949bbc1147195c4e = function() {
276
- var ret = new Array();
277
- return addHeapObject(ret);
278
- };
279
-
280
- module.exports.__wbg_push_284486ca27c6aa8b = function(arg0, arg1) {
281
- var ret = getObject(arg0).push(getObject(arg1));
282
- return ret;
283
- };
284
-
285
197
  module.exports.__wbg_new_693216e109162396 = function() {
286
198
  var ret = new Error();
287
199
  return addHeapObject(ret);
package/wasm_bg.wasm CHANGED
Binary file