@biomejs/wasm-bundler 2.3.1 → 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
  */
@@ -1533,6 +1533,10 @@ interface Nursery {
1533
1533
  * Prevent import cycles.
1534
1534
  */
1535
1535
  noImportCycles?: RuleConfiguration_for_NoImportCyclesOptions;
1536
+ /**
1537
+ * Disallows the usage of the unary operators ++ and --.
1538
+ */
1539
+ noIncrementDecrement?: RuleConfiguration_for_NoIncrementDecrementOptions;
1536
1540
  /**
1537
1541
  * Disallow string literals inside JSX elements.
1538
1542
  */
@@ -1545,6 +1549,10 @@ interface Nursery {
1545
1549
  * Prevent client components from being async functions.
1546
1550
  */
1547
1551
  noNextAsyncClientComponent?: RuleConfiguration_for_NoNextAsyncClientComponentOptions;
1552
+ /**
1553
+ * Disallow function parameters that are only used in recursive calls.
1554
+ */
1555
+ noParametersOnlyUsedInRecursion?: RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions;
1548
1556
  /**
1549
1557
  * Replaces usages of forwardRef with passing ref as a prop.
1550
1558
  */
@@ -1553,6 +1561,10 @@ interface Nursery {
1553
1561
  * Disallow variable declarations from shadowing variables declared in the outer scope.
1554
1562
  */
1555
1563
  noShadow?: RuleConfiguration_for_NoShadowOptions;
1564
+ /**
1565
+ * Disallow unknown DOM properties.
1566
+ */
1567
+ noUnknownAttribute?: RuleConfiguration_for_NoUnknownAttributeOptions;
1556
1568
  /**
1557
1569
  * Disallow unnecessary type-based conditions that can be statically determined as redundant.
1558
1570
  */
@@ -2898,6 +2910,9 @@ type RuleFixConfiguration_for_NoFloatingPromisesOptions =
2898
2910
  type RuleConfiguration_for_NoImportCyclesOptions =
2899
2911
  | RulePlainConfiguration
2900
2912
  | RuleWithOptions_for_NoImportCyclesOptions;
2913
+ type RuleConfiguration_for_NoIncrementDecrementOptions =
2914
+ | RulePlainConfiguration
2915
+ | RuleWithOptions_for_NoIncrementDecrementOptions;
2901
2916
  type RuleConfiguration_for_NoJsxLiteralsOptions =
2902
2917
  | RulePlainConfiguration
2903
2918
  | RuleWithOptions_for_NoJsxLiteralsOptions;
@@ -2907,12 +2922,18 @@ type RuleFixConfiguration_for_NoMisusedPromisesOptions =
2907
2922
  type RuleConfiguration_for_NoNextAsyncClientComponentOptions =
2908
2923
  | RulePlainConfiguration
2909
2924
  | RuleWithOptions_for_NoNextAsyncClientComponentOptions;
2925
+ type RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions =
2926
+ | RulePlainConfiguration
2927
+ | RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions;
2910
2928
  type RuleFixConfiguration_for_NoReactForwardRefOptions =
2911
2929
  | RulePlainConfiguration
2912
2930
  | RuleWithFixOptions_for_NoReactForwardRefOptions;
2913
2931
  type RuleConfiguration_for_NoShadowOptions =
2914
2932
  | RulePlainConfiguration
2915
2933
  | RuleWithOptions_for_NoShadowOptions;
2934
+ type RuleConfiguration_for_NoUnknownAttributeOptions =
2935
+ | RulePlainConfiguration
2936
+ | RuleWithOptions_for_NoUnknownAttributeOptions;
2916
2937
  type RuleConfiguration_for_NoUnnecessaryConditionsOptions =
2917
2938
  | RulePlainConfiguration
2918
2939
  | RuleWithOptions_for_NoUnnecessaryConditionsOptions;
@@ -5351,6 +5372,16 @@ interface RuleWithOptions_for_NoImportCyclesOptions {
5351
5372
  */
5352
5373
  options: NoImportCyclesOptions;
5353
5374
  }
5375
+ interface RuleWithOptions_for_NoIncrementDecrementOptions {
5376
+ /**
5377
+ * The severity of the emitted diagnostics by the rule
5378
+ */
5379
+ level: RulePlainConfiguration;
5380
+ /**
5381
+ * Rule's options
5382
+ */
5383
+ options: NoIncrementDecrementOptions;
5384
+ }
5354
5385
  interface RuleWithOptions_for_NoJsxLiteralsOptions {
5355
5386
  /**
5356
5387
  * The severity of the emitted diagnostics by the rule
@@ -5385,6 +5416,20 @@ interface RuleWithOptions_for_NoNextAsyncClientComponentOptions {
5385
5416
  */
5386
5417
  options: NoNextAsyncClientComponentOptions;
5387
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
+ }
5388
5433
  interface RuleWithFixOptions_for_NoReactForwardRefOptions {
5389
5434
  /**
5390
5435
  * The kind of the code actions emitted by the rule
@@ -5409,6 +5454,16 @@ interface RuleWithOptions_for_NoShadowOptions {
5409
5454
  */
5410
5455
  options: NoShadowOptions;
5411
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
+ }
5412
5467
  interface RuleWithOptions_for_NoUnnecessaryConditionsOptions {
5413
5468
  /**
5414
5469
  * The severity of the emitted diagnostics by the rule
@@ -8081,6 +8136,12 @@ interface NoImportCyclesOptions {
8081
8136
  */
8082
8137
  ignoreTypes?: boolean;
8083
8138
  }
8139
+ interface NoIncrementDecrementOptions {
8140
+ /**
8141
+ * Allows unary operators ++ and -- in the afterthought (final expression) of a for loop.
8142
+ */
8143
+ allowForLoopAfterthoughts?: boolean;
8144
+ }
8084
8145
  interface NoJsxLiteralsOptions {
8085
8146
  /**
8086
8147
  * An array of strings that won't trigger the rule. Whitespaces are taken into consideration
@@ -8097,8 +8158,12 @@ interface NoJsxLiteralsOptions {
8097
8158
  }
8098
8159
  interface NoMisusedPromisesOptions {}
8099
8160
  interface NoNextAsyncClientComponentOptions {}
8161
+ interface NoParametersOnlyUsedInRecursionOptions {}
8100
8162
  interface NoReactForwardRefOptions {}
8101
8163
  interface NoShadowOptions {}
8164
+ interface NoUnknownAttributeOptions {
8165
+ ignore: string[];
8166
+ }
8102
8167
  interface NoUnnecessaryConditionsOptions {}
8103
8168
  interface NoUnresolvedImportsOptions {}
8104
8169
  interface NoUnusedExpressionsOptions {}
@@ -8833,12 +8898,15 @@ type Category =
8833
8898
  | "lint/nursery/noFloatingPromises"
8834
8899
  | "lint/nursery/noImplicitCoercion"
8835
8900
  | "lint/nursery/noImportCycles"
8901
+ | "lint/nursery/noIncrementDecrement"
8836
8902
  | "lint/nursery/noJsxLiterals"
8837
8903
  | "lint/nursery/noMissingGenericFamilyKeyword"
8838
8904
  | "lint/nursery/noMisusedPromises"
8839
8905
  | "lint/nursery/noNextAsyncClientComponent"
8906
+ | "lint/nursery/noParametersOnlyUsedInRecursion"
8840
8907
  | "lint/nursery/noReactForwardRef"
8841
8908
  | "lint/nursery/noShadow"
8909
+ | "lint/nursery/noUnknownAttribute"
8842
8910
  | "lint/nursery/noUnnecessaryConditions"
8843
8911
  | "lint/nursery/noUnresolvedImports"
8844
8912
  | "lint/nursery/noUnusedExpressions"
@@ -9597,9 +9665,9 @@ interface DropPatternParams {
9597
9665
  export class DiagnosticPrinter {
9598
9666
  free(): void;
9599
9667
  [Symbol.dispose](): void;
9600
- constructor(file_name: string, file_source: string);
9601
9668
  print_simple(diagnostic: Diagnostic): void;
9602
9669
  print_verbose(diagnostic: Diagnostic): void;
9670
+ constructor(file_name: string, file_source: string);
9603
9671
  finish(): string;
9604
9672
  }
9605
9673
  export class MemoryFileSystem {
@@ -9612,31 +9680,31 @@ export class MemoryFileSystem {
9612
9680
  export class Workspace {
9613
9681
  free(): void;
9614
9682
  [Symbol.dispose](): void;
9615
- constructor();
9616
- static withFileSystem(fs: MemoryFileSystem): Workspace;
9617
- fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9618
- 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;
9619
9688
  openProject(params: OpenProjectParams): OpenProjectResult;
9689
+ pullActions(params: PullActionsParams): PullActionsResult;
9620
9690
  scanProject(params: ScanProjectParams): ScanProjectResult;
9621
- openFile(params: OpenFileParams): OpenFileResult;
9622
- getFileContent(params: GetFileContentParams): string;
9623
- getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9624
- getControlFlowGraph(params: GetControlFlowGraphParams): string;
9625
- getFormatterIr(params: GetFormatterIRParams): string;
9691
+ fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9626
9692
  getTypeInfo(params: GetTypeInfoParams): string;
9627
- getRegisteredTypes(params: GetRegisteredTypesParams): string;
9628
- getSemanticModel(params: GetSemanticModelParams): string;
9629
- changeFile(params: ChangeFileParams): ChangeFileResult;
9630
- closeFile(params: CloseFileParams): void;
9631
- fileExists(params: FileExitsParams): boolean;
9693
+ formatOnType(params: FormatOnTypeParams): any;
9694
+ getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9632
9695
  isPathIgnored(params: PathIsIgnoredParams): boolean;
9633
- updateModuleGraph(params: UpdateModuleGraphParams): void;
9696
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9697
+ getFileContent(params: GetFileContentParams): string;
9698
+ getFormatterIr(params: GetFormatterIRParams): string;
9634
9699
  getModuleGraph(params: GetModuleGraphParams): GetModuleGraphResult;
9635
9700
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
9636
- pullActions(params: PullActionsParams): PullActionsResult;
9637
- formatFile(params: FormatFileParams): any;
9638
- formatRange(params: FormatRangeParams): any;
9639
- formatOnType(params: FormatOnTypeParams): any;
9640
- 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();
9641
9707
  rename(params: RenameParams): RenameResult;
9708
+ fixFile(params: FixFileParams): FixFileResult;
9709
+ openFile(params: OpenFileParams): OpenFileResult;
9642
9710
  }
package/biome_wasm_bg.js CHANGED
@@ -186,10 +186,6 @@ function debugString(val) {
186
186
  return className;
187
187
  }
188
188
 
189
- export function main() {
190
- wasm.main();
191
- }
192
-
193
189
  function passArray8ToWasm0(arg, malloc) {
194
190
  const ptr = malloc(arg.length * 1, 1) >>> 0;
195
191
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -197,10 +193,8 @@ function passArray8ToWasm0(arg, malloc) {
197
193
  return ptr;
198
194
  }
199
195
 
200
- function _assertClass(instance, klass) {
201
- if (!(instance instanceof klass)) {
202
- throw new Error(`expected instance of ${klass.name}`);
203
- }
196
+ export function main() {
197
+ wasm.main();
204
198
  }
205
199
 
206
200
  function takeFromExternrefTable0(idx) {
@@ -209,6 +203,12 @@ function takeFromExternrefTable0(idx) {
209
203
  return value;
210
204
  }
211
205
 
206
+ function _assertClass(instance, klass) {
207
+ if (!(instance instanceof klass)) {
208
+ throw new Error(`expected instance of ${klass.name}`);
209
+ }
210
+ }
211
+
212
212
  const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
213
213
  ? { register: () => {}, unregister: () => {} }
214
214
  : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
@@ -226,20 +226,6 @@ export class DiagnosticPrinter {
226
226
  const ptr = this.__destroy_into_raw();
227
227
  wasm.__wbg_diagnosticprinter_free(ptr, 0);
228
228
  }
229
- /**
230
- * @param {string} file_name
231
- * @param {string} file_source
232
- */
233
- constructor(file_name, file_source) {
234
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
235
- const len0 = WASM_VECTOR_LEN;
236
- const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
237
- const len1 = WASM_VECTOR_LEN;
238
- const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
239
- this.__wbg_ptr = ret >>> 0;
240
- DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
241
- return this;
242
- }
243
229
  /**
244
230
  * @param {Diagnostic} diagnostic
245
231
  */
@@ -258,6 +244,20 @@ export class DiagnosticPrinter {
258
244
  throw takeFromExternrefTable0(ret[0]);
259
245
  }
260
246
  }
247
+ /**
248
+ * @param {string} file_name
249
+ * @param {string} file_source
250
+ */
251
+ constructor(file_name, file_source) {
252
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
+ const len0 = WASM_VECTOR_LEN;
254
+ const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
255
+ const len1 = WASM_VECTOR_LEN;
256
+ const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
257
+ this.__wbg_ptr = ret >>> 0;
258
+ DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
259
+ return this;
260
+ }
261
261
  /**
262
262
  * @returns {string}
263
263
  */
@@ -353,38 +353,54 @@ export class Workspace {
353
353
  const ptr = this.__destroy_into_raw();
354
354
  wasm.__wbg_workspace_free(ptr, 0);
355
355
  }
356
- constructor() {
357
- const ret = wasm.workspace_new();
358
- this.__wbg_ptr = ret >>> 0;
359
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
360
- return this;
356
+ /**
357
+ * @param {CloseFileParams} params
358
+ */
359
+ closeFile(params) {
360
+ const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
361
+ if (ret[1]) {
362
+ throw takeFromExternrefTable0(ret[0]);
363
+ }
361
364
  }
362
365
  /**
363
- * @param {MemoryFileSystem} fs
364
- * @returns {Workspace}
366
+ * @param {ChangeFileParams} params
367
+ * @returns {ChangeFileResult}
365
368
  */
366
- static withFileSystem(fs) {
367
- _assertClass(fs, MemoryFileSystem);
368
- const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
369
- return Workspace.__wrap(ret);
369
+ changeFile(params) {
370
+ const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
371
+ if (ret[2]) {
372
+ throw takeFromExternrefTable0(ret[1]);
373
+ }
374
+ return takeFromExternrefTable0(ret[0]);
370
375
  }
371
376
  /**
372
- * @param {SupportsFeatureParams} params
373
- * @returns {FileFeaturesResult}
377
+ * @param {FileExitsParams} params
378
+ * @returns {boolean}
374
379
  */
375
- fileFeatures(params) {
376
- const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
380
+ fileExists(params) {
381
+ const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
382
+ if (ret[2]) {
383
+ throw takeFromExternrefTable0(ret[1]);
384
+ }
385
+ return ret[0] !== 0;
386
+ }
387
+ /**
388
+ * @param {FormatFileParams} params
389
+ * @returns {any}
390
+ */
391
+ formatFile(params) {
392
+ const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
377
393
  if (ret[2]) {
378
394
  throw takeFromExternrefTable0(ret[1]);
379
395
  }
380
396
  return takeFromExternrefTable0(ret[0]);
381
397
  }
382
398
  /**
383
- * @param {UpdateSettingsParams} params
384
- * @returns {UpdateSettingsResult}
399
+ * @param {FormatRangeParams} params
400
+ * @returns {any}
385
401
  */
386
- updateSettings(params) {
387
- const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
402
+ formatRange(params) {
403
+ const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
388
404
  if (ret[2]) {
389
405
  throw takeFromExternrefTable0(ret[1]);
390
406
  }
@@ -401,6 +417,17 @@ export class Workspace {
401
417
  }
402
418
  return takeFromExternrefTable0(ret[0]);
403
419
  }
420
+ /**
421
+ * @param {PullActionsParams} params
422
+ * @returns {PullActionsResult}
423
+ */
424
+ pullActions(params) {
425
+ const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
426
+ if (ret[2]) {
427
+ throw takeFromExternrefTable0(ret[1]);
428
+ }
429
+ return takeFromExternrefTable0(ret[0]);
430
+ }
404
431
  /**
405
432
  * @param {ScanProjectParams} params
406
433
  * @returns {ScanProjectResult}
@@ -413,25 +440,25 @@ export class Workspace {
413
440
  return takeFromExternrefTable0(ret[0]);
414
441
  }
415
442
  /**
416
- * @param {OpenFileParams} params
417
- * @returns {OpenFileResult}
443
+ * @param {SupportsFeatureParams} params
444
+ * @returns {FileFeaturesResult}
418
445
  */
419
- openFile(params) {
420
- const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
446
+ fileFeatures(params) {
447
+ const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
421
448
  if (ret[2]) {
422
449
  throw takeFromExternrefTable0(ret[1]);
423
450
  }
424
451
  return takeFromExternrefTable0(ret[0]);
425
452
  }
426
453
  /**
427
- * @param {GetFileContentParams} params
454
+ * @param {GetTypeInfoParams} params
428
455
  * @returns {string}
429
456
  */
430
- getFileContent(params) {
457
+ getTypeInfo(params) {
431
458
  let deferred2_0;
432
459
  let deferred2_1;
433
460
  try {
434
- const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
461
+ const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
435
462
  var ptr1 = ret[0];
436
463
  var len1 = ret[1];
437
464
  if (ret[3]) {
@@ -445,6 +472,17 @@ export class Workspace {
445
472
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
446
473
  }
447
474
  }
475
+ /**
476
+ * @param {FormatOnTypeParams} params
477
+ * @returns {any}
478
+ */
479
+ formatOnType(params) {
480
+ const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
481
+ if (ret[2]) {
482
+ throw takeFromExternrefTable0(ret[1]);
483
+ }
484
+ return takeFromExternrefTable0(ret[0]);
485
+ }
448
486
  /**
449
487
  * @param {GetSyntaxTreeParams} params
450
488
  * @returns {GetSyntaxTreeResult}
@@ -457,14 +495,36 @@ export class Workspace {
457
495
  return takeFromExternrefTable0(ret[0]);
458
496
  }
459
497
  /**
460
- * @param {GetControlFlowGraphParams} params
498
+ * @param {PathIsIgnoredParams} params
499
+ * @returns {boolean}
500
+ */
501
+ isPathIgnored(params) {
502
+ const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
503
+ if (ret[2]) {
504
+ throw takeFromExternrefTable0(ret[1]);
505
+ }
506
+ return ret[0] !== 0;
507
+ }
508
+ /**
509
+ * @param {UpdateSettingsParams} params
510
+ * @returns {UpdateSettingsResult}
511
+ */
512
+ updateSettings(params) {
513
+ const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
514
+ if (ret[2]) {
515
+ throw takeFromExternrefTable0(ret[1]);
516
+ }
517
+ return takeFromExternrefTable0(ret[0]);
518
+ }
519
+ /**
520
+ * @param {GetFileContentParams} params
461
521
  * @returns {string}
462
522
  */
463
- getControlFlowGraph(params) {
523
+ getFileContent(params) {
464
524
  let deferred2_0;
465
525
  let deferred2_1;
466
526
  try {
467
- const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
527
+ const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
468
528
  var ptr1 = ret[0];
469
529
  var len1 = ret[1];
470
530
  if (ret[3]) {
@@ -501,14 +561,36 @@ export class Workspace {
501
561
  }
502
562
  }
503
563
  /**
504
- * @param {GetTypeInfoParams} params
564
+ * @param {GetModuleGraphParams} params
565
+ * @returns {GetModuleGraphResult}
566
+ */
567
+ getModuleGraph(params) {
568
+ const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
569
+ if (ret[2]) {
570
+ throw takeFromExternrefTable0(ret[1]);
571
+ }
572
+ return takeFromExternrefTable0(ret[0]);
573
+ }
574
+ /**
575
+ * @param {PullDiagnosticsParams} params
576
+ * @returns {PullDiagnosticsResult}
577
+ */
578
+ pullDiagnostics(params) {
579
+ const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
580
+ if (ret[2]) {
581
+ throw takeFromExternrefTable0(ret[1]);
582
+ }
583
+ return takeFromExternrefTable0(ret[0]);
584
+ }
585
+ /**
586
+ * @param {GetSemanticModelParams} params
505
587
  * @returns {string}
506
588
  */
507
- getTypeInfo(params) {
589
+ getSemanticModel(params) {
508
590
  let deferred2_0;
509
591
  let deferred2_1;
510
592
  try {
511
- const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
593
+ const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
512
594
  var ptr1 = ret[0];
513
595
  var len1 = ret[1];
514
596
  if (ret[3]) {
@@ -522,6 +604,24 @@ export class Workspace {
522
604
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
523
605
  }
524
606
  }
607
+ /**
608
+ * @param {MemoryFileSystem} fs
609
+ * @returns {Workspace}
610
+ */
611
+ static withFileSystem(fs) {
612
+ _assertClass(fs, MemoryFileSystem);
613
+ const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
614
+ return Workspace.__wrap(ret);
615
+ }
616
+ /**
617
+ * @param {UpdateModuleGraphParams} params
618
+ */
619
+ updateModuleGraph(params) {
620
+ const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
621
+ if (ret[1]) {
622
+ throw takeFromExternrefTable0(ret[0]);
623
+ }
624
+ }
525
625
  /**
526
626
  * @param {GetRegisteredTypesParams} params
527
627
  * @returns {string}
@@ -545,14 +645,14 @@ export class Workspace {
545
645
  }
546
646
  }
547
647
  /**
548
- * @param {GetSemanticModelParams} params
648
+ * @param {GetControlFlowGraphParams} params
549
649
  * @returns {string}
550
650
  */
551
- getSemanticModel(params) {
651
+ getControlFlowGraph(params) {
552
652
  let deferred2_0;
553
653
  let deferred2_1;
554
654
  try {
555
- const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
655
+ const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
556
656
  var ptr1 = ret[0];
557
657
  var len1 = ret[1];
558
658
  if (ret[3]) {
@@ -566,118 +666,18 @@ export class Workspace {
566
666
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
567
667
  }
568
668
  }
569
- /**
570
- * @param {ChangeFileParams} params
571
- * @returns {ChangeFileResult}
572
- */
573
- changeFile(params) {
574
- const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
575
- if (ret[2]) {
576
- throw takeFromExternrefTable0(ret[1]);
577
- }
578
- return takeFromExternrefTable0(ret[0]);
579
- }
580
- /**
581
- * @param {CloseFileParams} params
582
- */
583
- closeFile(params) {
584
- const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
585
- if (ret[1]) {
586
- throw takeFromExternrefTable0(ret[0]);
587
- }
588
- }
589
- /**
590
- * @param {FileExitsParams} params
591
- * @returns {boolean}
592
- */
593
- fileExists(params) {
594
- const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
595
- if (ret[2]) {
596
- throw takeFromExternrefTable0(ret[1]);
597
- }
598
- return ret[0] !== 0;
599
- }
600
- /**
601
- * @param {PathIsIgnoredParams} params
602
- * @returns {boolean}
603
- */
604
- isPathIgnored(params) {
605
- const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
606
- if (ret[2]) {
607
- throw takeFromExternrefTable0(ret[1]);
608
- }
609
- return ret[0] !== 0;
610
- }
611
- /**
612
- * @param {UpdateModuleGraphParams} params
613
- */
614
- updateModuleGraph(params) {
615
- const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
616
- if (ret[1]) {
617
- throw takeFromExternrefTable0(ret[0]);
618
- }
619
- }
620
- /**
621
- * @param {GetModuleGraphParams} params
622
- * @returns {GetModuleGraphResult}
623
- */
624
- getModuleGraph(params) {
625
- const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
626
- if (ret[2]) {
627
- throw takeFromExternrefTable0(ret[1]);
628
- }
629
- return takeFromExternrefTable0(ret[0]);
630
- }
631
- /**
632
- * @param {PullDiagnosticsParams} params
633
- * @returns {PullDiagnosticsResult}
634
- */
635
- pullDiagnostics(params) {
636
- const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
637
- if (ret[2]) {
638
- throw takeFromExternrefTable0(ret[1]);
639
- }
640
- return takeFromExternrefTable0(ret[0]);
641
- }
642
- /**
643
- * @param {PullActionsParams} params
644
- * @returns {PullActionsResult}
645
- */
646
- pullActions(params) {
647
- const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
648
- if (ret[2]) {
649
- throw takeFromExternrefTable0(ret[1]);
650
- }
651
- return takeFromExternrefTable0(ret[0]);
652
- }
653
- /**
654
- * @param {FormatFileParams} params
655
- * @returns {any}
656
- */
657
- formatFile(params) {
658
- const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
659
- if (ret[2]) {
660
- throw takeFromExternrefTable0(ret[1]);
661
- }
662
- return takeFromExternrefTable0(ret[0]);
663
- }
664
- /**
665
- * @param {FormatRangeParams} params
666
- * @returns {any}
667
- */
668
- formatRange(params) {
669
- const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
670
- if (ret[2]) {
671
- throw takeFromExternrefTable0(ret[1]);
672
- }
673
- return takeFromExternrefTable0(ret[0]);
669
+ constructor() {
670
+ const ret = wasm.workspace_new();
671
+ this.__wbg_ptr = ret >>> 0;
672
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
673
+ return this;
674
674
  }
675
675
  /**
676
- * @param {FormatOnTypeParams} params
677
- * @returns {any}
676
+ * @param {RenameParams} params
677
+ * @returns {RenameResult}
678
678
  */
679
- formatOnType(params) {
680
- const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
679
+ rename(params) {
680
+ const ret = wasm.workspace_rename(this.__wbg_ptr, params);
681
681
  if (ret[2]) {
682
682
  throw takeFromExternrefTable0(ret[1]);
683
683
  }
@@ -695,11 +695,11 @@ export class Workspace {
695
695
  return takeFromExternrefTable0(ret[0]);
696
696
  }
697
697
  /**
698
- * @param {RenameParams} params
699
- * @returns {RenameResult}
698
+ * @param {OpenFileParams} params
699
+ * @returns {OpenFileResult}
700
700
  */
701
- rename(params) {
702
- const ret = wasm.workspace_rename(this.__wbg_ptr, params);
701
+ openFile(params) {
702
+ const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
703
703
  if (ret[2]) {
704
704
  throw takeFromExternrefTable0(ret[1]);
705
705
  }
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Biome Developers and Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings to the Biome workspace API",
8
- "version": "2.3.1",
8
+ "version": "2.3.3",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",