@lokascript/language-server 6.0.0 → 6.2.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/README.md CHANGED
@@ -84,7 +84,9 @@ node dist/server.js --stdio
84
84
 
85
85
  ### With VS Code
86
86
 
87
- Use the companion extension `lokascript-vscode` which automatically starts this server.
87
+ There is no published LokaScript extension. Start the server from a generic LSP client
88
+ extension, or from your own extension with `vscode-languageclient` (the settings schema is
89
+ below).
88
90
 
89
91
  ### With other editors
90
92
 
package/dist/server.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  CodeActionKind,
13
13
  DidChangeConfigurationNotification,
14
14
  TextEdit
15
- } from "vscode-languageserver/node.js";
15
+ } from "vscode-languageserver/node";
16
16
  import { TextDocument } from "vscode-languageserver-textdocument";
17
17
 
18
18
  // src/types.ts
@@ -340,7 +340,7 @@ function formatHyperscript(code, indentStr = " ") {
340
340
  }
341
341
 
342
342
  // src/simple-diagnostics.ts
343
- import { DiagnosticSeverity } from "vscode-languageserver/node.js";
343
+ import { DiagnosticSeverity } from "vscode-languageserver/node";
344
344
  function isPossessive(code, i) {
345
345
  if (i === 0) return false;
346
346
  const prev = code[i - 1];
@@ -828,7 +828,7 @@ function inferContext(beforeCursor) {
828
828
  }
829
829
 
830
830
  // src/document-symbols.ts
831
- import { SymbolKind } from "vscode-languageserver/node.js";
831
+ import { SymbolKind } from "vscode-languageserver/node";
832
832
  var COMMAND_POSITION = "(?<=^[ \\t]*|(?<![\\p{L}\\p{N}_])end\\s+)";
833
833
  var NOT_WORD_AFTER = "(?![\\p{L}\\p{N}_])";
834
834
  var NAME = "([\\p{L}\\p{N}_]+)";
@@ -1233,6 +1233,9 @@ function translateWithVerification(params, semantic) {
1233
1233
 
1234
1234
  // src/server.ts
1235
1235
  var semanticPackage = semanticImport;
1236
+ function messageText(diagnostic) {
1237
+ return typeof diagnostic.message === "string" ? diagnostic.message : diagnostic.message.value;
1238
+ }
1236
1239
  function getOtherLanguages() {
1237
1240
  if (!semanticPackage?.getRegisteredLanguages) return [];
1238
1241
  return semanticPackage.getRegisteredLanguages().filter((l) => l !== "en");
@@ -2734,7 +2737,7 @@ connection.onCodeAction((params) => {
2734
2737
  }
2735
2738
  });
2736
2739
  }
2737
- if (diagnostic.code === "missing-role" && diagnostic.message.includes("toggle")) {
2740
+ if (diagnostic.code === "missing-role" && messageText(diagnostic).includes("toggle")) {
2738
2741
  actions.push({
2739
2742
  title: "Add class target to toggle",
2740
2743
  kind: CodeActionKind.QuickFix,
@@ -2751,7 +2754,7 @@ connection.onCodeAction((params) => {
2751
2754
  }
2752
2755
  });
2753
2756
  }
2754
- if (diagnostic.code === "missing-role" && diagnostic.message.includes("put")) {
2757
+ if (diagnostic.code === "missing-role" && messageText(diagnostic).includes("put")) {
2755
2758
  actions.push({
2756
2759
  title: "Add destination to put command",
2757
2760
  kind: CodeActionKind.QuickFix,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/language-server",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "description": "Language Server Protocol implementation for LokaScript/hyperscript with 24 language support",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -28,14 +28,14 @@
28
28
  "author": "LokaScript Contributors",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@lokascript/framework": "^6.0.0",
32
- "@lokascript/semantic": "^6.0.0",
33
- "vscode-languageserver": "^9.0.1",
31
+ "@lokascript/framework": "^6.2.0",
32
+ "@lokascript/semantic": "^6.2.0",
33
+ "vscode-languageserver": "^10.1.2",
34
34
  "vscode-languageserver-textdocument": "^1.0.15"
35
35
  },
36
36
  "peerDependencies": {
37
- "@hyperfixi/core": "^6.0.0",
38
- "@hyperfixi/engine": "^6.0.0"
37
+ "@hyperfixi/core": "^6.2.0",
38
+ "@hyperfixi/engine": "^6.2.0"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@hyperfixi/core": {
@@ -46,11 +46,11 @@
46
46
  }
47
47
  },
48
48
  "devDependencies": {
49
- "@hyperfixi/core": "^6.0.0",
50
- "@hyperfixi/engine": "^6.0.0",
49
+ "@hyperfixi/core": "^6.2.0",
50
+ "@hyperfixi/engine": "^6.2.0",
51
51
  "@types/node": "^26.6.3",
52
52
  "@vitest/coverage-v8": "^5.0.0",
53
- "tsup": "^8.0.0",
53
+ "tsup": "^9.0.0",
54
54
  "tsx": "^4.23.15",
55
55
  "typescript": "^5.0.0",
56
56
  "vitest": "^5.0.2"