Skip to content

fix(deps): update dependency web-tree-sitter to v0.25.4 #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
"turndown": "7.2.0",
"vscode-languageserver": "8.0.2",
"vscode-languageserver-textdocument": "1.0.12",
"web-tree-sitter": "0.24.5",
"web-tree-sitter": "0.25.4",
"zod": "3.25.28"
},
"scripts": {

Unchanged files with check annotations Beta

export default class Analyzer {
private enableSourceErrorDiagnostics: boolean
private includeAllWorkspaceSymbols: boolean
private parser: Parser

Check failure on line 42 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Cannot use namespace 'Parser' as a type.
private uriToAnalyzedDocument: Record<string, AnalyzedDocument | undefined> = {}
private workspaceFolder: string | null
}: {
enableSourceErrorDiagnostics?: boolean
includeAllWorkspaceSymbols?: boolean
parser: Parser

Check failure on line 54 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Cannot use namespace 'Parser' as a type.
workspaceFolder: string | null
}) {
this.enableSourceErrorDiagnostics = enableSourceErrorDiagnostics
boundary: params.position.line,
}
let parent = this.parentScope(node)
let declaration: Parser.SyntaxNode | null | undefined

Check failure on line 304 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
let continueSearching = false
// Search for local declaration within parents
const locations: LSP.Location[] = []
TreeSitterUtil.forEach(tree.rootNode, (n) => {
let namedNode: Parser.SyntaxNode | null = null

Check failure on line 409 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
if (TreeSitterUtil.isReference(n)) {
// NOTE: a reference can be a command, variable, function, etc.
: baseNode.startPosition
const ignoredRanges: LSP.Range[] = []
const filterVariables = (n: Parser.SyntaxNode) => {

Check failure on line 476 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
if (
n.text !== word ||
(n.type === 'word' && !TreeSitterUtil.isVariableInReadCommand(n))
return includeDeclaration
}
const filterFunctions = (n: Parser.SyntaxNode) => {

Check failure on line 534 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
const text = n.type === 'function_definition' ? n.firstNamedChild?.text : n.text
if (text !== word) {
return false
return baseNode
.descendantsOfType(typeOfDescendants, startPosition)
.filter(kind === LSP.SymbolKind.Variable ? filterVariables : filterFunctions)
.map((n) => {

Check failure on line 564 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Parameter 'n' implicitly has an 'any' type.
if (n.type === 'function_definition' && n.firstNamedChild) {
return TreeSitterUtil.range(n.firstNamedChild)
}
* `function_definition`'s body, this only returns a `function_definition` if
* its body is a `compound_statement`.
*/
private parentScope(node: Parser.SyntaxNode): Parser.SyntaxNode | null {

Check failure on line 1030 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.

Check failure on line 1030 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
return TreeSitterUtil.findParent(
node,
(n) =>
uri: string,
line: number,
column: number,
): Parser.SyntaxNode | null {

Check failure on line 1046 in server/src/analyser.ts

GitHub Actions / verify (18.x)

Namespace '"web-tree-sitter"' has no exported member 'SyntaxNode'.
const tree = this.uriToAnalyzedDocument[uri]?.tree
if (!tree?.rootNode) {