Skip to content

Commit

Permalink
Merge pull request #709 from bash-lsp/create-pull-request/patch
Browse files Browse the repository at this point in the history
Auto upgrade tree-sitter-bash parser
  • Loading branch information
skovhus authored Jun 10, 2023
2 parents 8c4e8f5 + 7040131 commit 8e586cc
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 29 deletions.
4 changes: 4 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Bash Language Server

## 4.10.0

- Upgrade tree-sitter-bash from [2022 November](https://api.github.com/repos/tree-sitter/tree-sitter-bash/git/commits/4488aa41406547e478636a4fcfd24f5bbc3f2f74) to [2023 May](https://api.github.com/repos/tree-sitter/tree-sitter-bash/git/commits/ee2a8f9906b53a785b784ee816c0016c2b6866d2)

## 4.9.3

- Fix flags/options insertion issue for some clients by using textEdits https://github.com/bash-lsp/bash-language-server/pull/861
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A language server for Bash",
"author": "Mads Hartmann",
"license": "MIT",
"version": "4.9.3",
"version": "4.10.0",
"main": "./out/server.js",
"typings": "./out/server.d.ts",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions server/parser.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"https://api.github.com/repos/tree-sitter/tree-sitter-bash/git/commits/4488aa41406547e478636a4fcfd24f5bbc3f2f74"
tree-sitter-cli "0.20.7"
"https://api.github.com/repos/tree-sitter/tree-sitter-bash/git/commits/ee2a8f9906b53a785b784ee816c0016c2b6866d2"
tree-sitter-cli "0.20.8"
3 changes: 1 addition & 2 deletions server/src/__tests__/analyzer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Logger } from '../util/logger'
const CURRENT_URI = 'dummy-uri.sh'

// if you add a .sh file to testing/fixtures, update this value
const FIXTURE_FILES_MATCHING_GLOB = 17
const FIXTURE_FILES_MATCHING_GLOB = 16

const defaultConfig = getDefaultConfiguration()

Expand Down Expand Up @@ -811,7 +811,6 @@ describe('initiateBackgroundAnalysis', () => {
expect(loggerWarn).toHaveBeenCalled()
expect(loggerWarn.mock.calls).toEqual([
[expect.stringContaining('missing-node.sh: syntax error')],
[expect.stringContaining('missing-node2.sh: syntax error')],
[expect.stringContaining('not-a-shell-script.sh: syntax error')],
[expect.stringContaining('parse-problems.sh: syntax error')],
[expect.stringContaining('sourcing.sh line 16: failed to resolve path')],
Expand Down
10 changes: 5 additions & 5 deletions server/src/__tests__/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,16 +1067,16 @@ describe('server', () => {
})

it('responds with documentation even if parsing fails', async () => {
const result = await getHoverResult(FIXTURE_URI.MISSING_NODE2, {
// sleep
line: 12,
character: 4,
const result = await getHoverResult(FIXTURE_URI.MISSING_NODE, {
// echo
line: 11,
character: 2,
})

expect(result).toEqual({
contents: {
kind: 'markdown',
value: expect.stringContaining('sleep'),
value: expect.stringContaining('echo'),
},
})
})
Expand Down
Binary file modified server/tree-sitter-bash.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion testing/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const FIXTURE_URI = {
MISSING_EXTENSION: `file://${path.join(FIXTURE_FOLDER, 'extension')}`,
EXTENSION_INC: `file://${path.join(FIXTURE_FOLDER, 'extension.inc')}`,
MISSING_NODE: `file://${path.join(FIXTURE_FOLDER, 'missing-node.sh')}`,
MISSING_NODE2: `file://${path.join(FIXTURE_FOLDER, 'missing-node2.sh')}`,
OPTIONS: `file://${path.join(FIXTURE_FOLDER, 'options.sh')}`,
OVERRIDE_SYMBOL: `file://${path.join(FIXTURE_FOLDER, 'override-executable-symbol.sh')}`,
PARSE_PROBLEMS: `file://${path.join(FIXTURE_FOLDER, 'parse-problems.sh')}`,
Expand Down
18 changes: 0 additions & 18 deletions testing/fixtures/missing-node2.sh

This file was deleted.

0 comments on commit 8e586cc

Please sign in to comment.