@biomejs/wasm-web 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,33 +9680,33 @@ 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
  }
9643
9711
 
9644
9712
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -9646,43 +9714,43 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
9646
9714
  export interface InitOutput {
9647
9715
  readonly memory: WebAssembly.Memory;
9648
9716
  readonly __wbg_memoryfilesystem_free: (a: number, b: number) => void;
9649
- readonly memoryfilesystem_new: () => number;
9717
+ readonly __wbg_workspace_free: (a: number, b: number) => void;
9650
9718
  readonly memoryfilesystem_insert: (a: number, b: number, c: number, d: number, e: number) => void;
9719
+ readonly memoryfilesystem_new: () => number;
9651
9720
  readonly memoryfilesystem_remove: (a: number, b: number, c: number) => void;
9652
- readonly __wbg_workspace_free: (a: number, b: number) => void;
9653
- readonly workspace_new: () => number;
9654
- readonly workspace_withFileSystem: (a: number) => number;
9721
+ readonly workspace_changeFile: (a: number, b: any) => [number, number, number];
9722
+ readonly workspace_closeFile: (a: number, b: any) => [number, number];
9723
+ readonly workspace_fileExists: (a: number, b: any) => [number, number, number];
9655
9724
  readonly workspace_fileFeatures: (a: number, b: any) => [number, number, number];
9656
- readonly workspace_updateSettings: (a: number, b: any) => [number, number, number];
9657
- readonly workspace_openProject: (a: number, b: any) => [number, number, number];
9658
- readonly workspace_scanProject: (a: number, b: any) => [number, number, number];
9659
- readonly workspace_openFile: (a: number, b: any) => [number, number, number];
9660
- readonly workspace_getFileContent: (a: number, b: any) => [number, number, number, number];
9661
- readonly workspace_getSyntaxTree: (a: number, b: any) => [number, number, number];
9725
+ readonly workspace_fixFile: (a: number, b: any) => [number, number, number];
9726
+ readonly workspace_formatFile: (a: number, b: any) => [number, number, number];
9727
+ readonly workspace_formatOnType: (a: number, b: any) => [number, number, number];
9728
+ readonly workspace_formatRange: (a: number, b: any) => [number, number, number];
9662
9729
  readonly workspace_getControlFlowGraph: (a: number, b: any) => [number, number, number, number];
9730
+ readonly workspace_getFileContent: (a: number, b: any) => [number, number, number, number];
9663
9731
  readonly workspace_getFormatterIr: (a: number, b: any) => [number, number, number, number];
9664
- readonly workspace_getTypeInfo: (a: number, b: any) => [number, number, number, number];
9732
+ readonly workspace_getModuleGraph: (a: number, b: any) => [number, number, number];
9665
9733
  readonly workspace_getRegisteredTypes: (a: number, b: any) => [number, number, number, number];
9666
9734
  readonly workspace_getSemanticModel: (a: number, b: any) => [number, number, number, number];
9667
- readonly workspace_changeFile: (a: number, b: any) => [number, number, number];
9668
- readonly workspace_closeFile: (a: number, b: any) => [number, number];
9669
- readonly workspace_fileExists: (a: number, b: any) => [number, number, number];
9735
+ readonly workspace_getSyntaxTree: (a: number, b: any) => [number, number, number];
9736
+ readonly workspace_getTypeInfo: (a: number, b: any) => [number, number, number, number];
9670
9737
  readonly workspace_isPathIgnored: (a: number, b: any) => [number, number, number];
9671
- readonly workspace_updateModuleGraph: (a: number, b: any) => [number, number];
9672
- readonly workspace_getModuleGraph: (a: number, b: any) => [number, number, number];
9673
- readonly workspace_pullDiagnostics: (a: number, b: any) => [number, number, number];
9738
+ readonly workspace_new: () => number;
9739
+ readonly workspace_openFile: (a: number, b: any) => [number, number, number];
9740
+ readonly workspace_openProject: (a: number, b: any) => [number, number, number];
9674
9741
  readonly workspace_pullActions: (a: number, b: any) => [number, number, number];
9675
- readonly workspace_formatFile: (a: number, b: any) => [number, number, number];
9676
- readonly workspace_formatRange: (a: number, b: any) => [number, number, number];
9677
- readonly workspace_formatOnType: (a: number, b: any) => [number, number, number];
9678
- readonly workspace_fixFile: (a: number, b: any) => [number, number, number];
9742
+ readonly workspace_pullDiagnostics: (a: number, b: any) => [number, number, number];
9679
9743
  readonly workspace_rename: (a: number, b: any) => [number, number, number];
9744
+ readonly workspace_scanProject: (a: number, b: any) => [number, number, number];
9745
+ readonly workspace_updateModuleGraph: (a: number, b: any) => [number, number];
9746
+ readonly workspace_updateSettings: (a: number, b: any) => [number, number, number];
9747
+ readonly workspace_withFileSystem: (a: number) => number;
9680
9748
  readonly main: () => void;
9681
9749
  readonly __wbg_diagnosticprinter_free: (a: number, b: number) => void;
9750
+ readonly diagnosticprinter_finish: (a: number) => [number, number, number, number];
9682
9751
  readonly diagnosticprinter_new: (a: number, b: number, c: number, d: number) => number;
9683
9752
  readonly diagnosticprinter_print_simple: (a: number, b: any) => [number, number];
9684
9753
  readonly diagnosticprinter_print_verbose: (a: number, b: any) => [number, number];
9685
- readonly diagnosticprinter_finish: (a: number) => [number, number, number, number];
9686
9754
  readonly __wbindgen_malloc: (a: number, b: number) => number;
9687
9755
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
9688
9756
  readonly __wbindgen_exn_store: (a: number) => void;
package/biome_wasm.js CHANGED
@@ -182,10 +182,6 @@ function debugString(val) {
182
182
  return className;
183
183
  }
184
184
 
185
- export function main() {
186
- wasm.main();
187
- }
188
-
189
185
  function passArray8ToWasm0(arg, malloc) {
190
186
  const ptr = malloc(arg.length * 1, 1) >>> 0;
191
187
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -193,10 +189,8 @@ function passArray8ToWasm0(arg, malloc) {
193
189
  return ptr;
194
190
  }
195
191
 
196
- function _assertClass(instance, klass) {
197
- if (!(instance instanceof klass)) {
198
- throw new Error(`expected instance of ${klass.name}`);
199
- }
192
+ export function main() {
193
+ wasm.main();
200
194
  }
201
195
 
202
196
  function takeFromExternrefTable0(idx) {
@@ -205,6 +199,12 @@ function takeFromExternrefTable0(idx) {
205
199
  return value;
206
200
  }
207
201
 
202
+ function _assertClass(instance, klass) {
203
+ if (!(instance instanceof klass)) {
204
+ throw new Error(`expected instance of ${klass.name}`);
205
+ }
206
+ }
207
+
208
208
  const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
209
209
  ? { register: () => {}, unregister: () => {} }
210
210
  : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
@@ -222,20 +222,6 @@ export class DiagnosticPrinter {
222
222
  const ptr = this.__destroy_into_raw();
223
223
  wasm.__wbg_diagnosticprinter_free(ptr, 0);
224
224
  }
225
- /**
226
- * @param {string} file_name
227
- * @param {string} file_source
228
- */
229
- constructor(file_name, file_source) {
230
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
- const len0 = WASM_VECTOR_LEN;
232
- const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
233
- const len1 = WASM_VECTOR_LEN;
234
- const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
235
- this.__wbg_ptr = ret >>> 0;
236
- DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
237
- return this;
238
- }
239
225
  /**
240
226
  * @param {Diagnostic} diagnostic
241
227
  */
@@ -254,6 +240,20 @@ export class DiagnosticPrinter {
254
240
  throw takeFromExternrefTable0(ret[0]);
255
241
  }
256
242
  }
243
+ /**
244
+ * @param {string} file_name
245
+ * @param {string} file_source
246
+ */
247
+ constructor(file_name, file_source) {
248
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
+ const len0 = WASM_VECTOR_LEN;
250
+ const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
251
+ const len1 = WASM_VECTOR_LEN;
252
+ const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
253
+ this.__wbg_ptr = ret >>> 0;
254
+ DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
255
+ return this;
256
+ }
257
257
  /**
258
258
  * @returns {string}
259
259
  */
@@ -349,38 +349,54 @@ export class Workspace {
349
349
  const ptr = this.__destroy_into_raw();
350
350
  wasm.__wbg_workspace_free(ptr, 0);
351
351
  }
352
- constructor() {
353
- const ret = wasm.workspace_new();
354
- this.__wbg_ptr = ret >>> 0;
355
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
356
- return this;
352
+ /**
353
+ * @param {CloseFileParams} params
354
+ */
355
+ closeFile(params) {
356
+ const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
357
+ if (ret[1]) {
358
+ throw takeFromExternrefTable0(ret[0]);
359
+ }
357
360
  }
358
361
  /**
359
- * @param {MemoryFileSystem} fs
360
- * @returns {Workspace}
362
+ * @param {ChangeFileParams} params
363
+ * @returns {ChangeFileResult}
361
364
  */
362
- static withFileSystem(fs) {
363
- _assertClass(fs, MemoryFileSystem);
364
- const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
365
- return Workspace.__wrap(ret);
365
+ changeFile(params) {
366
+ const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
367
+ if (ret[2]) {
368
+ throw takeFromExternrefTable0(ret[1]);
369
+ }
370
+ return takeFromExternrefTable0(ret[0]);
366
371
  }
367
372
  /**
368
- * @param {SupportsFeatureParams} params
369
- * @returns {FileFeaturesResult}
373
+ * @param {FileExitsParams} params
374
+ * @returns {boolean}
370
375
  */
371
- fileFeatures(params) {
372
- const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
376
+ fileExists(params) {
377
+ const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
378
+ if (ret[2]) {
379
+ throw takeFromExternrefTable0(ret[1]);
380
+ }
381
+ return ret[0] !== 0;
382
+ }
383
+ /**
384
+ * @param {FormatFileParams} params
385
+ * @returns {any}
386
+ */
387
+ formatFile(params) {
388
+ const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
373
389
  if (ret[2]) {
374
390
  throw takeFromExternrefTable0(ret[1]);
375
391
  }
376
392
  return takeFromExternrefTable0(ret[0]);
377
393
  }
378
394
  /**
379
- * @param {UpdateSettingsParams} params
380
- * @returns {UpdateSettingsResult}
395
+ * @param {FormatRangeParams} params
396
+ * @returns {any}
381
397
  */
382
- updateSettings(params) {
383
- const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
398
+ formatRange(params) {
399
+ const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
384
400
  if (ret[2]) {
385
401
  throw takeFromExternrefTable0(ret[1]);
386
402
  }
@@ -397,6 +413,17 @@ export class Workspace {
397
413
  }
398
414
  return takeFromExternrefTable0(ret[0]);
399
415
  }
416
+ /**
417
+ * @param {PullActionsParams} params
418
+ * @returns {PullActionsResult}
419
+ */
420
+ pullActions(params) {
421
+ const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
422
+ if (ret[2]) {
423
+ throw takeFromExternrefTable0(ret[1]);
424
+ }
425
+ return takeFromExternrefTable0(ret[0]);
426
+ }
400
427
  /**
401
428
  * @param {ScanProjectParams} params
402
429
  * @returns {ScanProjectResult}
@@ -409,25 +436,25 @@ export class Workspace {
409
436
  return takeFromExternrefTable0(ret[0]);
410
437
  }
411
438
  /**
412
- * @param {OpenFileParams} params
413
- * @returns {OpenFileResult}
439
+ * @param {SupportsFeatureParams} params
440
+ * @returns {FileFeaturesResult}
414
441
  */
415
- openFile(params) {
416
- const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
442
+ fileFeatures(params) {
443
+ const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
417
444
  if (ret[2]) {
418
445
  throw takeFromExternrefTable0(ret[1]);
419
446
  }
420
447
  return takeFromExternrefTable0(ret[0]);
421
448
  }
422
449
  /**
423
- * @param {GetFileContentParams} params
450
+ * @param {GetTypeInfoParams} params
424
451
  * @returns {string}
425
452
  */
426
- getFileContent(params) {
453
+ getTypeInfo(params) {
427
454
  let deferred2_0;
428
455
  let deferred2_1;
429
456
  try {
430
- const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
457
+ const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
431
458
  var ptr1 = ret[0];
432
459
  var len1 = ret[1];
433
460
  if (ret[3]) {
@@ -441,6 +468,17 @@ export class Workspace {
441
468
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
442
469
  }
443
470
  }
471
+ /**
472
+ * @param {FormatOnTypeParams} params
473
+ * @returns {any}
474
+ */
475
+ formatOnType(params) {
476
+ const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
477
+ if (ret[2]) {
478
+ throw takeFromExternrefTable0(ret[1]);
479
+ }
480
+ return takeFromExternrefTable0(ret[0]);
481
+ }
444
482
  /**
445
483
  * @param {GetSyntaxTreeParams} params
446
484
  * @returns {GetSyntaxTreeResult}
@@ -453,14 +491,36 @@ export class Workspace {
453
491
  return takeFromExternrefTable0(ret[0]);
454
492
  }
455
493
  /**
456
- * @param {GetControlFlowGraphParams} params
494
+ * @param {PathIsIgnoredParams} params
495
+ * @returns {boolean}
496
+ */
497
+ isPathIgnored(params) {
498
+ const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
499
+ if (ret[2]) {
500
+ throw takeFromExternrefTable0(ret[1]);
501
+ }
502
+ return ret[0] !== 0;
503
+ }
504
+ /**
505
+ * @param {UpdateSettingsParams} params
506
+ * @returns {UpdateSettingsResult}
507
+ */
508
+ updateSettings(params) {
509
+ const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
510
+ if (ret[2]) {
511
+ throw takeFromExternrefTable0(ret[1]);
512
+ }
513
+ return takeFromExternrefTable0(ret[0]);
514
+ }
515
+ /**
516
+ * @param {GetFileContentParams} params
457
517
  * @returns {string}
458
518
  */
459
- getControlFlowGraph(params) {
519
+ getFileContent(params) {
460
520
  let deferred2_0;
461
521
  let deferred2_1;
462
522
  try {
463
- const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
523
+ const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
464
524
  var ptr1 = ret[0];
465
525
  var len1 = ret[1];
466
526
  if (ret[3]) {
@@ -497,14 +557,36 @@ export class Workspace {
497
557
  }
498
558
  }
499
559
  /**
500
- * @param {GetTypeInfoParams} params
560
+ * @param {GetModuleGraphParams} params
561
+ * @returns {GetModuleGraphResult}
562
+ */
563
+ getModuleGraph(params) {
564
+ const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
565
+ if (ret[2]) {
566
+ throw takeFromExternrefTable0(ret[1]);
567
+ }
568
+ return takeFromExternrefTable0(ret[0]);
569
+ }
570
+ /**
571
+ * @param {PullDiagnosticsParams} params
572
+ * @returns {PullDiagnosticsResult}
573
+ */
574
+ pullDiagnostics(params) {
575
+ const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
576
+ if (ret[2]) {
577
+ throw takeFromExternrefTable0(ret[1]);
578
+ }
579
+ return takeFromExternrefTable0(ret[0]);
580
+ }
581
+ /**
582
+ * @param {GetSemanticModelParams} params
501
583
  * @returns {string}
502
584
  */
503
- getTypeInfo(params) {
585
+ getSemanticModel(params) {
504
586
  let deferred2_0;
505
587
  let deferred2_1;
506
588
  try {
507
- const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
589
+ const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
508
590
  var ptr1 = ret[0];
509
591
  var len1 = ret[1];
510
592
  if (ret[3]) {
@@ -518,6 +600,24 @@ export class Workspace {
518
600
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
519
601
  }
520
602
  }
603
+ /**
604
+ * @param {MemoryFileSystem} fs
605
+ * @returns {Workspace}
606
+ */
607
+ static withFileSystem(fs) {
608
+ _assertClass(fs, MemoryFileSystem);
609
+ const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
610
+ return Workspace.__wrap(ret);
611
+ }
612
+ /**
613
+ * @param {UpdateModuleGraphParams} params
614
+ */
615
+ updateModuleGraph(params) {
616
+ const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
617
+ if (ret[1]) {
618
+ throw takeFromExternrefTable0(ret[0]);
619
+ }
620
+ }
521
621
  /**
522
622
  * @param {GetRegisteredTypesParams} params
523
623
  * @returns {string}
@@ -541,14 +641,14 @@ export class Workspace {
541
641
  }
542
642
  }
543
643
  /**
544
- * @param {GetSemanticModelParams} params
644
+ * @param {GetControlFlowGraphParams} params
545
645
  * @returns {string}
546
646
  */
547
- getSemanticModel(params) {
647
+ getControlFlowGraph(params) {
548
648
  let deferred2_0;
549
649
  let deferred2_1;
550
650
  try {
551
- const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
651
+ const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
552
652
  var ptr1 = ret[0];
553
653
  var len1 = ret[1];
554
654
  if (ret[3]) {
@@ -562,118 +662,18 @@ export class Workspace {
562
662
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
563
663
  }
564
664
  }
565
- /**
566
- * @param {ChangeFileParams} params
567
- * @returns {ChangeFileResult}
568
- */
569
- changeFile(params) {
570
- const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
571
- if (ret[2]) {
572
- throw takeFromExternrefTable0(ret[1]);
573
- }
574
- return takeFromExternrefTable0(ret[0]);
575
- }
576
- /**
577
- * @param {CloseFileParams} params
578
- */
579
- closeFile(params) {
580
- const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
581
- if (ret[1]) {
582
- throw takeFromExternrefTable0(ret[0]);
583
- }
584
- }
585
- /**
586
- * @param {FileExitsParams} params
587
- * @returns {boolean}
588
- */
589
- fileExists(params) {
590
- const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
591
- if (ret[2]) {
592
- throw takeFromExternrefTable0(ret[1]);
593
- }
594
- return ret[0] !== 0;
595
- }
596
- /**
597
- * @param {PathIsIgnoredParams} params
598
- * @returns {boolean}
599
- */
600
- isPathIgnored(params) {
601
- const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
602
- if (ret[2]) {
603
- throw takeFromExternrefTable0(ret[1]);
604
- }
605
- return ret[0] !== 0;
606
- }
607
- /**
608
- * @param {UpdateModuleGraphParams} params
609
- */
610
- updateModuleGraph(params) {
611
- const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
612
- if (ret[1]) {
613
- throw takeFromExternrefTable0(ret[0]);
614
- }
615
- }
616
- /**
617
- * @param {GetModuleGraphParams} params
618
- * @returns {GetModuleGraphResult}
619
- */
620
- getModuleGraph(params) {
621
- const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
622
- if (ret[2]) {
623
- throw takeFromExternrefTable0(ret[1]);
624
- }
625
- return takeFromExternrefTable0(ret[0]);
626
- }
627
- /**
628
- * @param {PullDiagnosticsParams} params
629
- * @returns {PullDiagnosticsResult}
630
- */
631
- pullDiagnostics(params) {
632
- const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
633
- if (ret[2]) {
634
- throw takeFromExternrefTable0(ret[1]);
635
- }
636
- return takeFromExternrefTable0(ret[0]);
637
- }
638
- /**
639
- * @param {PullActionsParams} params
640
- * @returns {PullActionsResult}
641
- */
642
- pullActions(params) {
643
- const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
644
- if (ret[2]) {
645
- throw takeFromExternrefTable0(ret[1]);
646
- }
647
- return takeFromExternrefTable0(ret[0]);
648
- }
649
- /**
650
- * @param {FormatFileParams} params
651
- * @returns {any}
652
- */
653
- formatFile(params) {
654
- const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
655
- if (ret[2]) {
656
- throw takeFromExternrefTable0(ret[1]);
657
- }
658
- return takeFromExternrefTable0(ret[0]);
659
- }
660
- /**
661
- * @param {FormatRangeParams} params
662
- * @returns {any}
663
- */
664
- formatRange(params) {
665
- const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
666
- if (ret[2]) {
667
- throw takeFromExternrefTable0(ret[1]);
668
- }
669
- return takeFromExternrefTable0(ret[0]);
665
+ constructor() {
666
+ const ret = wasm.workspace_new();
667
+ this.__wbg_ptr = ret >>> 0;
668
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
669
+ return this;
670
670
  }
671
671
  /**
672
- * @param {FormatOnTypeParams} params
673
- * @returns {any}
672
+ * @param {RenameParams} params
673
+ * @returns {RenameResult}
674
674
  */
675
- formatOnType(params) {
676
- const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
675
+ rename(params) {
676
+ const ret = wasm.workspace_rename(this.__wbg_ptr, params);
677
677
  if (ret[2]) {
678
678
  throw takeFromExternrefTable0(ret[1]);
679
679
  }
@@ -691,11 +691,11 @@ export class Workspace {
691
691
  return takeFromExternrefTable0(ret[0]);
692
692
  }
693
693
  /**
694
- * @param {RenameParams} params
695
- * @returns {RenameResult}
694
+ * @param {OpenFileParams} params
695
+ * @returns {OpenFileResult}
696
696
  */
697
- rename(params) {
698
- const ret = wasm.workspace_rename(this.__wbg_ptr, params);
697
+ openFile(params) {
698
+ const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
699
699
  if (ret[2]) {
700
700
  throw takeFromExternrefTable0(ret[1]);
701
701
  }
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",