@astral-sh/ruff-wasm-nodejs 0.14.2 → 0.14.4

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
  "Charlie Marsh <charlie.r.marsh@gmail.com>"
5
5
  ],
6
6
  "description": "WebAssembly bindings for Ruff",
7
- "version": "0.14.2",
7
+ "version": "0.14.4",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
package/ruff_wasm.d.ts CHANGED
@@ -37,16 +37,17 @@ export interface Diagnostic {
37
37
 
38
38
  export class Workspace {
39
39
  free(): void;
40
- static version(): string;
41
- constructor(options: any, position_encoding: PositionEncoding);
40
+ [Symbol.dispose](): void;
42
41
  static defaultSettings(): any;
42
+ constructor(options: any, position_encoding: PositionEncoding);
43
43
  check(contents: string): any;
44
- format(contents: string): string;
45
- format_ir(contents: string): string;
46
- comments(contents: string): string;
47
44
  /**
48
45
  * Parses the content and returns its AST
49
46
  */
50
47
  parse(contents: string): string;
48
+ format(contents: string): string;
51
49
  tokens(contents: string): string;
50
+ static version(): string;
51
+ comments(contents: string): string;
52
+ format_ir(contents: string): string;
52
53
  }
package/ruff_wasm.js CHANGED
@@ -1,8 +1,6 @@
1
1
 
2
2
  let imports = {};
3
3
  imports['__wbindgen_placeholder__'] = module.exports;
4
- let wasm;
5
- const { TextDecoder, TextEncoder } = require(`util`);
6
4
 
7
5
  let cachedUint8ArrayMemory0 = null;
8
6
 
@@ -28,20 +26,18 @@ function getStringFromWasm0(ptr, len) {
28
26
 
29
27
  let WASM_VECTOR_LEN = 0;
30
28
 
31
- const cachedTextEncoder = new TextEncoder('utf-8');
29
+ const cachedTextEncoder = new TextEncoder();
32
30
 
33
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
34
- ? function (arg, view) {
35
- return cachedTextEncoder.encodeInto(arg, view);
31
+ if (!('encodeInto' in cachedTextEncoder)) {
32
+ cachedTextEncoder.encodeInto = function (arg, view) {
33
+ const buf = cachedTextEncoder.encode(arg);
34
+ view.set(buf);
35
+ return {
36
+ read: arg.length,
37
+ written: buf.length
38
+ };
39
+ }
36
40
  }
37
- : function (arg, view) {
38
- const buf = cachedTextEncoder.encode(arg);
39
- view.set(buf);
40
- return {
41
- read: arg.length,
42
- written: buf.length
43
- };
44
- });
45
41
 
46
42
  function passStringToWasm0(arg, malloc, realloc) {
47
43
 
@@ -72,7 +68,7 @@ function passStringToWasm0(arg, malloc, realloc) {
72
68
  }
73
69
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
74
70
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
75
- const ret = encodeString(arg, view);
71
+ const ret = cachedTextEncoder.encodeInto(arg, view);
76
72
 
77
73
  offset += ret.written;
78
74
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -91,26 +87,6 @@ function getDataViewMemory0() {
91
87
  return cachedDataViewMemory0;
92
88
  }
93
89
 
94
- function addToExternrefTable0(obj) {
95
- const idx = wasm.__externref_table_alloc();
96
- wasm.__wbindgen_export_4.set(idx, obj);
97
- return idx;
98
- }
99
-
100
- function handleError(f, args) {
101
- try {
102
- return f.apply(this, args);
103
- } catch (e) {
104
- const idx = addToExternrefTable0(e);
105
- wasm.__wbindgen_exn_store(idx);
106
- }
107
- }
108
-
109
- function getArrayU8FromWasm0(ptr, len) {
110
- ptr = ptr >>> 0;
111
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
112
- }
113
-
114
90
  function isLikeNone(x) {
115
91
  return x === undefined || x === null;
116
92
  }
@@ -180,19 +156,39 @@ function debugString(val) {
180
156
  return className;
181
157
  }
182
158
 
183
- module.exports.run = function() {
159
+ function addToExternrefTable0(obj) {
160
+ const idx = wasm.__externref_table_alloc();
161
+ wasm.__wbindgen_externrefs.set(idx, obj);
162
+ return idx;
163
+ }
164
+
165
+ function handleError(f, args) {
166
+ try {
167
+ return f.apply(this, args);
168
+ } catch (e) {
169
+ const idx = addToExternrefTable0(e);
170
+ wasm.__wbindgen_exn_store(idx);
171
+ }
172
+ }
173
+
174
+ function getArrayU8FromWasm0(ptr, len) {
175
+ ptr = ptr >>> 0;
176
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
177
+ }
178
+
179
+ exports.run = function() {
184
180
  wasm.run();
185
181
  };
186
182
 
187
183
  function takeFromExternrefTable0(idx) {
188
- const value = wasm.__wbindgen_export_4.get(idx);
184
+ const value = wasm.__wbindgen_externrefs.get(idx);
189
185
  wasm.__externref_table_dealloc(idx);
190
186
  return value;
191
187
  }
192
188
  /**
193
189
  * @enum {0 | 1 | 2}
194
190
  */
195
- module.exports.PositionEncoding = Object.freeze({
191
+ exports.PositionEncoding = Object.freeze({
196
192
  Utf8: 0, "0": "Utf8",
197
193
  Utf16: 1, "1": "Utf16",
198
194
  Utf32: 2, "2": "Utf32",
@@ -216,19 +212,14 @@ class Workspace {
216
212
  wasm.__wbg_workspace_free(ptr, 0);
217
213
  }
218
214
  /**
219
- * @returns {string}
215
+ * @returns {any}
220
216
  */
221
- static version() {
222
- let deferred1_0;
223
- let deferred1_1;
224
- try {
225
- const ret = wasm.workspace_version();
226
- deferred1_0 = ret[0];
227
- deferred1_1 = ret[1];
228
- return getStringFromWasm0(ret[0], ret[1]);
229
- } finally {
230
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
217
+ static defaultSettings() {
218
+ const ret = wasm.workspace_defaultSettings();
219
+ if (ret[2]) {
220
+ throw takeFromExternrefTable0(ret[1]);
231
221
  }
222
+ return takeFromExternrefTable0(ret[0]);
232
223
  }
233
224
  /**
234
225
  * @param {any} options
@@ -243,16 +234,6 @@ class Workspace {
243
234
  WorkspaceFinalization.register(this, this.__wbg_ptr, this);
244
235
  return this;
245
236
  }
246
- /**
247
- * @returns {any}
248
- */
249
- static defaultSettings() {
250
- const ret = wasm.workspace_defaultSettings();
251
- if (ret[2]) {
252
- throw takeFromExternrefTable0(ret[1]);
253
- }
254
- return takeFromExternrefTable0(ret[0]);
255
- }
256
237
  /**
257
238
  * @param {string} contents
258
239
  * @returns {any}
@@ -267,16 +248,17 @@ class Workspace {
267
248
  return takeFromExternrefTable0(ret[0]);
268
249
  }
269
250
  /**
251
+ * Parses the content and returns its AST
270
252
  * @param {string} contents
271
253
  * @returns {string}
272
254
  */
273
- format(contents) {
255
+ parse(contents) {
274
256
  let deferred3_0;
275
257
  let deferred3_1;
276
258
  try {
277
259
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
278
260
  const len0 = WASM_VECTOR_LEN;
279
- const ret = wasm.workspace_format(this.__wbg_ptr, ptr0, len0);
261
+ const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
280
262
  var ptr2 = ret[0];
281
263
  var len2 = ret[1];
282
264
  if (ret[3]) {
@@ -294,13 +276,13 @@ class Workspace {
294
276
  * @param {string} contents
295
277
  * @returns {string}
296
278
  */
297
- format_ir(contents) {
279
+ format(contents) {
298
280
  let deferred3_0;
299
281
  let deferred3_1;
300
282
  try {
301
283
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
284
  const len0 = WASM_VECTOR_LEN;
303
- const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
285
+ const ret = wasm.workspace_format(this.__wbg_ptr, ptr0, len0);
304
286
  var ptr2 = ret[0];
305
287
  var len2 = ret[1];
306
288
  if (ret[3]) {
@@ -318,13 +300,13 @@ class Workspace {
318
300
  * @param {string} contents
319
301
  * @returns {string}
320
302
  */
321
- comments(contents) {
303
+ tokens(contents) {
322
304
  let deferred3_0;
323
305
  let deferred3_1;
324
306
  try {
325
307
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
326
308
  const len0 = WASM_VECTOR_LEN;
327
- const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
309
+ const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
328
310
  var ptr2 = ret[0];
329
311
  var len2 = ret[1];
330
312
  if (ret[3]) {
@@ -339,17 +321,31 @@ class Workspace {
339
321
  }
340
322
  }
341
323
  /**
342
- * Parses the content and returns its AST
324
+ * @returns {string}
325
+ */
326
+ static version() {
327
+ let deferred1_0;
328
+ let deferred1_1;
329
+ try {
330
+ const ret = wasm.workspace_version();
331
+ deferred1_0 = ret[0];
332
+ deferred1_1 = ret[1];
333
+ return getStringFromWasm0(ret[0], ret[1]);
334
+ } finally {
335
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
336
+ }
337
+ }
338
+ /**
343
339
  * @param {string} contents
344
340
  * @returns {string}
345
341
  */
346
- parse(contents) {
342
+ comments(contents) {
347
343
  let deferred3_0;
348
344
  let deferred3_1;
349
345
  try {
350
346
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
347
  const len0 = WASM_VECTOR_LEN;
352
- const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
348
+ const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
353
349
  var ptr2 = ret[0];
354
350
  var len2 = ret[1];
355
351
  if (ret[3]) {
@@ -367,13 +363,13 @@ class Workspace {
367
363
  * @param {string} contents
368
364
  * @returns {string}
369
365
  */
370
- tokens(contents) {
366
+ format_ir(contents) {
371
367
  let deferred3_0;
372
368
  let deferred3_1;
373
369
  try {
374
370
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
375
371
  const len0 = WASM_VECTOR_LEN;
376
- const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
372
+ const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
377
373
  var ptr2 = ret[0];
378
374
  var len2 = ret[1];
379
375
  if (ret[3]) {
@@ -388,19 +384,21 @@ class Workspace {
388
384
  }
389
385
  }
390
386
  }
391
- module.exports.Workspace = Workspace;
387
+ if (Symbol.dispose) Workspace.prototype[Symbol.dispose] = Workspace.prototype.free;
392
388
 
393
- module.exports.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
389
+ exports.Workspace = Workspace;
390
+
391
+ exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
394
392
  const ret = Error(getStringFromWasm0(arg0, arg1));
395
393
  return ret;
396
394
  };
397
395
 
398
- module.exports.__wbg_Number_577a493fc95ea223 = function(arg0) {
396
+ exports.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
399
397
  const ret = Number(arg0);
400
398
  return ret;
401
399
  };
402
400
 
403
- module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
401
+ exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
404
402
  const ret = String(arg1);
405
403
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
406
404
  const len1 = WASM_VECTOR_LEN;
@@ -408,35 +406,113 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
408
406
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
409
407
  };
410
408
 
411
- module.exports.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
409
+ exports.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
410
+ const v = arg1;
411
+ const ret = typeof(v) === 'bigint' ? v : undefined;
412
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
413
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
414
+ };
415
+
416
+ exports.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
417
+ const v = arg0;
418
+ const ret = typeof(v) === 'boolean' ? v : undefined;
419
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
420
+ };
421
+
422
+ exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
423
+ const ret = debugString(arg1);
424
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
+ const len1 = WASM_VECTOR_LEN;
426
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
427
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
428
+ };
429
+
430
+ exports.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
431
+ const ret = arg0 in arg1;
432
+ return ret;
433
+ };
434
+
435
+ exports.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
436
+ const ret = typeof(arg0) === 'bigint';
437
+ return ret;
438
+ };
439
+
440
+ exports.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
441
+ const ret = typeof(arg0) === 'function';
442
+ return ret;
443
+ };
444
+
445
+ exports.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
446
+ const val = arg0;
447
+ const ret = typeof(val) === 'object' && val !== null;
448
+ return ret;
449
+ };
450
+
451
+ exports.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
452
+ const ret = typeof(arg0) === 'string';
453
+ return ret;
454
+ };
455
+
456
+ exports.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
457
+ const ret = arg0 === undefined;
458
+ return ret;
459
+ };
460
+
461
+ exports.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
462
+ const ret = arg0 === arg1;
463
+ return ret;
464
+ };
465
+
466
+ exports.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
467
+ const ret = arg0 == arg1;
468
+ return ret;
469
+ };
470
+
471
+ exports.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
472
+ const obj = arg1;
473
+ const ret = typeof(obj) === 'number' ? obj : undefined;
474
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
475
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
476
+ };
477
+
478
+ exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
479
+ const obj = arg1;
480
+ const ret = typeof(obj) === 'string' ? obj : undefined;
481
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
482
+ var len1 = WASM_VECTOR_LEN;
483
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
484
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
485
+ };
486
+
487
+ exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
488
+ throw new Error(getStringFromWasm0(arg0, arg1));
489
+ };
490
+
491
+ exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
412
492
  const ret = arg0.call(arg1);
413
493
  return ret;
414
494
  }, arguments) };
415
495
 
416
- module.exports.__wbg_codePointAt_12acefc1bed285e5 = function(arg0, arg1) {
496
+ exports.__wbg_codePointAt_01a186303396f7ad = function(arg0, arg1) {
417
497
  const ret = arg0.codePointAt(arg1 >>> 0);
418
498
  return ret;
419
499
  };
420
500
 
421
- module.exports.__wbg_debug_9a166dc82b4ba6a6 = function(arg0) {
501
+ exports.__wbg_debug_f4b0c59db649db48 = function(arg0) {
422
502
  console.debug(arg0);
423
503
  };
424
504
 
425
- module.exports.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
505
+ exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
426
506
  const ret = arg0.done;
427
507
  return ret;
428
508
  };
429
509
 
430
- module.exports.__wbg_entries_17f7acbc2d691c0d = function(arg0) {
510
+ exports.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
431
511
  const ret = Object.entries(arg0);
432
512
  return ret;
433
513
  };
434
514
 
435
- module.exports.__wbg_error_41f0589870426ea4 = function(arg0) {
436
- console.error(arg0);
437
- };
438
-
439
- module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
515
+ exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
440
516
  let deferred0_0;
441
517
  let deferred0_1;
442
518
  try {
@@ -448,31 +524,35 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
448
524
  }
449
525
  };
450
526
 
451
- module.exports.__wbg_fromCodePoint_258371ef302abf8a = function() { return handleError(function (arg0) {
452
- const ret = String.fromCodePoint(arg0 >>> 0);
453
- return ret;
454
- }, arguments) };
527
+ exports.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
528
+ console.error(arg0);
529
+ };
455
530
 
456
- module.exports.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
457
- const ret = Reflect.get(arg0, arg1);
531
+ exports.__wbg_fromCodePoint_a1c5bb992dc05846 = function() { return handleError(function (arg0) {
532
+ const ret = String.fromCodePoint(arg0 >>> 0);
458
533
  return ret;
459
534
  }, arguments) };
460
535
 
461
- module.exports.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
536
+ exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
462
537
  const ret = arg0[arg1 >>> 0];
463
538
  return ret;
464
539
  };
465
540
 
466
- module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
541
+ exports.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
542
+ const ret = Reflect.get(arg0, arg1);
543
+ return ret;
544
+ }, arguments) };
545
+
546
+ exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
467
547
  const ret = arg0[arg1];
468
548
  return ret;
469
549
  };
470
550
 
471
- module.exports.__wbg_info_ed6e390d09c09062 = function(arg0) {
551
+ exports.__wbg_info_e674a11f4f50cc0c = function(arg0) {
472
552
  console.info(arg0);
473
553
  };
474
554
 
475
- module.exports.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
555
+ exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
476
556
  let result;
477
557
  try {
478
558
  result = arg0 instanceof ArrayBuffer;
@@ -483,7 +563,7 @@ module.exports.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
483
563
  return ret;
484
564
  };
485
565
 
486
- module.exports.__wbg_instanceof_Map_dd89a82d76d1b25f = function(arg0) {
566
+ exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
487
567
  let result;
488
568
  try {
489
569
  result = arg0 instanceof Map;
@@ -494,7 +574,7 @@ module.exports.__wbg_instanceof_Map_dd89a82d76d1b25f = function(arg0) {
494
574
  return ret;
495
575
  };
496
576
 
497
- module.exports.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
577
+ exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
498
578
  let result;
499
579
  try {
500
580
  result = arg0 instanceof Uint8Array;
@@ -505,103 +585,103 @@ module.exports.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
505
585
  return ret;
506
586
  };
507
587
 
508
- module.exports.__wbg_isArray_bc2498eba6fcb71f = function(arg0) {
588
+ exports.__wbg_isArray_96e0af9891d0945d = function(arg0) {
509
589
  const ret = Array.isArray(arg0);
510
590
  return ret;
511
591
  };
512
592
 
513
- module.exports.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
593
+ exports.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
514
594
  const ret = Number.isSafeInteger(arg0);
515
595
  return ret;
516
596
  };
517
597
 
518
- module.exports.__wbg_iterator_96378c3c9a17347c = function() {
598
+ exports.__wbg_iterator_e5822695327a3c39 = function() {
519
599
  const ret = Symbol.iterator;
520
600
  return ret;
521
601
  };
522
602
 
523
- module.exports.__wbg_length_246fa1f85a0dea5b = function(arg0) {
603
+ exports.__wbg_length_69bca3cb64fc8748 = function(arg0) {
524
604
  const ret = arg0.length;
525
605
  return ret;
526
606
  };
527
607
 
528
- module.exports.__wbg_length_7bca5263dfc69dd1 = function(arg0) {
608
+ exports.__wbg_length_a95b69f903b746c4 = function(arg0) {
529
609
  const ret = arg0.length;
530
610
  return ret;
531
611
  };
532
612
 
533
- module.exports.__wbg_length_904c0910ed998bf3 = function(arg0) {
613
+ exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
534
614
  const ret = arg0.length;
535
615
  return ret;
536
616
  };
537
617
 
538
- module.exports.__wbg_log_f3c04200b995730f = function(arg0) {
618
+ exports.__wbg_log_8cec76766b8c0e33 = function(arg0) {
539
619
  console.log(arg0);
540
620
  };
541
621
 
542
- module.exports.__wbg_new_1930cbb8d9ffc31b = function() {
622
+ exports.__wbg_new_1acc0b6eea89d040 = function() {
543
623
  const ret = new Object();
544
624
  return ret;
545
625
  };
546
626
 
547
- module.exports.__wbg_new_56407f99198feff7 = function() {
548
- const ret = new Map();
627
+ exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
628
+ const ret = new Uint8Array(arg0);
549
629
  return ret;
550
630
  };
551
631
 
552
- module.exports.__wbg_new_8a6f238a6ece86ea = function() {
553
- const ret = new Error();
632
+ exports.__wbg_new_68651c719dcda04e = function() {
633
+ const ret = new Map();
554
634
  return ret;
555
635
  };
556
636
 
557
- module.exports.__wbg_new_9190433fb67ed635 = function(arg0) {
558
- const ret = new Uint8Array(arg0);
637
+ exports.__wbg_new_8a6f238a6ece86ea = function() {
638
+ const ret = new Error();
559
639
  return ret;
560
640
  };
561
641
 
562
- module.exports.__wbg_new_97ddeb994a38bb69 = function(arg0, arg1) {
642
+ exports.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
563
643
  const ret = new Error(getStringFromWasm0(arg0, arg1));
564
644
  return ret;
565
645
  };
566
646
 
567
- module.exports.__wbg_new_e969dc3f68d25093 = function() {
647
+ exports.__wbg_new_e17d9f43105b08be = function() {
568
648
  const ret = new Array();
569
649
  return ret;
570
650
  };
571
651
 
572
- module.exports.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
652
+ exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
573
653
  const ret = arg0.next();
574
654
  return ret;
575
655
  }, arguments) };
576
656
 
577
- module.exports.__wbg_next_3de8f2669431a3ff = function(arg0) {
657
+ exports.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
578
658
  const ret = arg0.next;
579
659
  return ret;
580
660
  };
581
661
 
582
- module.exports.__wbg_now_e3057dd824ca0191 = function() {
662
+ exports.__wbg_now_793306c526e2e3b6 = function() {
583
663
  const ret = Date.now();
584
664
  return ret;
585
665
  };
586
666
 
587
- module.exports.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
667
+ exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
588
668
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
589
669
  };
590
670
 
591
- module.exports.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
592
- const ret = arg0.set(arg1, arg2);
593
- return ret;
671
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
672
+ arg0[arg1] = arg2;
594
673
  };
595
674
 
596
- module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
597
- arg0[arg1] = arg2;
675
+ exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
676
+ const ret = arg0.set(arg1, arg2);
677
+ return ret;
598
678
  };
599
679
 
600
- module.exports.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
680
+ exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
601
681
  arg0[arg1 >>> 0] = arg2;
602
682
  };
603
683
 
604
- module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
684
+ exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
605
685
  const ret = arg1.stack;
606
686
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
607
687
  const len1 = WASM_VECTOR_LEN;
@@ -609,123 +689,41 @@ module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
609
689
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
610
690
  };
611
691
 
612
- module.exports.__wbg_value_09d0b4eaab48b91d = function(arg0) {
692
+ exports.__wbg_value_692627309814bb8c = function(arg0) {
613
693
  const ret = arg0.value;
614
694
  return ret;
615
695
  };
616
696
 
617
- module.exports.__wbg_warn_07ef1f61c52799fb = function(arg0) {
697
+ exports.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
618
698
  console.warn(arg0);
619
699
  };
620
700
 
621
- module.exports.__wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e = function(arg0, arg1) {
622
- const v = arg1;
623
- const ret = typeof(v) === 'bigint' ? v : undefined;
624
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
625
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
626
- };
627
-
628
- module.exports.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
629
- const v = arg0;
630
- const ret = typeof(v) === 'boolean' ? v : undefined;
631
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
632
- };
633
-
634
- module.exports.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
635
- const ret = debugString(arg1);
636
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
- const len1 = WASM_VECTOR_LEN;
638
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
639
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
640
- };
641
-
642
- module.exports.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
643
- const ret = arg0 in arg1;
644
- return ret;
645
- };
646
-
647
- module.exports.__wbg_wbindgenisbigint_7d76a1ca6454e439 = function(arg0) {
648
- const ret = typeof(arg0) === 'bigint';
649
- return ret;
650
- };
651
-
652
- module.exports.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
653
- const ret = typeof(arg0) === 'function';
654
- return ret;
655
- };
656
-
657
- module.exports.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
658
- const val = arg0;
659
- const ret = typeof(val) === 'object' && val !== null;
660
- return ret;
661
- };
662
-
663
- module.exports.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
664
- const ret = typeof(arg0) === 'string';
665
- return ret;
666
- };
667
-
668
- module.exports.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
669
- const ret = arg0 === undefined;
670
- return ret;
671
- };
672
-
673
- module.exports.__wbg_wbindgenjsvaleq_f27272c0a890df7f = function(arg0, arg1) {
674
- const ret = arg0 === arg1;
675
- return ret;
676
- };
677
-
678
- module.exports.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
679
- const ret = arg0 == arg1;
680
- return ret;
681
- };
682
-
683
- module.exports.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
684
- const obj = arg1;
685
- const ret = typeof(obj) === 'number' ? obj : undefined;
686
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
687
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
688
- };
689
-
690
- module.exports.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
691
- const obj = arg1;
692
- const ret = typeof(obj) === 'string' ? obj : undefined;
693
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
694
- var len1 = WASM_VECTOR_LEN;
695
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
696
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
697
- };
698
-
699
- module.exports.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
700
- throw new Error(getStringFromWasm0(arg0, arg1));
701
- };
702
-
703
- module.exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
701
+ exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
704
702
  // Cast intrinsic for `Ref(String) -> Externref`.
