dot-language-support 4.3.2 → 4.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/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as lst from "vscode-languageserver-types";
2
2
  import { Color as Color$1, ColorInformation, ColorPresentation } from "vscode-languageserver-types";
3
3
  import { TextDocument } from "vscode-languageserver-textdocument";
4
-
5
4
  //#region src/types.d.ts
6
5
  declare const errorSource: {
7
6
  readonly Scan: 1;
package/dist/index.mjs CHANGED
@@ -324,7 +324,10 @@ function syntaxNodeToRange(doc, sourceFile, node) {
324
324
  }
325
325
  function escapeIdentifierText(text) {
326
326
  if (text === "") return quote("");
327
- if (text.includes("\"") || text.includes("\n")) return quote(text.replace(/"/, "\\\"").replace(/\n/, "\\\n"));
327
+ if (text.includes("\"") || text.includes("\n")) {
328
+ const esc = text.replace(/"/, "\\\"").replace(/\n/, "\\\n");
329
+ return quote(esc);
330
+ }
328
331
  if (!isIdentifierStart(text.charCodeAt(0)) || text.includes(" ")) return quote(text);
329
332
  return text;
330
333
  }
@@ -1682,7 +1685,7 @@ const clusterAttributes = Object.freeze([
1682
1685
  "target",
1683
1686
  "tooltip"
1684
1687
  ]);
1685
- const attributes = Array.from(new Set([
1688
+ const attributes = Array.from(/* @__PURE__ */ new Set([
1686
1689
  ...nodeAttributes,
1687
1690
  ...edgeAttributes,
1688
1691
  ...graphAttributes,
@@ -2555,12 +2558,14 @@ function createEdgeViolationDiagnostics(file, expectedEdgeOp, violators) {
2555
2558
  const category = diagnosticCategory.Error;
2556
2559
  for (const edge of violators) edge.operation.flags |= syntaxNodeFlags.ContainsErrors;
2557
2560
  return violators.map((edge) => {
2561
+ const start = getStart(file, edge.operation);
2562
+ const end = edge.operation.end;
2558
2563
  return {
2559
2564
  message,
2560
2565
  code,
2561
2566
  category,
2562
- start: getStart(file, edge.operation),
2563
- end: edge.operation.end
2567
+ start,
2568
+ end
2564
2569
  };
2565
2570
  });
2566
2571
  }
@@ -3065,7 +3070,8 @@ function getGeneralRefactorings(doc, file, range) {
3065
3070
  if (isEdgeStatement(statement) && statement.rhs.length === 1 && !edgeStatementHasAttributes(statement)) {
3066
3071
  const statementSource = statement.source;
3067
3072
  if (isNodeId(statementSource)) {
3068
- if (sourceText === getIdentifierText(statementSource.id)) candidates.push(statement);
3073
+ const lowerSourceText = getIdentifierText(statementSource.id);
3074
+ if (sourceText === lowerSourceText) candidates.push(statement);
3069
3075
  }
3070
3076
  }
3071
3077
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dot-language-support",
3
- "version": "4.3.2",
3
+ "version": "4.3.4",
4
4
  "description": "Parser and language service for graphviz (dot) files",
5
5
  "keywords": [
6
6
  "dot",
@@ -32,15 +32,15 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "vscode-languageserver-textdocument": "^1.0.12",
35
- "vscode-languageserver-types": "^3.17.5"
35
+ "vscode-languageserver-types": "^3.18.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "expect": "^30.4.1",
39
- "oxfmt": "^0.52.0",
40
- "oxlint": "^1.67.0",
41
- "oxlint-tsgolint": "^0.23.0",
42
- "tsdown": "^0.22.1",
43
- "typescript": "^6.0.3"
39
+ "oxfmt": "^0.58.0",
40
+ "oxlint": "^1.73.0",
41
+ "oxlint-tsgolint": "^0.24.0",
42
+ "tsdown": "^0.22.5",
43
+ "typescript": "^7.0.2"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=22"