@biomejs/wasm-nodejs 2.3.2 → 2.3.3

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/biome_wasm.d.ts CHANGED
@@ -137,7 +137,7 @@ interface CssConfiguration {
137
137
  type Extends = string[] | string;
138
138
  interface FilesConfiguration {
139
139
  /**
140
- * **Deprecated:** Please use _force-ignore syntax_ in `files.includes` instead: https://biomejs.dev/reference/configuration/#filesincludes
140
+ * **Deprecated:** Please use _force-ignore syntax_ in `files.includes` instead: <https://biomejs.dev/reference/configuration/#filesincludes>
141
141
 
142
142
  Set of file and folder names that should be unconditionally ignored by Biome's scanner.
143
143
  */
@@ -1549,6 +1549,10 @@ interface Nursery {
1549
1549
  * Prevent client components from being async functions.
1550
1550
  */
1551
1551
  noNextAsyncClientComponent?: RuleConfiguration_for_NoNextAsyncClientComponentOptions;
1552
+ /**
1553
+ * Disallow function parameters that are only used in recursive calls.
1554
+ */
1555
+ noParametersOnlyUsedInRecursion?: RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions;
1552
1556
  /**
1553
1557
  * Replaces usages of forwardRef with passing ref as a prop.
1554
1558
  */
@@ -1557,6 +1561,10 @@ interface Nursery {
1557
1561
  * Disallow variable declarations from shadowing variables declared in the outer scope.
1558
1562
  */
1559
1563
  noShadow?: RuleConfiguration_for_NoShadowOptions;
1564
+ /**
1565
+ * Disallow unknown DOM properties.
1566
+ */
1567
+ noUnknownAttribute?: RuleConfiguration_for_NoUnknownAttributeOptions;
1560
1568
  /**
1561
1569
  * Disallow unnecessary type-based conditions that can be statically determined as redundant.
1562
1570
  */
@@ -2914,12 +2922,18 @@ type RuleFixConfiguration_for_NoMisusedPromisesOptions =
2914
2922
  type RuleConfiguration_for_NoNextAsyncClientComponentOptions =
2915
2923
  | RulePlainConfiguration
2916
2924
  | RuleWithOptions_for_NoNextAsyncClientComponentOptions;
2925
+ type RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions =
2926
+ | RulePlainConfiguration
2927
+ | RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions;
2917
2928
  type RuleFixConfiguration_for_NoReactForwardRefOptions =
2918
2929
  | RulePlainConfiguration
2919
2930
  | RuleWithFixOptions_for_NoReactForwardRefOptions;
2920
2931
  type RuleConfiguration_for_NoShadowOptions =
2921
2932
  | RulePlainConfiguration
2922
2933
  | RuleWithOptions_for_NoShadowOptions;
2934
+ type RuleConfiguration_for_NoUnknownAttributeOptions =
2935
+ | RulePlainConfiguration
2936
+ | RuleWithOptions_for_NoUnknownAttributeOptions;
2923
2937
  type RuleConfiguration_for_NoUnnecessaryConditionsOptions =
2924
2938
  | RulePlainConfiguration
2925
2939
  | RuleWithOptions_for_NoUnnecessaryConditionsOptions;
@@ -5402,6 +5416,20 @@ interface RuleWithOptions_for_NoNextAsyncClientComponentOptions {
5402
5416
  */
5403
5417
  options: NoNextAsyncClientComponentOptions;
5404
5418
  }
5419
+ interface RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions {
5420
+ /**
5421
+ * The kind of the code actions emitted by the rule
5422
+ */
5423
+ fix?: FixKind;
5424
+ /**
5425
+ * The severity of the emitted diagnostics by the rule
5426
+ */
5427
+ level: RulePlainConfiguration;
5428
+ /**
5429
+ * Rule's options
5430
+ */
5431
+ options: NoParametersOnlyUsedInRecursionOptions;
5432
+ }
5405
5433
  interface RuleWithFixOptions_for_NoReactForwardRefOptions {
5406
5434
  /**
5407
5435
  * The kind of the code actions emitted by the rule
@@ -5426,6 +5454,16 @@ interface RuleWithOptions_for_NoShadowOptions {
5426
5454
  */
5427
5455
  options: NoShadowOptions;
5428
5456
  }
5457
+ interface RuleWithOptions_for_NoUnknownAttributeOptions {
5458
+ /**
5459
+ * The severity of the emitted diagnostics by the rule
5460
+ */
5461
+ level: RulePlainConfiguration;
5462
+ /**
5463
+ * Rule's options
5464
+ */
5465
+ options: NoUnknownAttributeOptions;
5466
+ }
5429
5467
  interface RuleWithOptions_for_NoUnnecessaryConditionsOptions {
5430
5468
  /**
5431
5469
  * The severity of the emitted diagnostics by the rule
@@ -8120,8 +8158,12 @@ interface NoJsxLiteralsOptions {
8120
8158
  }
8121
8159
  interface NoMisusedPromisesOptions {}
8122
8160
  interface NoNextAsyncClientComponentOptions {}
8161
+ interface NoParametersOnlyUsedInRecursionOptions {}
8123
8162
  interface NoReactForwardRefOptions {}
8124
8163
  interface NoShadowOptions {}
8164
+ interface NoUnknownAttributeOptions {
8165
+ ignore: string[];
8166
+ }
8125
8167
  interface NoUnnecessaryConditionsOptions {}
8126
8168
  interface NoUnresolvedImportsOptions {}
8127
8169
  interface NoUnusedExpressionsOptions {}
@@ -8861,8 +8903,10 @@ type Category =
8861
8903
  | "lint/nursery/noMissingGenericFamilyKeyword"
8862
8904
  | "lint/nursery/noMisusedPromises"
8863
8905
  | "lint/nursery/noNextAsyncClientComponent"
8906
+ | "lint/nursery/noParametersOnlyUsedInRecursion"
8864
8907
  | "lint/nursery/noReactForwardRef"
8865
8908
  | "lint/nursery/noShadow"
8909
+ | "lint/nursery/noUnknownAttribute"
8866
8910
  | "lint/nursery/noUnnecessaryConditions"
8867
8911
  | "lint/nursery/noUnresolvedImports"
8868
8912
  | "lint/nursery/noUnusedExpressions"
@@ -9621,9 +9665,9 @@ interface DropPatternParams {
9621
9665
  export class DiagnosticPrinter {
9622
9666
  free(): void;
9623
9667
  [Symbol.dispose](): void;
9624
- constructor(file_name: string, file_source: string);
9625
9668
  print_simple(diagnostic: Diagnostic): void;
9626
9669
  print_verbose(diagnostic: Diagnostic): void;
9670
+ constructor(file_name: string, file_source: string);
9627
9671
  finish(): string;
9628
9672
  }
9629
9673
  export class MemoryFileSystem {
@@ -9636,31 +9680,31 @@ export class MemoryFileSystem {
9636
9680
  export class Workspace {
9637
9681
  free(): void;
9638
9682
  [Symbol.dispose](): void;
9639
- constructor();
9640
- static withFileSystem(fs: MemoryFileSystem): Workspace;
9641
- fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9642
- updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9683
+ closeFile(params: CloseFileParams): void;
9684
+ changeFile(params: ChangeFileParams): ChangeFileResult;
9685
+ fileExists(params: FileExitsParams): boolean;
9686
+ formatFile(params: FormatFileParams): any;
9687
+ formatRange(params: FormatRangeParams): any;
9643
9688
  openProject(params: OpenProjectParams): OpenProjectResult;
9689
+ pullActions(params: PullActionsParams): PullActionsResult;
9644
9690
  scanProject(params: ScanProjectParams): ScanProjectResult;
9645
- openFile(params: OpenFileParams): OpenFileResult;
9646
- getFileContent(params: GetFileContentParams): string;
9647
- getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9648
- getControlFlowGraph(params: GetControlFlowGraphParams): string;
9649
- getFormatterIr(params: GetFormatterIRParams): string;
9691
+ fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9650
9692
  getTypeInfo(params: GetTypeInfoParams): string;
9651
- getRegisteredTypes(params: GetRegisteredTypesParams): string;
9652
- getSemanticModel(params: GetSemanticModelParams): string;
9653
- changeFile(params: ChangeFileParams): ChangeFileResult;
9654
- closeFile(params: CloseFileParams): void;
9655
- fileExists(params: FileExitsParams): boolean;
9693
+ formatOnType(params: FormatOnTypeParams): any;
9694
+ getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9656
9695
  isPathIgnored(params: PathIsIgnoredParams): boolean;
9657
- updateModuleGraph(params: UpdateModuleGraphParams): void;
9696
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9697
+ getFileContent(params: GetFileContentParams): string;
9698
+ getFormatterIr(params: GetFormatterIRParams): string;
9658
9699
  getModuleGraph(params: GetModuleGraphParams): GetModuleGraphResult;
9659
9700
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
9660
- pullActions(params: PullActionsParams): PullActionsResult;
9661
- formatFile(params: FormatFileParams): any;
9662
- formatRange(params: FormatRangeParams): any;
9663
- formatOnType(params: FormatOnTypeParams): any;
9664
- fixFile(params: FixFileParams): FixFileResult;
9701
+ getSemanticModel(params: GetSemanticModelParams): string;
9702
+ static withFileSystem(fs: MemoryFileSystem): Workspace;
9703
+ updateModuleGraph(params: UpdateModuleGraphParams): void;
9704
+ getRegisteredTypes(params: GetRegisteredTypesParams): string;
9705
+ getControlFlowGraph(params: GetControlFlowGraphParams): string;
9706
+ constructor();
9665
9707
  rename(params: RenameParams): RenameResult;
9708
+ fixFile(params: FixFileParams): FixFileResult;
9709
+ openFile(params: OpenFileParams): OpenFileResult;
9666
9710
  }
package/biome_wasm.js CHANGED
@@ -176,10 +176,6 @@ function debugString(val) {
176
176
  return className;
177
177
  }
178
178
 
179
- exports.main = function() {
180
- wasm.main();
181
- };
182
-
183
179
  function passArray8ToWasm0(arg, malloc) {
184
180
  const ptr = malloc(arg.length * 1, 1) >>> 0;
185
181
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -187,11 +183,9 @@ function passArray8ToWasm0(arg, malloc) {
187
183
  return ptr;
188
184
  }
189
185
 
190
- function _assertClass(instance, klass) {
191
- if (!(instance instanceof klass)) {
192
- throw new Error(`expected instance of ${klass.name}`);
193
- }
194
- }
186
+ exports.main = function() {
187
+ wasm.main();
188
+ };
195
189
 
196
190
  function takeFromExternrefTable0(idx) {
197
191
  const value = wasm.__wbindgen_export_4.get(idx);
@@ -199,6 +193,12 @@ function takeFromExternrefTable0(idx) {
199
193
  return value;
200
194
  }
201
195
 
196
+ function _assertClass(instance, klass) {
197
+ if (!(instance instanceof klass)) {
198
+ throw new Error(`expected instance of ${klass.name}`);
199
+ }
200
+ }
201
+
202
202
  const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
203
203
  ? { register: () => {}, unregister: () => {} }
204
204
  : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
@@ -216,20 +216,6 @@ class DiagnosticPrinter {
216
216
  const ptr = this.__destroy_into_raw();
217
217
  wasm.__wbg_diagnosticprinter_free(ptr, 0);
218
218
  }
219
- /**
220
- * @param {string} file_name
221
- * @param {string} file_source
222
- */
223
- constructor(file_name, file_source) {
224
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
225
- const len0 = WASM_VECTOR_LEN;
226
- const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
227
- const len1 = WASM_VECTOR_LEN;
228
- const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
229
- this.__wbg_ptr = ret >>> 0;
230
- DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
231
- return this;
232
- }
233
219
  /**
234
220
  * @param {Diagnostic} diagnostic
235
221
  */
@@ -248,6 +234,20 @@ class DiagnosticPrinter {
248
234
  throw takeFromExternrefTable0(ret[0]);
249
235
  }
250
236
  }
237
+ /**
238
+ * @param {string} file_name
239
+ * @param {string} file_source
240
+ */
241
+ constructor(file_name, file_source) {
242
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
+ const len1 = WASM_VECTOR_LEN;
246
+ const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
247
+ this.__wbg_ptr = ret >>> 0;
248
+ DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
249
+ return this;
250
+ }
251
251
  /**
252
252
  * @returns {string}
253
253
  */
@@ -347,38 +347,54 @@ class Workspace {
347
347
  const ptr = this.__destroy_into_raw();
348
348
  wasm.__wbg_workspace_free(ptr, 0);
349
349
  }
350
- constructor() {
351
- const ret = wasm.workspace_new();
352
- this.__wbg_ptr = ret >>> 0;
353
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
354
- return this;
350
+ /**
351
+ * @param {CloseFileParams} params
352
+ */
353
+ closeFile(params) {
354
+ const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
355
+ if (ret[1]) {
356
+ throw takeFromExternrefTable0(ret[0]);
357
+ }
355
358
  }
356
359
  /**
357
- * @param {MemoryFileSystem} fs
358
- * @returns {Workspace}
360
+ * @param {ChangeFileParams} params
361
+ * @returns {ChangeFileResult}
359
362
  */
360
- static withFileSystem(fs) {
361
- _assertClass(fs, MemoryFileSystem);
362
- const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
363
- return Workspace.__wrap(ret);
363
+ changeFile(params) {
364
+ const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
365
+ if (ret[2]) {
366
+ throw takeFromExternrefTable0(ret[1]);
367
+ }
368
+ return takeFromExternrefTable0(ret[0]);
364
369
  }
365
370
  /**
366
- * @param {SupportsFeatureParams} params
367
- * @returns {FileFeaturesResult}
371
+ * @param {FileExitsParams} params
372
+ * @returns {boolean}
368
373
  */
369
- fileFeatures(params) {
370
- const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
374
+ fileExists(params) {
375
+ const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
376
+ if (ret[2]) {
377
+ throw takeFromExternrefTable0(ret[1]);
378
+ }
379
+ return ret[0] !== 0;
380
+ }
381
+ /**
382
+ * @param {FormatFileParams} params
383
+ * @returns {any}
384
+ */
385
+ formatFile(params) {
386
+ const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
371
387
  if (ret[2]) {
372
388
  throw takeFromExternrefTable0(ret[1]);
373
389
  }
374
390
  return takeFromExternrefTable0(ret[0]);
375
391
  }
376
392
  /**
377
- * @param {UpdateSettingsParams} params
378
- * @returns {UpdateSettingsResult}
393
+ * @param {FormatRangeParams} params
394
+ * @returns {any}
379
395
  */
380
- updateSettings(params) {
381
- const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
396
+ formatRange(params) {
397
+ const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
382
398
  if (ret[2]) {
383
399
  throw takeFromExternrefTable0(ret[1]);
384
400
  }
@@ -395,6 +411,17 @@ class Workspace {
395
411
  }
396
412
  return takeFromExternrefTable0(ret[0]);
397
413
  }
414
+ /**
415
+ * @param {PullActionsParams} params
416
+ * @returns {PullActionsResult}
417
+ */
418
+ pullActions(params) {
419
+ const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
420
+ if (ret[2]) {
421
+ throw takeFromExternrefTable0(ret[1]);
422
+ }
423
+ return takeFromExternrefTable0(ret[0]);
424
+ }
398
425
  /**
399
426
  * @param {ScanProjectParams} params
400
427
  * @returns {ScanProjectResult}
@@ -407,25 +434,25 @@ class Workspace {
407
434
  return takeFromExternrefTable0(ret[0]);
408
435
  }
409
436
  /**
410
- * @param {OpenFileParams} params
411
- * @returns {OpenFileResult}
437
+ * @param {SupportsFeatureParams} params
438
+ * @returns {FileFeaturesResult}
412
439
  */
413
- openFile(params) {
414
- const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
440
+ fileFeatures(params) {
441
+ const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
415
442
  if (ret[2]) {
416
443
  throw takeFromExternrefTable0(ret[1]);
417
444
  }
418
445
  return takeFromExternrefTable0(ret[0]);
419
446
  }
420
447
  /**
421
- * @param {GetFileContentParams} params
448
+ * @param {GetTypeInfoParams} params
422
449
  * @returns {string}
423
450
  */
424
- getFileContent(params) {
451
+ getTypeInfo(params) {
425
452
  let deferred2_0;
426
453
  let deferred2_1;
427
454
  try {
428
- const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
455
+ const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
429
456
  var ptr1 = ret[0];
430
457
  var len1 = ret[1];
431
458
  if (ret[3]) {
@@ -439,6 +466,17 @@ class Workspace {
439
466
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
440
467
  }
441
468
  }
469
+ /**
470
+ * @param {FormatOnTypeParams} params
471
+ * @returns {any}
472
+ */
473
+ formatOnType(params) {
474
+ const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
475
+ if (ret[2]) {
476
+ throw takeFromExternrefTable0(ret[1]);
477
+ }
478
+ return takeFromExternrefTable0(ret[0]);
479
+ }
442
480
  /**
443
481
  * @param {GetSyntaxTreeParams} params
444
482
  * @returns {GetSyntaxTreeResult}
@@ -451,14 +489,36 @@ class Workspace {
451
489
  return takeFromExternrefTable0(ret[0]);
452
490
  }
453
491
  /**
454
- * @param {GetControlFlowGraphParams} params
492
+ * @param {PathIsIgnoredParams} params
493
+ * @returns {boolean}
494
+ */
495
+ isPathIgnored(params) {
496
+ const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
497
+ if (ret[2]) {
498
+ throw takeFromExternrefTable0(ret[1]);
499
+ }
500
+ return ret[0] !== 0;
501
+ }
502
+ /**
503
+ * @param {UpdateSettingsParams} params
504
+ * @returns {UpdateSettingsResult}
505
+ */
506
+ updateSettings(params) {
507
+ const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
508
+ if (ret[2]) {
509
+ throw takeFromExternrefTable0(ret[1]);
510
+ }
511
+ return takeFromExternrefTable0(ret[0]);
512
+ }
513
+ /**
514
+ * @param {GetFileContentParams} params
455
515
  * @returns {string}
456
516
  */
457
- getControlFlowGraph(params) {
517
+ getFileContent(params) {
458
518
  let deferred2_0;
459
519
  let deferred2_1;
460
520
  try {
461
- const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
521
+ const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
462
522
  var ptr1 = ret[0];
463
523
  var len1 = ret[1];
464
524
  if (ret[3]) {
@@ -495,14 +555,36 @@ class Workspace {
495
555
  }
496
556
  }
497
557
  /**
498
- * @param {GetTypeInfoParams} params
558
+ * @param {GetModuleGraphParams} params
559
+ * @returns {GetModuleGraphResult}
560
+ */
561
+ getModuleGraph(params) {
562
+ const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
563
+ if (ret[2]) {
564
+ throw takeFromExternrefTable0(ret[1]);
565
+ }
566
+ return takeFromExternrefTable0(ret[0]);
567
+ }
568
+ /**
569
+ * @param {PullDiagnosticsParams} params
570
+ * @returns {PullDiagnosticsResult}
571
+ */
572
+ pullDiagnostics(params) {
573
+ const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
574
+ if (ret[2]) {
575
+ throw takeFromExternrefTable0(ret[1]);
576
+ }
577
+ return takeFromExternrefTable0(ret[0]);
578
+ }
579
+ /**
580
+ * @param {GetSemanticModelParams} params
499
581
  * @returns {string}
500
582
  */
501
- getTypeInfo(params) {
583
+ getSemanticModel(params) {
502
584
  let deferred2_0;
503
585
  let deferred2_1;
504
586
  try {
505
- const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
587
+ const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
506
588
  var ptr1 = ret[0];
507
589
  var len1 = ret[1];
508
590
  if (ret[3]) {
@@ -516,6 +598,24 @@ class Workspace {
516
598
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
517
599
  }
518
600
  }
601
+ /**
602
+ * @param {MemoryFileSystem} fs
603
+ * @returns {Workspace}
604
+ */
605
+ static withFileSystem(fs) {
606
+ _assertClass(fs, MemoryFileSystem);
607
+ const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
608
+ return Workspace.__wrap(ret);
609
+ }
610
+ /**
611
+ * @param {UpdateModuleGraphParams} params
612
+ */
613
+ updateModuleGraph(params) {
614
+ const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
615
+ if (ret[1]) {
616
+ throw takeFromExternrefTable0(ret[0]);
617
+ }
618
+ }
519
619
  /**
520
620
  * @param {GetRegisteredTypesParams} params
521
621
  * @returns {string}
@@ -539,14 +639,14 @@ class Workspace {
539
639
  }
540
640
  }
541
641
  /**
542
- * @param {GetSemanticModelParams} params
642
+ * @param {GetControlFlowGraphParams} params
543
643
  * @returns {string}
544
644
  */
545
- getSemanticModel(params) {
645
+ getControlFlowGraph(params) {
546
646
  let deferred2_0;
547
647
  let deferred2_1;
548
648
  try {
549
- const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
649
+ const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
550
650
  var ptr1 = ret[0];
551
651
  var len1 = ret[1];
552
652
  if (ret[3]) {
@@ -560,118 +660,18 @@ class Workspace {
560
660
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
561
661
  }
562
662
  }
563
- /**
564
- * @param {ChangeFileParams} params
565
- * @returns {ChangeFileResult}
566
- */
567
- changeFile(params) {
568
- const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
569
- if (ret[2]) {
570
- throw takeFromExternrefTable0(ret[1]);
571
- }
572
- return takeFromExternrefTable0(ret[0]);
573
- }
574
- /**
575
- * @param {CloseFileParams} params
576
- */
577
- closeFile(params) {
578
- const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
579
- if (ret[1]) {
580
- throw takeFromExternrefTable0(ret[0]);
581
- }
582
- }
583
- /**
584
- * @param {FileExitsParams} params
585
- * @returns {boolean}
586
- */
587
- fileExists(params) {
588
- const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
589
- if (ret[2]) {
590
- throw takeFromExternrefTable0(ret[1]);
591
- }
592
- return ret[0] !== 0;
593
- }
594
- /**
595
- * @param {PathIsIgnoredParams} params
596
- * @returns {boolean}
597
- */
598
- isPathIgnored(params) {
599
- const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
600
- if (ret[2]) {
601
- throw takeFromExternrefTable0(ret[1]);
602
- }
603
- return ret[0] !== 0;
604
- }
605
- /**
606
- * @param {UpdateModuleGraphParams} params
607
- */
608
- updateModuleGraph(params) {
609
- const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
610
- if (ret[1]) {
611
- throw takeFromExternrefTable0(ret[0]);
612
- }
613
- }
614
- /**
615
- * @param {GetModuleGraphParams} params
616
- * @returns {GetModuleGraphResult}
617
- */
618
- getModuleGraph(params) {
619
- const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
620
- if (ret[2]) {
621
- throw takeFromExternrefTable0(ret[1]);
622
- }
623
- return takeFromExternrefTable0(ret[0]);
624
- }
625
- /**
626
- * @param {PullDiagnosticsParams} params
627
- * @returns {PullDiagnosticsResult}
628
- */
629
- pullDiagnostics(params) {
630
- const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
631
- if (ret[2]) {
632
- throw takeFromExternrefTable0(ret[1]);
633
- }
634
- return takeFromExternrefTable0(ret[0]);
635
- }
636
- /**
637
- * @param {PullActionsParams} params
638
- * @returns {PullActionsResult}
639
- */
640
- pullActions(params) {
641
- const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
642
- if (ret[2]) {
643
- throw takeFromExternrefTable0(ret[1]);
644
- }
645
- return takeFromExternrefTable0(ret[0]);
646
- }
647
- /**
648
- * @param {FormatFileParams} params
649
- * @returns {any}
650
- */
651
- formatFile(params) {
652
- const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
653
- if (ret[2]) {
654
- throw takeFromExternrefTable0(ret[1]);
655
- }
656
- return takeFromExternrefTable0(ret[0]);
657
- }
658
- /**
659
- * @param {FormatRangeParams} params
660
- * @returns {any}
661
- */
662
- formatRange(params) {
663
- const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
664
- if (ret[2]) {
665
- throw takeFromExternrefTable0(ret[1]);
666
- }
667
- return takeFromExternrefTable0(ret[0]);
663
+ constructor() {
664
+ const ret = wasm.workspace_new();
665
+ this.__wbg_ptr = ret >>> 0;
666
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
667
+ return this;
668
668
  }
669
669
  /**
670
- * @param {FormatOnTypeParams} params
671
- * @returns {any}
670
+ * @param {RenameParams} params
671
+ * @returns {RenameResult}
672
672
  */
673
- formatOnType(params) {
674
- const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
673
+ rename(params) {
674
+ const ret = wasm.workspace_rename(this.__wbg_ptr, params);
675
675
  if (ret[2]) {
676
676
  throw takeFromExternrefTable0(ret[1]);
677
677
  }
@@ -689,11 +689,11 @@ class Workspace {
689
689
  return takeFromExternrefTable0(ret[0]);
690
690
  }
691
691
  /**
692
- * @param {RenameParams} params
693
- * @returns {RenameResult}
692
+ * @param {OpenFileParams} params
693
+ * @returns {OpenFileResult}
694
694
  */
695
- rename(params) {
696
- const ret = wasm.workspace_rename(this.__wbg_ptr, params);
695
+ openFile(params) {
696
+ const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
697
697
  if (ret[2]) {
698
698
  throw takeFromExternrefTable0(ret[1]);
699
699
  }
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Biome Developers and Contributors"
5
5
  ],
6
6
  "description": "WebAssembly bindings to the Biome workspace API",
7
- "version": "2.3.2",
7
+ "version": "2.3.3",
8
8
  "license": "MIT OR Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",