705
703
  const ret = getStringFromWasm0(arg0, arg1);
706
704
  return ret;
707
705
  };
708
706
 
709
- module.exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
707
+ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
710
708
  // Cast intrinsic for `U64 -> Externref`.
711
709
  const ret = BigInt.asUintN(64, arg0);
712
710
  return ret;
713
711
  };
714
712
 
715
- module.exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
713
+ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
716
714
  // Cast intrinsic for `I64 -> Externref`.
717
715
  const ret = arg0;
718
716
  return ret;
719
717
  };
720
718
 
721
- module.exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
719
+ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
722
720
  // Cast intrinsic for `F64 -> Externref`.
723
721
  const ret = arg0;
724
722
  return ret;
725
723
  };
726
724
 
727
- module.exports.__wbindgen_init_externref_table = function() {
728
- const table = wasm.__wbindgen_export_4;
725
+ exports.__wbindgen_init_externref_table = function() {
726
+ const table = wasm.__wbindgen_externrefs;
729
727
  const offset = table.grow(4);
730
728
  table.set(0, undefined);
731
729
  table.set(offset + 0, undefined);
@@ -735,13 +733,10 @@ module.exports.__wbindgen_init_externref_table = function() {
735
733
  ;
736
734
  };
737
735
 
738
- const path = require('path').join(__dirname, 'ruff_wasm_bg.wasm');
739
- const bytes = require('fs').readFileSync(path);
740
-
741
- const wasmModule = new WebAssembly.Module(bytes);
742
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
743
- wasm = wasmInstance.exports;
744
- module.exports.__wasm = wasm;
736
+ const wasmPath = `${__dirname}/ruff_wasm_bg.wasm`;
737
+ const wasmBytes = require('fs').readFileSync(wasmPath);
738
+ const wasmModule = new WebAssembly.Module(wasmBytes);
739
+ const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
745
740
 
746
741
  wasm.__wbindgen_start();
747
742
 
package/ruff_wasm_bg.wasm CHANGED
Binary file