@biomejs/wasm-bundler 2.3.2 → 2.3.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/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
  */
@@ -1513,6 +1513,10 @@ interface Correctness {
1513
1513
  useYield?: RuleConfiguration_for_UseYieldOptions;
1514
1514
  }
1515
1515
  interface Nursery {
1516
+ /**
1517
+ * Disallow continue statements.
1518
+ */
1519
+ noContinue?: RuleConfiguration_for_NoContinueOptions;
1516
1520
  /**
1517
1521
  * Restrict imports of deprecated exports.
1518
1522
  */
@@ -1549,6 +1553,10 @@ interface Nursery {
1549
1553
  * Prevent client components from being async functions.
1550
1554
  */
1551
1555
  noNextAsyncClientComponent?: RuleConfiguration_for_NoNextAsyncClientComponentOptions;
1556
+ /**
1557
+ * Disallow function parameters that are only used in recursive calls.
1558
+ */
1559
+ noParametersOnlyUsedInRecursion?: RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions;
1552
1560
  /**
1553
1561
  * Replaces usages of forwardRef with passing ref as a prop.
1554
1562
  */
@@ -1557,6 +1565,10 @@ interface Nursery {
1557
1565
  * Disallow variable declarations from shadowing variables declared in the outer scope.
1558
1566
  */
1559
1567
  noShadow?: RuleConfiguration_for_NoShadowOptions;
1568
+ /**
1569
+ * Disallow unknown DOM properties.
1570
+ */
1571
+ noUnknownAttribute?: RuleConfiguration_for_NoUnknownAttributeOptions;
1560
1572
  /**
1561
1573
  * Disallow unnecessary type-based conditions that can be statically determined as redundant.
1562
1574
  */
@@ -2887,6 +2899,9 @@ type RuleFixConfiguration_for_UseValidTypeofOptions =
2887
2899
  type RuleConfiguration_for_UseYieldOptions =
2888
2900
  | RulePlainConfiguration
2889
2901
  | RuleWithOptions_for_UseYieldOptions;
2902
+ type RuleConfiguration_for_NoContinueOptions =
2903
+ | RulePlainConfiguration
2904
+ | RuleWithOptions_for_NoContinueOptions;
2890
2905
  type RuleConfiguration_for_NoDeprecatedImportsOptions =
2891
2906
  | RulePlainConfiguration
2892
2907
  | RuleWithOptions_for_NoDeprecatedImportsOptions;
@@ -2914,12 +2929,18 @@ type RuleFixConfiguration_for_NoMisusedPromisesOptions =
2914
2929
  type RuleConfiguration_for_NoNextAsyncClientComponentOptions =
2915
2930
  | RulePlainConfiguration
2916
2931
  | RuleWithOptions_for_NoNextAsyncClientComponentOptions;
2932
+ type RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions =
2933
+ | RulePlainConfiguration
2934
+ | RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions;
2917
2935
  type RuleFixConfiguration_for_NoReactForwardRefOptions =
2918
2936
  | RulePlainConfiguration
2919
2937
  | RuleWithFixOptions_for_NoReactForwardRefOptions;
2920
2938
  type RuleConfiguration_for_NoShadowOptions =
2921
2939
  | RulePlainConfiguration
2922
2940
  | RuleWithOptions_for_NoShadowOptions;
2941
+ type RuleConfiguration_for_NoUnknownAttributeOptions =
2942
+ | RulePlainConfiguration
2943
+ | RuleWithOptions_for_NoUnknownAttributeOptions;
2923
2944
  type RuleConfiguration_for_NoUnnecessaryConditionsOptions =
2924
2945
  | RulePlainConfiguration
2925
2946
  | RuleWithOptions_for_NoUnnecessaryConditionsOptions;
@@ -5304,6 +5325,16 @@ interface RuleWithOptions_for_UseYieldOptions {
5304
5325
  */
5305
5326
  options: UseYieldOptions;
5306
5327
  }
5328
+ interface RuleWithOptions_for_NoContinueOptions {
5329
+ /**
5330
+ * The severity of the emitted diagnostics by the rule
5331
+ */
5332
+ level: RulePlainConfiguration;
5333
+ /**
5334
+ * Rule's options
5335
+ */
5336
+ options: NoContinueOptions;
5337
+ }
5307
5338
  interface RuleWithOptions_for_NoDeprecatedImportsOptions {
5308
5339
  /**
5309
5340
  * The severity of the emitted diagnostics by the rule
@@ -5402,6 +5433,20 @@ interface RuleWithOptions_for_NoNextAsyncClientComponentOptions {
5402
5433
  */
5403
5434
  options: NoNextAsyncClientComponentOptions;
5404
5435
  }
5436
+ interface RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions {
5437
+ /**
5438
+ * The kind of the code actions emitted by the rule
5439
+ */
5440
+ fix?: FixKind;
5441
+ /**
5442
+ * The severity of the emitted diagnostics by the rule
5443
+ */
5444
+ level: RulePlainConfiguration;
5445
+ /**
5446
+ * Rule's options
5447
+ */
5448
+ options: NoParametersOnlyUsedInRecursionOptions;
5449
+ }
5405
5450
  interface RuleWithFixOptions_for_NoReactForwardRefOptions {
5406
5451
  /**
5407
5452
  * The kind of the code actions emitted by the rule
@@ -5426,6 +5471,16 @@ interface RuleWithOptions_for_NoShadowOptions {
5426
5471
  */
5427
5472
  options: NoShadowOptions;
5428
5473
  }
5474
+ interface RuleWithOptions_for_NoUnknownAttributeOptions {
5475
+ /**
5476
+ * The severity of the emitted diagnostics by the rule
5477
+ */
5478
+ level: RulePlainConfiguration;
5479
+ /**
5480
+ * Rule's options
5481
+ */
5482
+ options: NoUnknownAttributeOptions;
5483
+ }
5429
5484
  interface RuleWithOptions_for_NoUnnecessaryConditionsOptions {
5430
5485
  /**
5431
5486
  * The severity of the emitted diagnostics by the rule
@@ -7984,7 +8039,7 @@ interface NoRestrictedElementsOptions {
7984
8039
  /**
7985
8040
  * Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.
7986
8041
  */
7987
- elements: CustomRestrictedElements;
8042
+ elements?: CustomRestrictedElements;
7988
8043
  }
7989
8044
  interface NoSelfAssignOptions {}
7990
8045
  interface NoSetterReturnOptions {}
@@ -8083,6 +8138,7 @@ interface UseUniqueElementIdsOptions {
8083
8138
  interface UseValidForDirectionOptions {}
8084
8139
  interface UseValidTypeofOptions {}
8085
8140
  interface UseYieldOptions {}
8141
+ interface NoContinueOptions {}
8086
8142
  interface NoDeprecatedImportsOptions {}
8087
8143
  interface NoDuplicateDependenciesOptions {}
8088
8144
  interface NoEmptySourceOptions {
@@ -8120,8 +8176,12 @@ interface NoJsxLiteralsOptions {
8120
8176
  }
8121
8177
  interface NoMisusedPromisesOptions {}
8122
8178
  interface NoNextAsyncClientComponentOptions {}
8179
+ interface NoParametersOnlyUsedInRecursionOptions {}
8123
8180
  interface NoReactForwardRefOptions {}
8124
8181
  interface NoShadowOptions {}
8182
+ interface NoUnknownAttributeOptions {
8183
+ ignore?: string[];
8184
+ }
8125
8185
  interface NoUnnecessaryConditionsOptions {}
8126
8186
  interface NoUnresolvedImportsOptions {}
8127
8187
  interface NoUnusedExpressionsOptions {}
@@ -8235,13 +8295,13 @@ interface NoRestrictedGlobalsOptions {
8235
8295
  /**
8236
8296
  * A list of names that should trigger the rule
8237
8297
  */
8238
- deniedGlobals: Record<string, string>;
8298
+ deniedGlobals?: Record<string, string>;
8239
8299
  }
8240
8300
  interface NoRestrictedImportsOptions {
8241
8301
  /**
8242
8302
  * A list of import paths that should trigger the rule.
8243
8303
  */
8244
- paths: Record<string, Paths>;
8304
+ paths?: Record<string, Paths>;
8245
8305
  /**
8246
8306
  * gitignore-style patterns that should trigger the rule.
8247
8307
  */
@@ -8270,7 +8330,7 @@ interface UseComponentExportOnlyModulesOptions {
8270
8330
  /**
8271
8331
  * A list of names that can be additionally exported from the module This option is for exports that do not hinder [React Fast Refresh](https://github.com/facebook/react/tree/main/packages/react-refresh), such as [`meta` in Remix](https://remix.run/docs/en/main/route/meta)
8272
8332
  */
8273
- allowExportNames: string[];
8333
+ allowExportNames?: string[];
8274
8334
  }
8275
8335
  interface UseConsistentArrayTypeOptions {
8276
8336
  syntax?: ConsistentArrayType;
@@ -8305,7 +8365,7 @@ interface UseFilenamingConventionOptions {
8305
8365
  /**
8306
8366
  * Allowed cases for file names.
8307
8367
  */
8308
- filenameCases: FilenameCases;
8368
+ filenameCases?: FilenameCases;
8309
8369
  /**
8310
8370
  * Regular expression to enforce
8311
8371
  */
@@ -8313,11 +8373,11 @@ interface UseFilenamingConventionOptions {
8313
8373
  /**
8314
8374
  * If `false`, then non-ASCII characters are allowed.
8315
8375
  */
8316
- requireAscii: boolean;
8376
+ requireAscii?: boolean;
8317
8377
  /**
8318
8378
  * If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
8319
8379
  */
8320
- strictCase: boolean;
8380
+ strictCase?: boolean;
8321
8381
  }
8322
8382
  interface UseForOfOptions {}
8323
8383
  interface UseFragmentSyntaxOptions {}
@@ -8334,15 +8394,15 @@ interface UseNamingConventionOptions {
8334
8394
  /**
8335
8395
  * Custom conventions.
8336
8396
  */
8337
- conventions: Convention[];
8397
+ conventions?: Convention[];
8338
8398
  /**
8339
8399
  * If `false`, then non-ASCII characters are allowed.
8340
8400
  */
8341
- requireAscii: boolean;
8401
+ requireAscii?: boolean;
8342
8402
  /**
8343
8403
  * If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
8344
8404
  */
8345
- strictCase: boolean;
8405
+ strictCase?: boolean;
8346
8406
  }
8347
8407
  interface UseNodeAssertStrictOptions {}
8348
8408
  interface UseNodejsImportProtocolOptions {}
@@ -8354,7 +8414,7 @@ interface UseReadonlyClassPropertiesOptions {
8354
8414
  /**
8355
8415
  * When `true`, the keywords `public`, `protected`, and `private` are analyzed by the rule.
8356
8416
  */
8357
- checkAllProperties: boolean;
8417
+ checkAllProperties?: boolean;
8358
8418
  }
8359
8419
  interface UseSelfClosingElementsOptions {
8360
8420
  ignoreHtmlElements?: boolean;
@@ -8378,7 +8438,7 @@ interface NoBitwiseOperatorsOptions {
8378
8438
  /**
8379
8439
  * Allows a list of bitwise operators to be used as exceptions.
8380
8440
  */
8381
- allow: string[];
8441
+ allow?: string[];
8382
8442
  }
8383
8443
  interface NoCatchAssignOptions {}
8384
8444
  interface NoClassAssignOptions {}
@@ -8388,14 +8448,14 @@ interface NoConfusingLabelsOptions {
8388
8448
  /**
8389
8449
  * A list of (non-confusing) labels that should be allowed
8390
8450
  */
8391
- allowedLabels: string[];
8451
+ allowedLabels?: string[];
8392
8452
  }
8393
8453
  interface NoConfusingVoidTypeOptions {}
8394
8454
  interface NoConsoleOptions {
8395
8455
  /**
8396
8456
  * Allowed calls on the console object.
8397
8457
  */
8398
- allow: string[];
8458
+ allow?: string[];
8399
8459
  }
8400
8460
  interface NoConstEnumOptions {}
8401
8461
  interface NoConstantBinaryExpressionsOptions {}
@@ -8409,7 +8469,7 @@ interface NoDoubleEqualsOptions {
8409
8469
 
8410
8470
  If `false`, no such exception will be made.
8411
8471
  */
8412
- ignoreNull: boolean;
8472
+ ignoreNull?: boolean;
8413
8473
  }
8414
8474
  interface NoDuplicateAtImportRulesOptions {}
8415
8475
  interface NoDuplicateCaseOptions {}
@@ -8850,6 +8910,7 @@ type Category =
8850
8910
  | "lint/correctness/useValidTypeof"
8851
8911
  | "lint/correctness/useYield"
8852
8912
  | "lint/nursery/noColorInvalidHex"
8913
+ | "lint/nursery/noContinue"
8853
8914
  | "lint/nursery/noDeprecatedImports"
8854
8915
  | "lint/nursery/noDuplicateDependencies"
8855
8916
  | "lint/nursery/noEmptySource"
@@ -8861,8 +8922,10 @@ type Category =
8861
8922
  | "lint/nursery/noMissingGenericFamilyKeyword"
8862
8923
  | "lint/nursery/noMisusedPromises"
8863
8924
  | "lint/nursery/noNextAsyncClientComponent"
8925
+ | "lint/nursery/noParametersOnlyUsedInRecursion"
8864
8926
  | "lint/nursery/noReactForwardRef"
8865
8927
  | "lint/nursery/noShadow"
8928
+ | "lint/nursery/noUnknownAttribute"
8866
8929
  | "lint/nursery/noUnnecessaryConditions"
8867
8930
  | "lint/nursery/noUnresolvedImports"
8868
8931
  | "lint/nursery/noUnusedExpressions"
@@ -9621,9 +9684,9 @@ interface DropPatternParams {
9621
9684
  export class DiagnosticPrinter {
9622
9685
  free(): void;
9623
9686
  [Symbol.dispose](): void;
9624
- constructor(file_name: string, file_source: string);
9625
9687
  print_simple(diagnostic: Diagnostic): void;
9626
9688
  print_verbose(diagnostic: Diagnostic): void;
9689
+ constructor(file_name: string, file_source: string);
9627
9690
  finish(): string;
9628
9691
  }
9629
9692
  export class MemoryFileSystem {
@@ -9636,31 +9699,31 @@ export class MemoryFileSystem {
9636
9699
  export class Workspace {
9637
9700
  free(): void;
9638
9701
  [Symbol.dispose](): void;
9639
- constructor();
9640
- static withFileSystem(fs: MemoryFileSystem): Workspace;
9641
- fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9642
- updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9702
+ closeFile(params: CloseFileParams): void;
9703
+ changeFile(params: ChangeFileParams): ChangeFileResult;
9704
+ fileExists(params: FileExitsParams): boolean;
9705
+ formatFile(params: FormatFileParams): any;
9706
+ formatRange(params: FormatRangeParams): any;
9643
9707
  openProject(params: OpenProjectParams): OpenProjectResult;
9708
+ pullActions(params: PullActionsParams): PullActionsResult;
9644
9709
  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;
9710
+ fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9650
9711
  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;
9712
+ formatOnType(params: FormatOnTypeParams): any;
9713
+ getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9656
9714
  isPathIgnored(params: PathIsIgnoredParams): boolean;
9657
- updateModuleGraph(params: UpdateModuleGraphParams): void;
9715
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9716
+ getFileContent(params: GetFileContentParams): string;
9717
+ getFormatterIr(params: GetFormatterIRParams): string;
9658
9718
  getModuleGraph(params: GetModuleGraphParams): GetModuleGraphResult;
9659
9719
  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;
9720
+ getSemanticModel(params: GetSemanticModelParams): string;
9721
+ static withFileSystem(fs: MemoryFileSystem): Workspace;
9722
+ updateModuleGraph(params: UpdateModuleGraphParams): void;
9723
+ getRegisteredTypes(params: GetRegisteredTypesParams): string;
9724
+ getControlFlowGraph(params: GetControlFlowGraphParams): string;
9725
+ constructor();
9665
9726
  rename(params: RenameParams): RenameResult;
9727
+ fixFile(params: FixFileParams): FixFileResult;
9728
+ openFile(params: OpenFileParams): OpenFileResult;
9666
9729
  }
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.2",
8
+ "version": "2.3.4",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",