@biomejs/backend-jsonrpc 0.2.3 → 1.1.0

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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/backend-jsonrpc","version":"0.2.3","main":"dist/index.js","scripts":{"test":"vitest","test:ci":"pnpm build && vitest --run","tsc":"tsc --noEmit","build":"tsc"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"npm/backend-jsonrpc"},"author":"Biome Developers and Contributors","bugs":"https://github.com/biomejs/biome/issues","description":"Bindings to the JSON-RPC Workspace API of the Biome daemon","keywords":["JavaScript","TypeScript","format","lint","toolchain"],"engines":{"node":">=14.*"},"license":"MIT","devDependencies":{"@types/node":"^18.7.2","typescript":"^4.8.2","vite":"^3.0.8","vitest":"^0.22.0"},"optionalDependencies":{"@biomejs/cli-win32-x64":"0.2.3","@biomejs/cli-win32-arm64":"0.2.3","@biomejs/cli-darwin-x64":"0.2.3","@biomejs/cli-darwin-arm64":"0.2.3","@biomejs/cli-linux-x64":"0.2.3","@biomejs/cli-linux-arm64":"0.2.3"}}
1
+ {"name":"@biomejs/backend-jsonrpc","version":"1.1.0","main":"dist/index.js","scripts":{"test":"vitest","test:ci":"pnpm build && vitest --run","tsc":"tsc --noEmit","build":"tsc"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"npm/backend-jsonrpc"},"author":"Biome Developers and Contributors","bugs":"https://github.com/biomejs/biome/issues","description":"Bindings to the JSON-RPC Workspace API of the Biome daemon","keywords":["JavaScript","TypeScript","format","lint","toolchain"],"engines":{"node":">=14.*"},"license":"MIT","devDependencies":{"@types/node":"^18.7.2","typescript":"^4.8.2","vite":"^3.0.8","vitest":"^0.22.0"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.1.0","@biomejs/cli-win32-arm64":"1.1.0","@biomejs/cli-darwin-x64":"1.1.0","@biomejs/cli-darwin-arm64":"1.1.0","@biomejs/cli-linux-x64":"1.1.0","@biomejs/cli-linux-arm64":"1.1.0"}}
package/src/command.ts CHANGED
@@ -14,16 +14,16 @@ export function getCommand(): string | null {
14
14
 
15
15
  const PLATFORMS: PlatformPaths = {
16
16
  win32: {
17
- x64: "@rometools/cli-win32-x64/rome.exe",
18
- arm64: "@rometools/cli-win32-arm64/rome.exe",
17
+ x64: "@biomejs/cli-win32-x64/rome.exe",
18
+ arm64: "@biomejs/cli-win32-arm64/rome.exe",
19
19
  },
20
20
  darwin: {
21
- x64: "@rometools/cli-darwin-x64/rome",
22
- arm64: "@rometools/cli-darwin-arm64/rome",
21
+ x64: "@biomejs/cli-darwin-x64/rome",
22
+ arm64: "@biomejs/cli-darwin-arm64/rome",
23
23
  },
24
24
  linux: {
25
- x64: "@rometools/cli-linux-x64/rome",
26
- arm64: "@rometools/cli-linux-arm64/rome",
25
+ x64: "@biomejs/cli-linux-x64/rome",
26
+ arm64: "@biomejs/cli-linux-arm64/rome",
27
27
  },
28
28
  };
29
29
 
package/src/workspace.ts CHANGED
@@ -74,7 +74,7 @@ export interface FilesConfiguration {
74
74
  */
75
75
  ignoreUnknown?: boolean;
76
76
  /**
77
- * The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB
77
+ * The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB
78
78
  */
79
79
  maxSize?: number;
80
80
  }
@@ -659,6 +659,10 @@ export interface Nursery {
659
659
  * Use arrow functions over function expressions.
660
660
  */
661
661
  useArrowFunction?: RuleConfiguration;
662
+ /**
663
+ * Enforce using else if instead of nested if in else clauses.
664
+ */
665
+ useCollapsedElseIf?: RuleConfiguration;
662
666
  /**
663
667
  * Enforce all dependencies are correctly specified.
664
668
  */
@@ -839,7 +843,7 @@ export interface Style {
839
843
  */
840
844
  useSingleVarDeclarator?: RuleConfiguration;
841
845
  /**
842
- * Template literals are preferred over string concatenation.
846
+ * Prefer template literals over string concatenation.
843
847
  */
844
848
  useTemplate?: RuleConfiguration;
845
849
  /**
@@ -1232,6 +1236,8 @@ export type Category =
1232
1236
  | "lint/nursery/noVoid"
1233
1237
  | "lint/nursery/useAriaPropTypes"
1234
1238
  | "lint/nursery/useArrowFunction"
1239
+ | "lint/nursery/useBiomeSuppressionComment"
1240
+ | "lint/nursery/useCollapsedElseIf"
1235
1241
  | "lint/nursery/useExhaustiveDependencies"
1236
1242
  | "lint/nursery/useGetterReturn"
1237
1243
  | "lint/nursery/useGroupedTypeImport"
@@ -1329,7 +1335,7 @@ export type Category =
1329
1335
  | "suppressions/unknownGroup"
1330
1336
  | "suppressions/unknownRule"
1331
1337
  | "suppressions/unused"
1332
- | "suppressions/deprecatedSyntax"
1338
+ | "suppressions/deprecatedSuppressionComment"
1333
1339
  | "args/fileNotFound"
1334
1340
  | "flags/invalid"
1335
1341
  | "semanticTests";
@@ -1582,55 +1588,55 @@ export interface Workspace {
1582
1588
  export function createWorkspace(transport: Transport): Workspace {
1583
1589
  return {
1584
1590
  fileFeatures(params) {
1585
- return transport.request("rome/file_features", params);
1591
+ return transport.request("biome/file_features", params);
1586
1592
  },
1587
1593
  updateSettings(params) {
1588
- return transport.request("rome/update_settings", params);
1594
+ return transport.request("biome/update_settings", params);
1589
1595
  },
1590
1596
  openFile(params) {
1591
- return transport.request("rome/open_file", params);
1597
+ return transport.request("biome/open_file", params);
1592
1598
  },
1593
1599
  changeFile(params) {
1594
- return transport.request("rome/change_file", params);
1600
+ return transport.request("biome/change_file", params);
1595
1601
  },
1596
1602
  closeFile(params) {
1597
- return transport.request("rome/close_file", params);
1603
+ return transport.request("biome/close_file", params);
1598
1604
  },
1599
1605
  getSyntaxTree(params) {
1600
- return transport.request("rome/get_syntax_tree", params);
1606
+ return transport.request("biome/get_syntax_tree", params);
1601
1607
  },
1602
1608
  organizeImports(params) {
1603
- return transport.request("rome/organize_imports", params);
1609
+ return transport.request("biome/organize_imports", params);
1604
1610
  },
1605
1611
  getFileContent(params) {
1606
- return transport.request("rome/get_file_content", params);
1612
+ return transport.request("biome/get_file_content", params);
1607
1613
  },
1608
1614
  getControlFlowGraph(params) {
1609
- return transport.request("rome/get_control_flow_graph", params);
1615
+ return transport.request("biome/get_control_flow_graph", params);
1610
1616
  },
1611
1617
  getFormatterIr(params) {
1612
- return transport.request("rome/get_formatter_ir", params);
1618
+ return transport.request("biome/get_formatter_ir", params);
1613
1619
  },
1614
1620
  pullDiagnostics(params) {
1615
- return transport.request("rome/pull_diagnostics", params);
1621
+ return transport.request("biome/pull_diagnostics", params);
1616
1622
  },
1617
1623
  pullActions(params) {
1618
- return transport.request("rome/pull_actions", params);
1624
+ return transport.request("biome/pull_actions", params);
1619
1625
  },
1620
1626
  formatFile(params) {
1621
- return transport.request("rome/format_file", params);
1627
+ return transport.request("biome/format_file", params);
1622
1628
  },
1623
1629
  formatRange(params) {
1624
- return transport.request("rome/format_range", params);
1630
+ return transport.request("biome/format_range", params);
1625
1631
  },
1626
1632
  formatOnType(params) {
1627
- return transport.request("rome/format_on_type", params);
1633
+ return transport.request("biome/format_on_type", params);
1628
1634
  },
1629
1635
  fixFile(params) {
1630
- return transport.request("rome/fix_file", params);
1636
+ return transport.request("biome/fix_file", params);
1631
1637
  },
1632
1638
  rename(params) {
1633
- return transport.request("rome/rename", params);
1639
+ return transport.request("biome/rename", params);
1634
1640
  },
1635
1641
  destroy() {
1636
1642
  transport.destroy();