Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Unit tests

on:
pull_request:
branches: ['*']
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
test:
name: Run unit tests
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
- run: cd tests/docker && ./run-e2e-test-local.sh
12 changes: 12 additions & 0 deletions .vscode-test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { defineConfig } = require('@vscode/test-cli');

module.exports = defineConfig([
{
mocha: {
ui: 'bdd',
timeout: 20000,
},
label: 'unitTests',
files: 'out/**/*.test.js',
},
]);
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

### Changed

- Adds vscode-test to run unit-tests — closes [#3570](https://github.com/gitkraken/vscode-gitlens/issues/3570)

### Fixed

- Fixes [#3592](https://github.com/gitkraken/vscode-gitlens/issues/3592) - Connecting to an integration via Remotes view (but likely others) doesn't work
Expand Down
96 changes: 48 additions & 48 deletions ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ GitLens
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
This project incorporates components from the projects listed below.

1. @lit/context version 1.1.2 (https://github.com/lit/lit)
2. @lit/react version 1.0.5 (https://github.com/lit/lit)
3. @lit/task version 1.0.1 (https://github.com/lit/lit)
4. @microsoft/fast-element version 1.13.0 (https://github.com/Microsoft/fast)
5. @microsoft/fast-foundation version 2.49.6 (https://github.com/Microsoft/fast)
6. @microsoft/fast-react-wrapper version 0.3.24 (https://github.com/Microsoft/fast)
7. @octokit/graphql version 8.1.1 (https://github.com/octokit/graphql.js)
8. @octokit/request-error version 6.1.4 (https://github.com/octokit/request-error.js)
9. @octokit/request version 9.1.3 (https://github.com/octokit/request.js)
10. @octokit/types version 13.5.0 (https://github.com/octokit/types.ts)
11. @opentelemetry/api version 1.9.0 (https://github.com/open-telemetry/opentelemetry-js)
12. @opentelemetry/exporter-trace-otlp-http version 0.53.0 (https://github.com/open-telemetry/opentelemetry-js)
13. @opentelemetry/resources version 1.26.0 (https://github.com/open-telemetry/opentelemetry-js)
14. @opentelemetry/sdk-trace-base version 1.26.0 (https://github.com/open-telemetry/opentelemetry-js)
15. @opentelemetry/semantic-conventions version 1.27.0 (https://github.com/open-telemetry/opentelemetry-js)
16. @shoelace-style/shoelace version 2.16.0 (https://github.com/shoelace-style/shoelace)
17. @vscode/codicons version 0.0.36 (https://github.com/microsoft/vscode-codicons)
18. @vscode/webview-ui-toolkit version 1.4.0 (https://github.com/microsoft/vscode-webview-ui-toolkit)
19. ansi-regex version 6.1.0 (https://github.com/chalk/ansi-regex)
20. billboard.js version 3.13.0 (https://github.com/naver/billboard.js)
21. fast-string-truncated-width version 1.1.0 (https://github.com/fabiospampinato/fast-string-truncated-width)
1. @gk-nzaytsev/fast-string-truncated-width version 1.1.0 (https://github.com/nzaytsev/fast-string-truncated-width)
2. @lit/context version 1.1.2 (https://github.com/lit/lit)
3. @lit/react version 1.0.5 (https://github.com/lit/lit)
4. @lit/task version 1.0.1 (https://github.com/lit/lit)
5. @microsoft/fast-element version 1.13.0 (https://github.com/Microsoft/fast)
6. @microsoft/fast-foundation version 2.49.6 (https://github.com/Microsoft/fast)
7. @microsoft/fast-react-wrapper version 0.3.24 (https://github.com/Microsoft/fast)
8. @octokit/graphql version 8.1.1 (https://github.com/octokit/graphql.js)
9. @octokit/request-error version 6.1.4 (https://github.com/octokit/request-error.js)
10. @octokit/request version 9.1.3 (https://github.com/octokit/request.js)
11. @octokit/types version 13.5.0 (https://github.com/octokit/types.ts)
12. @opentelemetry/api version 1.9.0 (https://github.com/open-telemetry/opentelemetry-js)
13. @opentelemetry/exporter-trace-otlp-http version 0.53.0 (https://github.com/open-telemetry/opentelemetry-js)
14. @opentelemetry/resources version 1.26.0 (https://github.com/open-telemetry/opentelemetry-js)
15. @opentelemetry/sdk-trace-base version 1.26.0 (https://github.com/open-telemetry/opentelemetry-js)
16. @opentelemetry/semantic-conventions version 1.27.0 (https://github.com/open-telemetry/opentelemetry-js)
17. @shoelace-style/shoelace version 2.16.0 (https://github.com/shoelace-style/shoelace)
18. @vscode/codicons version 0.0.36 (https://github.com/microsoft/vscode-codicons)
19. @vscode/webview-ui-toolkit version 1.4.0 (https://github.com/microsoft/vscode-webview-ui-toolkit)
20. ansi-regex version 6.1.0 (https://github.com/chalk/ansi-regex)
21. billboard.js version 3.13.0 (https://github.com/naver/billboard.js)
22. https-proxy-agent version 5.0.1 (https://github.com/TooTallNate/node-https-proxy-agent)
23. iconv-lite version 0.6.3 (https://github.com/ashtuchkin/iconv-lite)
24. lit version 3.2.0 (https://github.com/lit/lit)
Expand All @@ -39,6 +39,33 @@ This project incorporates components from the projects listed below.
34. sortablejs version 1.15.0 (https://github.com/SortableJS/Sortable)
35. tslib version 2.7.0 (https://github.com/Microsoft/tslib)

%% @gk-nzaytsev/fast-string-truncated-width NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2024-present Fabio Spampinato

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

=========================================
END OF @gk-nzaytsev/fast-string-truncated-width NOTICES AND INFORMATION

%% @lit/context NOTICES AND INFORMATION BEGIN HERE
=========================================
BSD 3-Clause License
Expand Down Expand Up @@ -1917,33 +1944,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF billboard.js NOTICES AND INFORMATION

%% fast-string-truncated-width NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2024-present Fabio Spampinato

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

=========================================
END OF fast-string-truncated-width NOTICES AND INFORMATION

%% https-proxy-agent NOTICES AND INFORMATION BEGIN HERE
=========================================
https-proxy-agent
Expand Down
28 changes: 20 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,24 @@ export default ts.config(
'@typescript-eslint/no-restricted-imports': 'off',
},
},
// {
// name: 'tests:unit',
// files: ['src/test/**/*'],
// rules: {
// 'no-restricted-imports': 'off',
// '@typescript-eslint/no-unused-vars': 'off',
// },
// },
{
name: 'tests:unit',
files: ['**/__tests__/**', 'src/test/suite/**'],
rules: {
'no-restricted-imports': 'off',
'@typescript-eslint/no-restricted-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-restricted-syntax': [
'error',
{
message: "Don't forget to remove .only from test suites",
selector: 'CallExpression MemberExpression[object.name="suite"][property.name="only"]',
},
{
message: "Don't forget to remove .only from tests",
selector: 'CallExpression MemberExpression[object.name="test"][property.name="only"]',
},
],
},
},
);
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17948,6 +17948,7 @@
"icons:apply": "node ./scripts/applyIconsContribution.mjs",
"icons:svgo": "svgo -q -f ./images/icons/ --config svgo.config.js",
"lint": "pnpm run lint:clear-cache && eslint .",
"lint:fix": "pnpm run lint:clear-cache && eslint . --fix",
"lint:webviews": "pnpm run lint:clear-cache && eslint \"src/webviews/apps/**/*.ts?(x)\"",
"lint:clear-cache": "npx rimraf .eslintcache",
"package": "vsce package --no-dependencies",
Expand All @@ -17960,7 +17961,7 @@
"pub-pre": "vsce publish --no-dependencies --pre-release",
"rebuild": "pnpm run reset && pnpm run build",
"reset": "pnpm run clean && pnpm install --frozen-lockfile",
"test": "node ./out/test/runTest.js",
"test": "vscode-test",
"test:e2e": "playwright test -c tests/e2e/playwright.config.ts",
"watch": "webpack --watch --mode development",
"watch:extension": "webpack --watch --mode development --config-name extension",
Expand All @@ -17973,13 +17974,14 @@
"update-dts:main": "pushd \"src/@types\" && npx @vscode/dts main && popd",
"update-emoji": "node ./scripts/generateEmojiShortcodeMap.mjs",
"update-licenses": "node ./scripts/generateLicenses.mjs",
"-pretest": "pnpm run build:tests",
"pretest": "pnpm run build:tests",
"vscode:prepublish": "pnpm run bundle"
},
"dependencies": {
"@gitkraken/gitkraken-components": "10.6.0",
"@gitkraken/provider-apis": "0.24.2",
"@gitkraken/shared-web-components": "0.1.1-rc.15",
"@gk-nzaytsev/fast-string-truncated-width": "1.1.0",
"@lit/context": "1.1.2",
"@lit/react": "1.0.5",
"@lit/task": "1.0.1",
Expand All @@ -17988,8 +17990,8 @@
"@microsoft/fast-react-wrapper": "0.3.24",
"@octokit/graphql": "8.1.1",
"@octokit/request": "9.1.3",
"@octokit/types": "13.5.0",
"@octokit/request-error": "6.1.4",
"@octokit/types": "13.5.0",
"@opentelemetry/api": "1.9.0",
"@opentelemetry/exporter-trace-otlp-http": "0.53.0",
"@opentelemetry/resources": "1.26.0",
Expand All @@ -18000,7 +18002,6 @@
"@vscode/webview-ui-toolkit": "1.4.0",
"ansi-regex": "6.1.0",
"billboard.js": "3.13.0",
"fast-string-truncated-width": "1.1.0",
"https-proxy-agent": "5.0.1",
"iconv-lite": "0.6.3",
"lit": "3.2.0",
Expand All @@ -18027,6 +18028,7 @@
"@types/sortablejs": "1.15.8",
"@types/vscode": "1.82.0",
"@typescript-eslint/parser": "8.5.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "2.4.1",
"@vscode/test-web": "0.0.60",
"@vscode/vsce": "3.1.0",
Expand Down
Loading
Loading