Skip to content

Commit 8e3c73c

Browse files
bockstallerzabilchadlwilson
authored
Pin and test all vscode packages (#899)
* test stated version compatibility this commit adds a new testing mode whereby the extension is tested against the stated minimum vscode compatibility this test fails in this commit due to a minimum @types/vscode requirement of the lsp packages that breaks during runtime Signed-off-by: Lukas Bockstaller <[email protected]> * pins vscode and lsp package versions coherently the compatibility tests (and using the plugin with any version <1.82.0) currently fails with Error: The language client requires VS Code version ^1.82.0 but received version 1.63.1 This commit pins the versions so that doesn't occur anymore. Rationale for the versions: We need at least @types/vscode=~1.67.0 to use the newer client start api: const client: LanguageClient = ...; await client.start(); instead of const client: LanguageClient = ...; client.start(); await client.onReady(); and the LanguageClient#dispose method. But @types/vscode=~1.67.0 has an issue where running tests modifies the package.json (microsoft/vscode#148975) which is fixed in ~1.71.0. The LSP packages are then selected to keep backwards compatibility with ~1.71.0 Signed-off-by: Lukas Bockstaller <[email protected]> * adds missing sinon types Signed-off-by: Lukas Bockstaller <[email protected]> * Remove svg image links Signed-off-by: Zabil Cheriya Maliackal <[email protected]> * bumps version for release Signed-off-by: Lukas Bockstaller <[email protected]> * removes direct dependency to vscode-jsonrpc and vscode-languageclient-protocol Signed-off-by: Lukas Bockstaller <[email protected]> * bumps test timeout Signed-off-by: Lukas Bockstaller <[email protected]> * De-duplicate transitive dependencies Signed-off-by: Chad Wilson <[email protected]> * Simplify dependabot grouping rules Signed-off-by: Chad Wilson <[email protected]> --------- Signed-off-by: Lukas Bockstaller <[email protected]> Signed-off-by: Zabil Cheriya Maliackal <[email protected]> Signed-off-by: Chad Wilson <[email protected]> Co-authored-by: Zabil Cheriya Maliackal <[email protected]> Co-authored-by: Chad Wilson <[email protected]>
1 parent aedacb9 commit 8e3c73c

File tree

10 files changed

+153
-95
lines changed

10 files changed

+153
-95
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ updates:
99
schedule:
1010
interval: weekly
1111
groups:
12-
vscode:
12+
mocha:
1313
patterns:
14-
- "vscode-*"
14+
- "*mocha*"
15+
fs-extra:
16+
patterns:
17+
- "*fs-extra*"
18+
sinon:
19+
patterns:
20+
- "*sinon*"

.github/workflows/vscode.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,33 @@ jobs:
4242
run: |
4343
xvfb-run --auto-servernum npm test
4444
45+
- name: Run compatibility tests (linux)
46+
if: matrix.os == 'ubuntu-latest'
47+
run: |
48+
xvfb-run --auto-servernum npm run compatibilityTest
49+
4550
- name: Run tests (macos)
4651
if: matrix.os == 'macos-latest'
4752
run: |
4853
npm test
4954
55+
- name: Run compatibility tests (macos)
56+
if: matrix.os == 'macos-latest'
57+
run: |
58+
npm run compatibilityTest
59+
5060
- name: Run tests (windows)
5161
if: matrix.os == 'windows-latest'
5262
shell: pwsh
5363
run: |
5464
npm test
5565
66+
- name: Run compatibility tests (windows)
67+
if: matrix.os == 'windows-latest'
68+
shell: pwsh
69+
run: |
70+
npm run compatibilityTest
71+
5672
- name: Upload logs
5773
uses: actions/upload-artifact@v3
5874
if: failure()

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[![Released Version](https://vsmarketplacebadge.apphb.com/version-short/getgauge.gauge.svg)](https://marketplace.visualstudio.com/items?itemName=getgauge.gauge)
2-
[![Actions Status](https://github.com/getgauge/gauge-vscode/workflows/vscode/badge.svg)](https://github.com/getgauge/gauge-vscode/actions)
3-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
4-
51
Gauge extension for [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=getgauge.gauge)
62

73
# Install

package-lock.json

Lines changed: 82 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"description": "Gauge support for VScode.",
99
"author": "ThoughtWorks",
1010
"license": "MIT",
11-
"version": "0.1.3",
11+
"version": "0.1.4",
1212
"publisher": "getgauge",
1313
"engines": {
14-
"vscode": "^1.63.1"
14+
"vscode": "^1.71.0"
1515
},
1616
"categories": [
1717
"Programming Languages"
@@ -455,14 +455,16 @@
455455
"pack": "webpack-cli --env production",
456456
"build": "npm install && npm run lint && npm run compile && npm run pack && vsce package",
457457
"test": "node out/test/runTest.js",
458+
"compatibilityTest": "node out/test/runTest.js --compatibility",
458459
"publish": "vsce publish"
459460
},
460461
"devDependencies": {
461462
"@types/fs-extra": "^11.0.3",
462463
"@types/mocha": "^10.0.3",
463464
"@types/node": "^20.8.9",
464465
"@types/ps-tree": "^1.1.4",
465-
"@types/vscode": "~1.63.1",
466+
"@types/sinon": "^17.0.1",
467+
"@types/vscode": "~1.71.0",
466468
"@vscode/test-electron": "^2.3.6",
467469
"cross-env": "^7.0.3",
468470
"glob": "^10.3.10",
@@ -482,9 +484,7 @@
482484
"fs-extra": "^11.1.1",
483485
"get-port": "^5.1.1",
484486
"ps-tree": "^1.2.0",
485-
"vscode-jsonrpc": "^8.2.0",
486-
"vscode-languageclient": "^9.0.1",
487-
"vscode-languageserver-protocol": "~3.17.5",
487+
"vscode-languageclient": "~8.1.0",
488488
"xmlbuilder": "^15.1.1"
489489
}
490490
}

0 commit comments

Comments
 (0)