@biomejs/wasm-nodejs 1.8.2 → 1.8.4-nightly.a579bf7
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 +122 -9
- package/biome_wasm.js +28 -28
- package/biome_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/biome_wasm.d.ts
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export function main(): void;
|
|
6
6
|
interface SupportsFeatureParams {
|
|
7
|
-
features: FeatureName
|
|
7
|
+
features: FeatureName;
|
|
8
8
|
path: BiomePath;
|
|
9
9
|
}
|
|
10
|
-
type FeatureName =
|
|
10
|
+
type FeatureName = FeatureKind[];
|
|
11
11
|
interface BiomePath {
|
|
12
12
|
path: string;
|
|
13
13
|
}
|
|
14
|
+
type FeatureKind = "Format" | "Lint" | "OrganizeImports" | "Search" | "Assists";
|
|
14
15
|
interface SupportsFeatureResult {
|
|
15
16
|
reason?: SupportKind;
|
|
16
17
|
}
|
|
@@ -47,6 +48,10 @@ interface PartialConfiguration {
|
|
|
47
48
|
* The configuration of the formatter
|
|
48
49
|
*/
|
|
49
50
|
formatter?: PartialFormatterConfiguration;
|
|
51
|
+
/**
|
|
52
|
+
* Specific configuration for the GraphQL language
|
|
53
|
+
*/
|
|
54
|
+
graphql?: PartialGraphqlConfiguration;
|
|
50
55
|
/**
|
|
51
56
|
* Specific configuration for the JavaScript language
|
|
52
57
|
*/
|
|
@@ -110,6 +115,10 @@ interface PartialFormatterConfiguration {
|
|
|
110
115
|
* The attribute position style in HTMLish languages. By default auto.
|
|
111
116
|
*/
|
|
112
117
|
attributePosition?: AttributePosition;
|
|
118
|
+
/**
|
|
119
|
+
* Whether to insert spaces around brackets in object literals. Defaults to true.
|
|
120
|
+
*/
|
|
121
|
+
bracketSpacing?: BracketSpacing;
|
|
113
122
|
enabled?: boolean;
|
|
114
123
|
/**
|
|
115
124
|
* Stores whether formatting should be allowed to proceed if a given file has syntax errors
|
|
@@ -143,6 +152,17 @@ interface PartialFormatterConfiguration {
|
|
|
143
152
|
* What's the max width of a line. Defaults to 80.
|
|
144
153
|
*/
|
|
145
154
|
lineWidth?: LineWidth;
|
|
155
|
+
/**
|
|
156
|
+
* Use any `.editorconfig` files to configure the formatter. Configuration in `biome.json` will override `.editorconfig` configuration. Default: false.
|
|
157
|
+
*/
|
|
158
|
+
useEditorconfig?: boolean;
|
|
159
|
+
}
|
|
160
|
+
interface PartialGraphqlConfiguration {
|
|
161
|
+
/**
|
|
162
|
+
* GraphQL formatter options
|
|
163
|
+
*/
|
|
164
|
+
formatter?: PartialGraphqlFormatter;
|
|
165
|
+
linter?: PartialGraphqlLinter;
|
|
146
166
|
}
|
|
147
167
|
interface PartialJavascriptConfiguration {
|
|
148
168
|
/**
|
|
@@ -283,10 +303,47 @@ interface PartialCssParser {
|
|
|
283
303
|
cssModules?: boolean;
|
|
284
304
|
}
|
|
285
305
|
type AttributePosition = "auto" | "multiline";
|
|
306
|
+
type BracketSpacing = boolean;
|
|
286
307
|
type IndentWidth = number;
|
|
287
308
|
type PlainIndentStyle = "tab" | "space";
|
|
288
309
|
type LineEnding = "lf" | "crlf" | "cr";
|
|
289
310
|
type LineWidth = number;
|
|
311
|
+
interface PartialGraphqlFormatter {
|
|
312
|
+
/**
|
|
313
|
+
* Whether to insert spaces around brackets in object literals. Defaults to true.
|
|
314
|
+
*/
|
|
315
|
+
bracketSpacing?: BracketSpacing;
|
|
316
|
+
/**
|
|
317
|
+
* Control the formatter for GraphQL files.
|
|
318
|
+
*/
|
|
319
|
+
enabled?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* The indent style applied to GraphQL files.
|
|
322
|
+
*/
|
|
323
|
+
indentStyle?: PlainIndentStyle;
|
|
324
|
+
/**
|
|
325
|
+
* The size of the indentation applied to GraphQL files. Default to 2.
|
|
326
|
+
*/
|
|
327
|
+
indentWidth?: IndentWidth;
|
|
328
|
+
/**
|
|
329
|
+
* The type of line ending applied to GraphQL files.
|
|
330
|
+
*/
|
|
331
|
+
lineEnding?: LineEnding;
|
|
332
|
+
/**
|
|
333
|
+
* What's the max width of a line applied to GraphQL files. Defaults to 80.
|
|
334
|
+
*/
|
|
335
|
+
lineWidth?: LineWidth;
|
|
336
|
+
/**
|
|
337
|
+
* The type of quotes used in GraphQL code. Defaults to double.
|
|
338
|
+
*/
|
|
339
|
+
quoteStyle?: QuoteStyle;
|
|
340
|
+
}
|
|
341
|
+
interface PartialGraphqlLinter {
|
|
342
|
+
/**
|
|
343
|
+
* Control the formatter for GraphQL files.
|
|
344
|
+
*/
|
|
345
|
+
enabled?: boolean;
|
|
346
|
+
}
|
|
290
347
|
interface PartialJavascriptFormatter {
|
|
291
348
|
/**
|
|
292
349
|
* Whether to add non-necessary parentheses to arrow functions. Defaults to "always".
|
|
@@ -303,7 +360,7 @@ interface PartialJavascriptFormatter {
|
|
|
303
360
|
/**
|
|
304
361
|
* Whether to insert spaces around brackets in object literals. Defaults to true.
|
|
305
362
|
*/
|
|
306
|
-
bracketSpacing?:
|
|
363
|
+
bracketSpacing?: BracketSpacing;
|
|
307
364
|
/**
|
|
308
365
|
* Control the formatter for JavaScript (and its super languages) files.
|
|
309
366
|
*/
|
|
@@ -442,6 +499,10 @@ interface OverridePattern {
|
|
|
442
499
|
* Specific configuration for the Json language
|
|
443
500
|
*/
|
|
444
501
|
formatter?: OverrideFormatterConfiguration;
|
|
502
|
+
/**
|
|
503
|
+
* Specific configuration for the Graphql language
|
|
504
|
+
*/
|
|
505
|
+
graphql?: PartialGraphqlConfiguration;
|
|
445
506
|
/**
|
|
446
507
|
* A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.
|
|
447
508
|
*/
|
|
@@ -937,6 +998,14 @@ interface Nursery {
|
|
|
937
998
|
* Disallow duplicate selectors within keyframe blocks.
|
|
938
999
|
*/
|
|
939
1000
|
noDuplicateSelectorsKeyframeBlock?: RuleConfiguration_for_Null;
|
|
1001
|
+
/**
|
|
1002
|
+
* No duplicated fields in GraphQL operations.
|
|
1003
|
+
*/
|
|
1004
|
+
noDuplicatedFields?: RuleConfiguration_for_Null;
|
|
1005
|
+
/**
|
|
1006
|
+
* Disallow accessing namespace imports dynamically.
|
|
1007
|
+
*/
|
|
1008
|
+
noDynamicNamespaceImportAccess?: RuleConfiguration_for_Null;
|
|
940
1009
|
/**
|
|
941
1010
|
* Disallow CSS empty blocks.
|
|
942
1011
|
*/
|
|
@@ -945,6 +1014,10 @@ interface Nursery {
|
|
|
945
1014
|
* Disallow variables from evolving into any type through reassignments.
|
|
946
1015
|
*/
|
|
947
1016
|
noEvolvingTypes?: RuleConfiguration_for_Null;
|
|
1017
|
+
/**
|
|
1018
|
+
* Disallow exporting an imported variable.
|
|
1019
|
+
*/
|
|
1020
|
+
noExportedImports?: RuleConfiguration_for_Null;
|
|
948
1021
|
/**
|
|
949
1022
|
* Disallow invalid !important within keyframe declarations
|
|
950
1023
|
*/
|
|
@@ -1053,6 +1126,10 @@ interface Nursery {
|
|
|
1053
1126
|
* Require the default clause in switch statements.
|
|
1054
1127
|
*/
|
|
1055
1128
|
useDefaultSwitchClause?: RuleConfiguration_for_Null;
|
|
1129
|
+
/**
|
|
1130
|
+
* Require specifying the reason argument when using @deprecated directive
|
|
1131
|
+
*/
|
|
1132
|
+
useDeprecatedReason?: RuleConfiguration_for_Null;
|
|
1056
1133
|
/**
|
|
1057
1134
|
* Enforce passing a message value when creating a built-in error.
|
|
1058
1135
|
*/
|
|
@@ -1072,7 +1149,7 @@ interface Nursery {
|
|
|
1072
1149
|
/**
|
|
1073
1150
|
* Enforce file extensions for relative imports.
|
|
1074
1151
|
*/
|
|
1075
|
-
useImportExtensions?:
|
|
1152
|
+
useImportExtensions?: RuleFixConfiguration_for_UseImportExtensionsOptions;
|
|
1076
1153
|
/**
|
|
1077
1154
|
* Disallows package private imports.
|
|
1078
1155
|
*/
|
|
@@ -1571,6 +1648,10 @@ interface OverrideFormatterConfiguration {
|
|
|
1571
1648
|
* The attribute position style.
|
|
1572
1649
|
*/
|
|
1573
1650
|
attributePosition?: AttributePosition;
|
|
1651
|
+
/**
|
|
1652
|
+
* Whether to insert spaces around brackets in object literals. Defaults to true.
|
|
1653
|
+
*/
|
|
1654
|
+
bracketSpacing?: BracketSpacing;
|
|
1574
1655
|
enabled?: boolean;
|
|
1575
1656
|
/**
|
|
1576
1657
|
* Stores whether formatting should be allowed to proceed if a given file has syntax errors
|
|
@@ -1637,6 +1718,9 @@ type RuleConfiguration_for_NoLabelWithoutControlOptions =
|
|
|
1637
1718
|
type RuleConfiguration_for_RestrictedImportsOptions =
|
|
1638
1719
|
| RulePlainConfiguration
|
|
1639
1720
|
| RuleWithOptions_for_RestrictedImportsOptions;
|
|
1721
|
+
type RuleFixConfiguration_for_UseImportExtensionsOptions =
|
|
1722
|
+
| RulePlainConfiguration
|
|
1723
|
+
| RuleWithFixOptions_for_UseImportExtensionsOptions;
|
|
1640
1724
|
type RuleFixConfiguration_for_UtilityClassSortingOptions =
|
|
1641
1725
|
| RulePlainConfiguration
|
|
1642
1726
|
| RuleWithFixOptions_for_UtilityClassSortingOptions;
|
|
@@ -1744,6 +1828,20 @@ interface RuleWithOptions_for_RestrictedImportsOptions {
|
|
|
1744
1828
|
*/
|
|
1745
1829
|
options: RestrictedImportsOptions;
|
|
1746
1830
|
}
|
|
1831
|
+
interface RuleWithFixOptions_for_UseImportExtensionsOptions {
|
|
1832
|
+
/**
|
|
1833
|
+
* The kind of the code actions emitted by the rule
|
|
1834
|
+
*/
|
|
1835
|
+
fix?: FixKind;
|
|
1836
|
+
/**
|
|
1837
|
+
* The severity of the emitted diagnostics by the rule
|
|
1838
|
+
*/
|
|
1839
|
+
level: RulePlainConfiguration;
|
|
1840
|
+
/**
|
|
1841
|
+
* Rule's options
|
|
1842
|
+
*/
|
|
1843
|
+
options: UseImportExtensionsOptions;
|
|
1844
|
+
}
|
|
1747
1845
|
interface RuleWithFixOptions_for_UtilityClassSortingOptions {
|
|
1748
1846
|
/**
|
|
1749
1847
|
* The kind of the code actions emitted by the rule
|
|
@@ -1854,6 +1952,12 @@ interface RestrictedImportsOptions {
|
|
|
1854
1952
|
*/
|
|
1855
1953
|
paths: {};
|
|
1856
1954
|
}
|
|
1955
|
+
interface UseImportExtensionsOptions {
|
|
1956
|
+
/**
|
|
1957
|
+
* A map of custom import extension mappings, where the key is the inspected file extension, and the value is a pair of `module` extension and `component` import extension
|
|
1958
|
+
*/
|
|
1959
|
+
suggestedExtensions: {};
|
|
1960
|
+
}
|
|
1857
1961
|
interface UtilityClassSortingOptions {
|
|
1858
1962
|
/**
|
|
1859
1963
|
* Additional attributes that will be sorted.
|
|
@@ -2047,7 +2151,8 @@ type DocumentFileSource =
|
|
|
2047
2151
|
| "Unknown"
|
|
2048
2152
|
| { Js: JsFileSource }
|
|
2049
2153
|
| { Json: JsonFileSource }
|
|
2050
|
-
| { Css: CssFileSource }
|
|
2154
|
+
| { Css: CssFileSource }
|
|
2155
|
+
| { Graphql: GraphqlFileSource };
|
|
2051
2156
|
interface JsFileSource {
|
|
2052
2157
|
/**
|
|
2053
2158
|
* Used to mark if the source is being used for an Astro, Svelte or Vue file
|
|
@@ -2065,12 +2170,16 @@ interface JsonFileSource {
|
|
|
2065
2170
|
interface CssFileSource {
|
|
2066
2171
|
variant: CssVariant;
|
|
2067
2172
|
}
|
|
2173
|
+
interface GraphqlFileSource {
|
|
2174
|
+
variant: GraphqlVariant;
|
|
2175
|
+
}
|
|
2068
2176
|
type EmbeddingKind = "Astro" | "Vue" | "Svelte" | "None";
|
|
2069
2177
|
type Language = "JavaScript" | { TypeScript: { definition_file: boolean } };
|
|
2070
2178
|
type ModuleKind = "Script" | "Module";
|
|
2071
2179
|
type LanguageVariant = "Standard" | "StandardRestricted" | "Jsx";
|
|
2072
2180
|
type LanguageVersion = "ES2022" | "ESNext";
|
|
2073
2181
|
type CssVariant = "Standard";
|
|
2182
|
+
type GraphqlVariant = "Standard";
|
|
2074
2183
|
interface ChangeFileParams {
|
|
2075
2184
|
content: string;
|
|
2076
2185
|
path: BiomePath;
|
|
@@ -2242,8 +2351,11 @@ type Category =
|
|
|
2242
2351
|
| "lint/nursery/noDuplicateFontNames"
|
|
2243
2352
|
| "lint/nursery/noDuplicateJsonKeys"
|
|
2244
2353
|
| "lint/nursery/noDuplicateSelectorsKeyframeBlock"
|
|
2354
|
+
| "lint/nursery/noDuplicatedFields"
|
|
2355
|
+
| "lint/nursery/noDynamicNamespaceImportAccess"
|
|
2245
2356
|
| "lint/nursery/noEmptyBlock"
|
|
2246
2357
|
| "lint/nursery/noEvolvingTypes"
|
|
2358
|
+
| "lint/nursery/noExportedImports"
|
|
2247
2359
|
| "lint/nursery/noImportantInKeyframe"
|
|
2248
2360
|
| "lint/nursery/noInvalidDirectionInLinearGradient"
|
|
2249
2361
|
| "lint/nursery/noInvalidPositionAtImportRule"
|
|
@@ -2254,7 +2366,6 @@ type Category =
|
|
|
2254
2366
|
| "lint/nursery/noRestrictedImports"
|
|
2255
2367
|
| "lint/nursery/noShorthandPropertyOverrides"
|
|
2256
2368
|
| "lint/nursery/noSubstr"
|
|
2257
|
-
| "lint/nursery/noTypeOnlyImportAttributes"
|
|
2258
2369
|
| "lint/nursery/noUndeclaredDependencies"
|
|
2259
2370
|
| "lint/nursery/noUnknownFunction"
|
|
2260
2371
|
| "lint/nursery/noUnknownMediaFeatureName"
|
|
@@ -2273,6 +2384,7 @@ type Category =
|
|
|
2273
2384
|
| "lint/nursery/useConsistentGridAreas"
|
|
2274
2385
|
| "lint/nursery/useDateNow"
|
|
2275
2386
|
| "lint/nursery/useDefaultSwitchClause"
|
|
2387
|
+
| "lint/nursery/useDeprecatedReason"
|
|
2276
2388
|
| "lint/nursery/useErrorMessage"
|
|
2277
2389
|
| "lint/nursery/useExplicitLengthCheck"
|
|
2278
2390
|
| "lint/nursery/useFocusableInteractive"
|
|
@@ -2392,6 +2504,10 @@ type Category =
|
|
|
2392
2504
|
| "lint/suspicious/useNamespaceKeyword"
|
|
2393
2505
|
| "lint/suspicious/useValidTypeof"
|
|
2394
2506
|
| "assists/nursery/useSortedKeys"
|
|
2507
|
+
| "syntax/nursery/noTypeOnlyImportAttributes"
|
|
2508
|
+
| "syntax/correctness/noSuperWithoutExtends"
|
|
2509
|
+
| "syntax/correctness/noInitializerWithDefinite"
|
|
2510
|
+
| "syntax/correctness/noDuplicatePrivateClassMembers"
|
|
2395
2511
|
| "files/missingHandler"
|
|
2396
2512
|
| "format"
|
|
2397
2513
|
| "check"
|
|
@@ -2406,9 +2522,6 @@ type Category =
|
|
|
2406
2522
|
| "internalError/fs"
|
|
2407
2523
|
| "internalError/panic"
|
|
2408
2524
|
| "parse"
|
|
2409
|
-
| "parse/noSuperWithoutExtends"
|
|
2410
|
-
| "parse/noInitializerWithDefinite"
|
|
2411
|
-
| "parse/noDuplicatePrivateClassMembers"
|
|
2412
2525
|
| "lint"
|
|
2413
2526
|
| "lint/a11y"
|
|
2414
2527
|
| "lint/complexity"
|
package/biome_wasm.js
CHANGED
|
@@ -9,6 +9,20 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
+
let heap_next = heap.length;
|
|
13
|
+
|
|
14
|
+
function dropObject(idx) {
|
|
15
|
+
if (idx < 132) return;
|
|
16
|
+
heap[idx] = heap_next;
|
|
17
|
+
heap_next = idx;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function takeObject(idx) {
|
|
21
|
+
const ret = getObject(idx);
|
|
22
|
+
dropObject(idx);
|
|
23
|
+
return ret;
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
function isLikeNone(x) {
|
|
13
27
|
return x === undefined || x === null;
|
|
14
28
|
}
|
|
@@ -96,20 +110,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
96
110
|
return ptr;
|
|
97
111
|
}
|
|
98
112
|
|
|
99
|
-
let heap_next = heap.length;
|
|
100
|
-
|
|
101
|
-
function dropObject(idx) {
|
|
102
|
-
if (idx < 132) return;
|
|
103
|
-
heap[idx] = heap_next;
|
|
104
|
-
heap_next = idx;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function takeObject(idx) {
|
|
108
|
-
const ret = getObject(idx);
|
|
109
|
-
dropObject(idx);
|
|
110
|
-
return ret;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
113
|
function addHeapObject(obj) {
|
|
114
114
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
115
115
|
const idx = heap_next;
|
|
@@ -694,6 +694,20 @@ class Workspace {
|
|
|
694
694
|
}
|
|
695
695
|
module.exports.Workspace = Workspace;
|
|
696
696
|
|
|
697
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
698
|
+
const ret = getObject(arg0) === undefined;
|
|
699
|
+
return ret;
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
703
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
704
|
+
return ret;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
708
|
+
takeObject(arg0);
|
|
709
|
+
};
|
|
710
|
+
|
|
697
711
|
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
698
712
|
const v = getObject(arg0);
|
|
699
713
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -727,15 +741,6 @@ module.exports.__wbindgen_is_object = function(arg0) {
|
|
|
727
741
|
return ret;
|
|
728
742
|
};
|
|
729
743
|
|
|
730
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
731
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
732
|
-
return ret;
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
736
|
-
takeObject(arg0);
|
|
737
|
-
};
|
|
738
|
-
|
|
739
744
|
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
740
745
|
const ret = arg0;
|
|
741
746
|
return addHeapObject(ret);
|
|
@@ -761,11 +766,6 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
761
766
|
return ret;
|
|
762
767
|
};
|
|
763
768
|
|
|
764
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
765
|
-
const ret = getObject(arg0) === undefined;
|
|
766
|
-
return ret;
|
|
767
|
-
};
|
|
768
|
-
|
|
769
769
|
module.exports.__wbindgen_as_number = function(arg0) {
|
|
770
770
|
const ret = +getObject(arg0);
|
|
771
771
|
return ret;
|
package/biome_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED