Skip to content

Commit

Permalink
Pin and test all vscode packages (#899)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Nov 10, 2023
1 parent aedacb9 commit 8e3c73c
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 95 deletions.
10 changes: 8 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ updates:
schedule:
interval: weekly
groups:
vscode:
mocha:
patterns:
- "vscode-*"
- "*mocha*"
fs-extra:
patterns:
- "*fs-extra*"
sinon:
patterns:
- "*sinon*"
16 changes: 16 additions & 0 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,33 @@ jobs:
run: |
xvfb-run --auto-servernum npm test
- name: Run compatibility tests (linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run --auto-servernum npm run compatibilityTest
- name: Run tests (macos)
if: matrix.os == 'macos-latest'
run: |
npm test
- name: Run compatibility tests (macos)
if: matrix.os == 'macos-latest'
run: |
npm run compatibilityTest
- name: Run tests (windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
npm test
- name: Run compatibility tests (windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
npm run compatibilityTest
- name: Upload logs
uses: actions/upload-artifact@v3
if: failure()
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[![Released Version](https://vsmarketplacebadge.apphb.com/version-short/getgauge.gauge.svg)](https://marketplace.visualstudio.com/items?itemName=getgauge.gauge)
[![Actions Status](https://github.com/getgauge/gauge-vscode/workflows/vscode/badge.svg)](https://github.com/getgauge/gauge-vscode/actions)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

Gauge extension for [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=getgauge.gauge)

# Install
Expand Down
150 changes: 82 additions & 68 deletions package-lock.json

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

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"description": "Gauge support for VScode.",
"author": "ThoughtWorks",
"license": "MIT",
"version": "0.1.3",
"version": "0.1.4",
"publisher": "getgauge",
"engines": {
"vscode": "^1.63.1"
"vscode": "^1.71.0"
},
"categories": [
"Programming Languages"
Expand Down Expand Up @@ -455,14 +455,16 @@
"pack": "webpack-cli --env production",
"build": "npm install && npm run lint && npm run compile && npm run pack && vsce package",
"test": "node out/test/runTest.js",
"compatibilityTest": "node out/test/runTest.js --compatibility",
"publish": "vsce publish"
},
"devDependencies": {
"@types/fs-extra": "^11.0.3",
"@types/mocha": "^10.0.3",
"@types/node": "^20.8.9",
"@types/ps-tree": "^1.1.4",
"@types/vscode": "~1.63.1",
"@types/sinon": "^17.0.1",
"@types/vscode": "~1.71.0",
"@vscode/test-electron": "^2.3.6",
"cross-env": "^7.0.3",
"glob": "^10.3.10",
Expand All @@ -482,9 +484,7 @@
"fs-extra": "^11.1.1",
"get-port": "^5.1.1",
"ps-tree": "^1.2.0",
"vscode-jsonrpc": "^8.2.0",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver-protocol": "~3.17.5",
"vscode-languageclient": "~8.1.0",
"xmlbuilder": "^15.1.1"
}
}
Loading

0 comments on commit 8e3c73c

Please sign in to comment.