@marko/language-server 1.0.1 → 1.0.2
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.js +262 -224
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +262 -224
- package/dist/index.mjs.map +4 -4
- package/dist/service/marko/complete/AttrName.d.ts +1 -1
- package/dist/service/marko/complete/Import.d.ts +1 -1
- package/dist/service/marko/complete/OpenTagName.d.ts +1 -1
- package/dist/service/marko/definition/AttrName.d.ts +1 -1
- package/dist/service/marko/definition/OpenTagName.d.ts +1 -1
- package/dist/service/marko/hover/OpenTagName.d.ts +1 -1
- package/dist/utils/file.d.ts +3 -0
- package/dist/utils/get-component-filename.d.ts +1 -2
- package/dist/utils/project.d.ts +5 -5
- package/package.json +4 -5
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Node } from "@marko/language-tools";
|
|
2
2
|
import type { CompletionMeta, CompletionResult } from ".";
|
|
3
|
-
export declare function AttrName({ offset, node, file: { parsed,
|
|
3
|
+
export declare function AttrName({ offset, node, file: { parsed, lookup }, }: CompletionMeta<Node.AttrName>): CompletionResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Node } from "@marko/language-tools";
|
|
2
2
|
import type { CompletionMeta, CompletionResult } from ".";
|
|
3
|
-
export declare function Import({ node, file: { parsed, filename,
|
|
3
|
+
export declare function Import({ node, file: { parsed, filename, lookup }, }: CompletionMeta<Node.Import>): CompletionResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Node } from "@marko/language-tools";
|
|
2
2
|
import type { CompletionMeta, CompletionResult } from ".";
|
|
3
|
-
export declare function OpenTagName({ node, file: { parsed, filename,
|
|
3
|
+
export declare function OpenTagName({ node, file: { parsed, filename, lookup }, }: CompletionMeta<Node.OpenTagName>): CompletionResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Node } from "@marko/language-tools";
|
|
2
2
|
import type { DefinitionMeta, DefinitionResult } from ".";
|
|
3
|
-
export declare function AttrName({ node, file: { parsed,
|
|
3
|
+
export declare function AttrName({ node, file: { parsed, lookup }, }: DefinitionMeta<Node.AttrName>): DefinitionResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Node } from "@marko/language-tools";
|
|
2
2
|
import type { DefinitionMeta, DefinitionResult } from ".";
|
|
3
|
-
export declare function OpenTagName({ node, file: { parsed,
|
|
3
|
+
export declare function OpenTagName({ node, file: { parsed, lookup }, }: DefinitionMeta<Node.OpenTagName>): DefinitionResult;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Node } from "@marko/language-tools";
|
|
2
2
|
import type { HoverMeta, HoverResult } from ".";
|
|
3
|
-
export declare function OpenTagName({ node, file: { parsed, filename,
|
|
3
|
+
export declare function OpenTagName({ node, file: { parsed, filename, lookup }, }: HoverMeta<Node.OpenTagName>): HoverResult;
|
package/dist/utils/file.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TextDocument } from "vscode-languageserver-textdocument";
|
|
2
|
+
import type { TaglibLookup } from "@marko/babel-utils";
|
|
2
3
|
import { type Parsed } from "@marko/language-tools";
|
|
3
4
|
import { MarkoProject } from "./project";
|
|
4
5
|
export interface MarkoFile {
|
|
@@ -6,6 +7,7 @@ export interface MarkoFile {
|
|
|
6
7
|
uri: string;
|
|
7
8
|
scheme: string;
|
|
8
9
|
version: number;
|
|
10
|
+
lookup: TaglibLookup;
|
|
9
11
|
filename: string;
|
|
10
12
|
dirname: string;
|
|
11
13
|
parsed: Parsed;
|
|
@@ -14,6 +16,7 @@ export interface MarkoFile {
|
|
|
14
16
|
export declare function getFSDir(doc: TextDocument): string | undefined;
|
|
15
17
|
export declare function getFSPath(doc: TextDocument): string | undefined;
|
|
16
18
|
export declare function getMarkoFile(doc: TextDocument): MarkoFile;
|
|
19
|
+
export declare function clearMarkoCacheForFile(doc: TextDocument): void;
|
|
17
20
|
/**
|
|
18
21
|
* Run some processing against a parsed document and cache the result.
|
|
19
22
|
* Anytime the document changes, the cache is cleared.
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function getComponentFilename(from: string, host: LanguageServiceHost): string | undefined;
|
|
1
|
+
export default function getComponentFilename(from: string): string | undefined;
|
package/dist/utils/project.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TaglibLookup } from "@marko/babel-utils";
|
|
2
2
|
import * as defaultCompiler from "@marko/compiler";
|
|
3
3
|
export type MarkoProject = {
|
|
4
|
-
rootDir: string;
|
|
5
4
|
cache: Map<unknown, unknown>;
|
|
6
|
-
|
|
7
|
-
compiler: typeof
|
|
8
|
-
translator:
|
|
5
|
+
getLookup(dir: string): TaglibLookup;
|
|
6
|
+
compiler: typeof defaultCompiler;
|
|
7
|
+
translator: any;
|
|
9
8
|
};
|
|
10
9
|
export declare function getMarkoProject(dir?: string): MarkoProject;
|
|
11
|
-
export declare function getMarkoProjects():
|
|
10
|
+
export declare function getMarkoProjects(): IterableIterator<MarkoProject>;
|
|
11
|
+
export declare function clearMarkoProjectCaches(): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-server",
|
|
3
3
|
"description": "Marko Language Server",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"bin": {
|
|
6
6
|
"marko-language-server": "./bin.js"
|
|
7
7
|
},
|
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
"@babel/helper-validator-identifier": "^7.19.1",
|
|
11
11
|
"@marko/language-tools": "^1.0.0",
|
|
12
12
|
"@marko/babel-utils": "^5.21.4",
|
|
13
|
-
"@marko/compiler": "^5.
|
|
14
|
-
"@marko/translator-default": "^5.
|
|
13
|
+
"@marko/compiler": "^5.25.0",
|
|
14
|
+
"@marko/translator-default": "^5.23.0",
|
|
15
15
|
"htmljs-parser": "^5.3.0",
|
|
16
|
-
"
|
|
17
|
-
"marko": "^5.22.8",
|
|
16
|
+
"marko": "^5.23.0",
|
|
18
17
|
"prettier": "^2.8.4",
|
|
19
18
|
"prettier-plugin-marko": "^1.2.3",
|
|
20
19
|
"relative-import-path": "^1.0.0",
|