Граф коммитов

2763 Коммитов

Автор SHA1 Сообщение Дата
Charis Kyriakou 78e01e6f92
Rename db config terms to use 'variant analysis' instead of remote (#1960) 2023-01-13 09:30:45 +00:00
Nora 5c40293c06 Revert "Rename arguments"
This reverts commit 85b7e0eabad1092792ff336b8ccff4fdef04e034.
2023-01-12 15:15:57 +00:00
Nora ba830dd2e5 Fix expanded bug when renaming lists 2023-01-12 15:15:57 +00:00
Nora c36da4ba7e Rename arguments 2023-01-12 15:15:57 +00:00
Nora b9740fe582 Use individual functions for add and remove from expanded state 2023-01-12 15:15:56 +00:00
Nora 94823a6c75 Disable filewatcher for tests 2023-01-12 12:53:12 +00:00
Nora 010e85c28b Merge comments 2023-01-12 13:44:34 +01:00
Nora ed11b20cb7 Add tests for does exist methods 2023-01-12 12:43:30 +00:00
Nora 8cb0cd23dd Add test for set selected item 2023-01-12 12:43:30 +00:00
Nora 9f5e9653da Add tests for add 2023-01-12 12:43:30 +00:00
Shati Patel 2b7d2d0610
Increase timeout for "variant analysis submission" test (#1958) 2023-01-12 12:04:26 +00:00
Shati Patel e322bf829a
Add db manager tests for "removeDbItem" functionality (#1948) 2023-01-12 11:59:25 +00:00
Robert 25a3ba76ed Extract on-click handlers to consts 2023-01-12 11:01:10 +00:00
Robert 0aa2cd6e90 Make Telemetry.ts lowercase 2023-01-12 10:58:01 +00:00
Charis Kyriakou 67fa920d4d
Merge pull request #1957 from github/charisk/rename-new-db-panel
Rename new db panel to 'Variant Analysis Repositories'
2023-01-12 10:55:08 +00:00
Shati Patel b54dfe9b58
Fix flaky test: avoid file watcher in db manager tests (#1951) 2023-01-12 10:51:46 +00:00
Charis Kyriakou 4f588d9def
Remove obsolete test file (#1955) 2023-01-12 10:38:57 +00:00
Charis Kyriakou 1c3a6154c9 Rename the id for the new db panel to 'codeQLVariantAnalysisRepositories' 2023-01-12 09:20:35 +00:00
Charis Kyriakou a21382b053 Rename the user-visible name for the new db panel to 'Variant Analysis Repositories' 2023-01-12 08:49:24 +00:00
Andrew Eisenberg 77c6706320 Ensure remote queries can handle codeql-pack.yml files
This updates one of our integration tests so that it uses
`codeql-pack.yml` instead of `qlpack.yml`.
2023-01-11 14:36:43 -08:00
Shati Patel 3fe3117c39
Temporarily skip flaky test (#1954)
We're working on a fix, but this will unblock CI in the meantime
2023-01-11 16:24:35 +00:00
Robert f1a8564db4 Output telemetry when clicking links 2023-01-11 14:50:25 +00:00
Robert 34e98c4cc5 Convert useStateWithTelemetry to use useMemo 2023-01-11 14:50:25 +00:00
Robert f325eeb5ab Output telemetry on react state changes in MRVA results view 2023-01-11 14:50:24 +00:00
Robert bdfb2f29da Add method to loging telemetry of a UI interaction 2023-01-11 14:48:14 +00:00
Robert 9d457304b1 Convert opening variant analysis logs to a command 2023-01-11 14:35:40 +00:00
Koen Vlaswinkel bb63dc52c9 Fix debugging not working
VSCode was not able to find the original source of the bundled
extension because it was looking for the source in the `out` directory.
By setting the `sourceRoot` to the `extensions/ql-vscode` directory
which is located at `..` from the `out` directory, VSCode is able to
find the original source and breakpoints are hit.
2023-01-11 12:13:55 +02:00
Koen Vlaswinkel 033d653d44 Fix types in CodeFlowsDropdown 2023-01-11 11:56:50 +02:00
Koen Vlaswinkel 6bf19eb52f Use case-insensitive path comparison on Windows 2023-01-11 11:29:23 +02:00
Koen Vlaswinkel 477b32662f Copy WASM file from source-map
This will copy the WASM file from source-map to the output directory.
This makes the source-map package work. See the comment in the code for
more details.
2023-01-11 10:43:45 +02:00
Koen Vlaswinkel 65696997de Add correct binding of sourcemap instance 2023-01-11 10:43:45 +02:00
Koen Vlaswinkel d79b105751 Remove fs mocking from cli-integration tests 2023-01-11 10:43:44 +02:00
Koen Vlaswinkel 1f9e28e09d Remove fs mocking from minimal-workspace tests 2023-01-11 10:43:43 +02:00
Koen Vlaswinkel 0d8c90a7b5 Remove fs mocking from no-workspace tests 2023-01-11 10:43:24 +02:00
Koen Vlaswinkel f13f0b3bc3 Bundle extension files using ESBuild
This bundles the extension files using esbuild, as recommended by
VSCode. This reduces the size of the extension from 34MB to less than
5MB.

Gulp will still run TypeScript to check types, but will not use the
TypeScript compiler output in the bundle.

Tests are now run separately, outside of Gulp, so their data doesn't
need to be copied anymore.

See: https://code.visualstudio.com/api/working-with-extensions/bundling-extension
2023-01-11 10:42:24 +02:00
Charis Kyriakou 0b6f2c248b
Refactor logic to remove db or list from config (#1946) 2023-01-11 08:41:58 +00:00
Shati Patel 9cf508837e
Add db manager tests for "rename" functions (#1939)
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2023-01-10 14:00:47 +00:00
Nora ed2bdd8a43
Merge pull request #1925 from github/nora/add-remove-context-action
Add remove context menu action
2023-01-10 09:09:51 +01:00
Robert 82ce7bc874
Merge pull request #1943 from github/robertbrignull/telemetry_race_condition
Avoid race condition requesting telemetry permissions
2023-01-09 17:38:00 +00:00
Robert aa950eed6a Avoid race condition requesting telemetry permissions 2023-01-09 16:54:32 +00:00
Robert f9777016a7 Acknowledge that telemetryListener may be undefined 2023-01-09 16:19:09 +00:00
Nora c4df8bf7b2 Handle expanded state 2023-01-09 15:01:57 +00:00
Nora 29c29f0b77 Remove db in list from selected 2023-01-09 07:54:33 +00:00
Nora b5f865432e Add action 2023-01-09 08:26:21 +01:00
Aditya Sharad 8346eda8b8
Integration tests: Accept github/codeql checkouts named `ql` (#1940)
Some checkouts of the github/codeql repo, such as the
internal submodule, may be named `ql` rather than
`codeql`. Allow this folder name when running tests.
2023-01-06 15:16:36 -08:00
Charis Kyriakou 2a6d581de4
Added logic to clean expanded state when it's updated (#1938) 2023-01-06 16:09:43 +00:00
Shati Patel b3fcd47930
Add integration test for database selection command (#1937) 2023-01-06 14:38:28 +00:00
Charis Kyriakou 51d1d3226c Remove unnecessary type casting 2023-01-06 12:57:23 +00:00
Charis Kyriakou d69a048a38 Handle all db item kinds when checking for equality with expanded items 2023-01-06 12:57:19 +00:00
Charis Kyriakou 971fb6edee Rename updateItemInExpandedState -> updateExpandedItem and replaceItemInExpandedState -> replaceExpandedItem 2023-01-06 12:57:12 +00:00
Elena Tanasoiu 13db377334
Merge pull request #1931 from github/elena/ignore-prettier-commits
Move list of ignored commits to root
2023-01-06 09:37:28 +00:00
Andrew Eisenberg 0959cb8bbd Remove assertion in tests
I am removing these assertions so that our internal integration tests
can pass. They are currently failing because the number of dependencies
of the `codeql/javascript-all` pack has changed. It no longer makes
sense to test this value as newer versions of this pack will have more
dependencies and we expect this value will continue to go up.
2023-01-05 16:13:13 -08:00
Elena Tanasoiu d385a9e7a4
Move list of ignored commits to root
This was initially added [here][1] but wasn't quite in the right place
to have the intended effect.

Let's move it up to the root of the project.

[1]: f515663640
2023-01-05 17:37:41 +00:00
Charis Kyriakou 1c705da444
Add 'rename' context menu action for dbs/lists (#1928) 2023-01-05 13:29:10 +00:00
Shati Patel 4dba169412
Support new DB config format in "copy repo list" function (#1927) 2023-01-05 10:56:55 +00:00
Charis Kyriakou db9bc5bf5c Add db and list rename functionality to db config store 2023-01-04 15:59:14 +00:00
Charis Kyriakou 3227935078
Minor refactoring of the db config store and tests (#1924)
* Remove unnecessary type castings
* Extract validation to separate functions
* Nest tests inside a 'describe' block
2023-01-04 13:11:26 +00:00
Shati Patel 0902e187c8
Add context menu command to open repo/owner on GitHub (#1921) 2023-01-04 10:44:48 +00:00
Charis Kyriakou a82f40fb1e Remove unnecessary config check.
This used to be valid when expanded state lived in the db config, but it's now stored in workspace storage.
2023-01-04 09:28:16 +00:00
Charis Kyriakou 4db3cd6b1b Extract setExpandedItems function so that it can be re-used 2023-01-04 09:10:04 +00:00
Charis Kyriakou abe5b3c0fc Rename getCurrentExpandedItems -> getExpandedItems 2023-01-04 09:08:21 +00:00
Charis Kyriakou 7738041ee7 Nest tests inside a 'describe' block 2023-01-04 09:07:42 +00:00
Charis Kyriakou f3d0773085 Rename calculateNewExpandedState -> updateItemInExpandedState 2023-01-04 09:06:31 +00:00
Charis Kyriakou 1a08ae4df2 Move db item expansion models to db-item-expansion 2023-01-04 09:05:12 +00:00
dependabot[bot] 5e864ae8e0
Bump json5 from 1.0.1 to 1.0.2 in /extensions/ql-vscode (#1919)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 10:10:38 -08:00
dependabot[bot] f716032235
Bump d3-color and d3-graphviz in /extensions/ql-vscode (#1915)
Bumps [d3-color](https://github.com/d3/d3-color) to 3.1.0 and updates ancestor dependency [d3-graphviz](https://github.com/magjac/d3-graphviz). These dependencies need to be updated together.


Updates `d3-color` from 1.4.1 to 3.1.0
- [Release notes](https://github.com/d3/d3-color/releases)
- [Commits](https://github.com/d3/d3-color/compare/v1.4.1...v3.1.0)

Updates `d3-graphviz` from 2.6.1 to 5.0.2
- [Release notes](https://github.com/magjac/d3-graphviz/releases)
- [Changelog](https://github.com/magjac/d3-graphviz/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magjac/d3-graphviz/compare/v2.6.1...v5.0.2)

---
updated-dependencies:
- dependency-name: d3-color
  dependency-type: indirect
- dependency-name: d3-graphviz
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 10:09:58 -08:00
Charis Kyriakou 8e848e3403
Set db tree item context value to drive actions (#1920) 2023-01-03 16:17:51 +00:00
Nora 306529b4a9 Add command to activationEvents 2023-01-03 15:10:02 +00:00
Nora 48a51fe10b Add select context menu 2023-01-03 13:34:50 +00:00
Charis Kyriakou bbbbb3a1ee
Renamed selectable context value (#1917) 2023-01-03 12:34:24 +00:00
Charis Kyriakou bbdbe01e03
Add test tsconfigs in eslint projects (#1916) 2023-01-03 12:17:17 +00:00
Charis Kyriakou 35d1d8ba6e
Move VS Code integration tests to /test directory (#1912) 2023-01-03 10:31:38 +00:00
Charis Kyriakou a7be6cf31a
Fix broken unit test that relies on date (#1914) 2023-01-03 09:26:13 +00:00
Charis Kyriakou 40a7dd04fb
Tidy up unit test suite file structure (#1910) 2022-12-23 14:23:55 +00:00
Charis Kyriakou 24a7348fc2
Add support for adding local lists (#1907) 2022-12-23 11:11:48 +00:00
Charis Kyriakou 31b80efc56
Use constant for selected db item resource uri (#1908) 2022-12-23 08:34:16 +00:00
Charis Kyriakou 3234f0afe1
Move db item expanded state to workspace storage (#1904) 2022-12-22 15:44:00 +00:00
Elena Tanasoiu ae0dfd8089
Merge pull request #1901 from github/elena/move-test-scenarios-into-markdown
Move test plan into markdown file
2022-12-22 14:32:08 +00:00
Elena Tanasoiu 1a6f532c8b
Change results view title 2022-12-22 14:15:21 +00:00
Elena Tanasoiu beb5e37f3a
American spelling 2022-12-22 14:14:59 +00:00
Elena Tanasoiu 9fe4c8cfa9
Remove copy section 2022-12-22 14:14:35 +00:00
Shati Patel 9e1da8f142
Check for duplicate repo within parent list (#1905) 2022-12-22 14:01:11 +00:00
Elena Tanasoiu f1b17d1c46
Fix wonky indentation 2022-12-22 12:54:24 +00:00
Elena Tanasoiu 097c048edd
Expand results view tests 2022-12-22 12:49:14 +00:00
Elena Tanasoiu 531f32c1f6
Expand query results scenarios based on variant analysis state 2022-12-22 12:49:10 +00:00
Nora 46a54a623a
Merge pull request #1900 from github/nora/add-repo-to-list
Add new repositories to a highlighted user defined list
2022-12-22 13:41:27 +01:00
Elena Tanasoiu 1b76159c06
Fix quotes 2022-12-22 11:35:22 +00:00
Elena Tanasoiu 30e614e26d
Remove duplicate test case 2022-12-22 11:31:21 +00:00
Elena Tanasoiu 8ca9391115
Mention what "it" means 2022-12-22 11:28:55 +00:00
Elena Tanasoiu ec8066a11c
Clarify these are mostly aimed at MRVA 2022-12-22 11:28:01 +00:00
Elena Tanasoiu ac27a80769
Drop numbering 2022-12-22 11:27:06 +00:00
Elena Tanasoiu c9087ffaf0
Update screenshot 2022-12-22 11:26:18 +00:00
Robert 25dd679b7d
Merge pull request #1892 from github/robertbrignull/undefined_credentials
Simplify the credentials class, and clear up impossible error cases
2022-12-22 11:20:09 +00:00
Elena Tanasoiu 16c688f9c8
Change to american spelling 2022-12-22 11:15:49 +00:00
Elena Tanasoiu 0f3936900c
Remove pre-live-results sections 2022-12-22 11:15:15 +00:00
Elena Tanasoiu 3c9c6dc324
Rephrase ... erm ... phrases
And fix a typo
2022-12-22 11:14:10 +00:00
Elena Tanasoiu f11cd17f83
Check these when query starts instead of completes 2022-12-22 11:10:05 +00:00
Nora 824f56d614 use find and remove unneccessary checks 2022-12-22 10:53:54 +00:00
Elena Tanasoiu eddc228a00
Remove bullet points and mention results view 2022-12-22 10:48:36 +00:00
Elena Tanasoiu 812205cecf
Clarify that test cases are for MRVA 2022-12-22 10:45:59 +00:00
Elena Tanasoiu a839206846
Mention canary flag as pre-requisite for MRVA 2022-12-22 10:45:22 +00:00
Elena Tanasoiu 2f07f417fa
Move last step to first step in release requirements 2022-12-22 10:43:31 +00:00
Elena Tanasoiu dc6bd07518
Add more info to release steps 2022-12-22 10:43:08 +00:00
Elena Tanasoiu e890e6cc1f
Remove "Areas to consider" section 2022-12-22 10:32:26 +00:00
Robert 6285ba7632 fix typos 2022-12-22 10:25:34 +00:00
Koen Vlaswinkel be79d68271
Merge pull request #1891 from github/koesie10/sort-gist-files
Sort Gist files by user-defined sort order
2022-12-22 09:17:07 +01:00
Charis Kyriakou 19a9ad38d5
Add workspace state to app container (#1902) 2022-12-21 17:58:34 +00:00
Elena Tanasoiu 1e84bc9116
Move test plan into VSCode markdown file
This moves our existing test plan under a "Required testing" section.

We're also adding the scenarios used for testing live results under an "Optional testing" section.
2022-12-21 16:55:33 +00:00
Nora 28abd40963 Add repo to list when child is highlighted 2022-12-21 15:45:19 +00:00
Robert abc025cb39 Inline the createOctokit method
It's now only used from one place and inlining it doesn't make
getOctokit too long to be unclear.
2022-12-21 15:01:47 +00:00
Robert 551f76cc4e Create a new octokit instance every time
I believe this doesn't change the user-visible behaviour at all. The user
won't be prompted to log in any more or less often than they would have
done before.

One benefit of this is that we can remove the registerListeners method
because we no longer need to know if the cached octokit is still valid.
Instead we just call vscode.authentication.getSession every time and it
will return the current session, which might be different from the last
time we called it. This might prompt the user to log in, but that would
have happened anyway because when the session changed we would have
overwritten our cached octokit instance.

Another benefit is that we no longer need the extension context and this
removed a surprisingly large amount of code where we are passing this
parameter around because we need it for the credentials.

The only downside I can see is that we call getSession more often and
create more javascript objects in general. I believe the performance
impact of this will be negligible and not worth worrying about.
2022-12-21 15:01:42 +00:00
Robert 8f34f6af2e Remove the createIfNone parameter from createOctokit
At this point we are only ever passing true, so we may as well remove
the parameter and simplify the code.
2022-12-21 14:52:25 +00:00
Robert 8c05b3a508 Don't try to pre-populate an octokit
I argue that calling createOctokit(false) adds no benefit. If an
authenticated session already exists then this silently create an
octokit, which makes getOctokit() a no-op just returning the field.
However if there is already an authenticated session then getOctokit()
would already be able to create an octokit without prompting the user.

On the other hand if there isn't an authenticated session then we
won't be able to pre-populate an octokit, so getOctokit() will have
to prompt the user anyway.

Not calling createOctokit(false) in registerListeners also doesn't
change behaviour. If the user is authenticated in the new session then
we would be able to create an octokit instance wihtout prompting in
getOctokit anyway. If the user is not authenticated in the new session
then we won't be able to create an instance without prompting either way.

The only benefit I can think of is that it moves a tiny amount of
computation earlier in the pipeline, but the amount of computation is
tiny and it isn't any more async than it would be if it happened in
getOctokit(). I don't think this is worth making the code more complex.
2022-12-21 14:51:13 +00:00
Robert 74f10a306e Remove the overrideToken parameter from createOctokit
This was only used from initializeWithToken and only added a completely
separate case to the start of the method, effectively turning it into
two separate implementations. Therefore we can make things simpler by
inlining this case in the one place it is used.
2022-12-21 14:27:50 +00:00
Robert 7e8ce35485 Remove the requiresAuthentication parameter
It is true by default and no place in the codebase sets it to false. We can
simplify the code by removing this case we aren't using. If we want this
behaviour in the future we can always implement it again, but I think it's
likely to be unnecessary and if you don't want authenticated requests then
you likely won't be initializing a Credentials object.
2022-12-21 14:24:13 +00:00
Nora 758c182a33 Add repo to highlighted list 2022-12-21 15:23:09 +01:00
Robert 0c483d1e29 Remove places where we are checking if credentials are undefined
This cannot happen already, even before the other changes in this PR.
The Credentials.initialize method can never return undefined, so these
checks would never return true. The real place that checks that we are
authenticated is in the vscode.authentication.getSession method, and
it will reject the promise if the user declines to authenticate or
anything else means we can't get an authenticated session.

I feel justified in removing the tests for these cases because the
code was never actually called in production, and we are covered by the
vscode authentication library rejecting the promise. Any exception
thrown from Credentials.initialize would behave the same as the one I'm
deleting.
2022-12-21 14:23:08 +00:00
Charis Kyriakou 2493b0fd3c
Handle db validation errors gracefully (#1895) 2022-12-21 12:53:47 +00:00
Charis Kyriakou dbdb4ba57a
Stop user from adding a db or owner with the same name (#1893) 2022-12-21 10:51:24 +00:00
Charis Kyriakou 47ac9c631e Add basic integration test for 'add db' functionality 2022-12-20 20:42:14 +00:00
Charis Kyriakou decbd52d1b Rename 'addNewRemoteList' to 'addNewList' 2022-12-20 20:40:58 +00:00
shati-patel eb3ba1e229
Merge branch 'main' into shati-nora/add-remote-repositories 2022-12-20 16:13:00 +00:00
Shati Patel 5a3248647b
Get highlighted item in DB panel (#1887) 2022-12-20 16:00:45 +00:00
Charis Kyriakou 4b43b9a140
Use ✓ for db item selection (#1890) 2022-12-20 15:00:03 +00:00
Nora 467d43c68c Implement refactor merge comments 2022-12-20 12:58:50 +00:00
Koen Vlaswinkel fe7d14b136 Sort Gist files by user-defined sort order
This will sort the files in an exported Gist by the user-defined sort
order. It does so by prefixing the files with `result-{index}-` where
the `index` is the 1-based index of the repository in the sort order.
It will automatically pad the index with leading zeros to ensure that
the files are sorted in the correct order.

Unfortunately, we can't just use `{index}-` because numbers sort before
the `_` character, which is used in the summary filename to place it
first.

There are also some changes in how we determine which repositories to
export since we need to know in advance how many zeroes we need to pad
the index with. There should be no functional changes in which
repositories are actually exported.
2022-12-20 13:51:22 +01:00
Nora f332e6145a Implement addNewDatabase 2022-12-20 11:01:48 +00:00
Nora 7241e317af Move helper to new file and minor refactor 2022-12-20 10:19:42 +00:00
Charis Kyriakou 22ec4b0b6a
Don't allow empty list names (#1886) 2022-12-19 11:59:53 +00:00
Andrew Eisenberg 0bf1fae2fe Remove LGTM references and commands
LGTM has been decommissioned. All code and tests for downloading
LGTM databases should be removed.
2022-12-16 09:58:24 -08:00
Charis Kyriakou 8971bee31d
Add basic integration test for 'add db list' functionality (#1881) 2022-12-16 14:44:53 +00:00
Koen Vlaswinkel c6c6d55bed Add Storybook story for many results performance 2022-12-16 13:28:59 +01:00
Nora 2b1a2cddb1
Merge pull request #1880 from github/nora/move-db-config-factories
Move DbConfig Factories to src directory
2022-12-16 10:05:01 +01:00
Nora 0c2e15a176 Use factory in db tree creator 2022-12-15 14:56:26 +00:00
Nora 1aebd895b1 Use factory in db panel test 2022-12-15 14:53:36 +00:00
Nora 8665a81ec1 Move factory to src 2022-12-15 14:52:51 +00:00
Shati Patel fecefe4468
Add unit tests to check `codeQLDatabasesExperimental.configError` value (#1876) 2022-12-15 13:07:17 +00:00
Charis Kyriakou 727da3d78c
Add logging around db config loading (#1875) 2022-12-15 12:21:20 +00:00
Charis Kyriakou 468c4a2539
Add logger to the app container (#1874) 2022-12-15 11:28:38 +00:00
Shati Patel 18423ca518
Hide DB panel UI actions when config is broken/undefined (#1866) 2022-12-15 10:50:13 +00:00
Charis Kyriakou 091d793f13
Stop user from adding a db list with the same name (#1873) 2022-12-15 09:21:54 +00:00
Charis Kyriakou b1bf82d432
Enable awaitWriteFinish for the db config file watcher (#1872) 2022-12-14 15:25:34 +00:00
Charis Kyriakou 602289eb6d
Add validation for duplicate names in the db config (#1867) 2022-12-14 12:51:46 +00:00
Shati Patel bce5d420d6
Bump CLI version to 2.11.6 for integration tests (#1869) 2022-12-13 18:15:49 +00:00
Charis Kyriakou dc2e17d2f9
Add min length constraints to various properties in the db config schema (#1868) 2022-12-13 17:29:02 +00:00
Nora b2285499a3
Merge pull request #1860 from github/nora/show-error-empty-list
Show error message when running query on empty list
2022-12-13 17:48:18 +01:00
Shati Patel 5ba2a5af1d
Merge pull request #1865 from github/shati-patel/gh-nwo
Extract github nwo helper functions
2022-12-13 15:35:56 +00:00
Nora 0f1881d2bc Merge comments 2022-12-13 15:12:57 +00:00
Charis Kyriakou e18a33074c
Update ValueResult to have generic error type (#1861) 2022-12-13 14:15:52 +00:00
Robert 3b197a21e7
Merge pull request #1864 from github/version/bump-to-v1.7.8
Bump version to v1.7.8
2022-12-13 14:13:12 +00:00
Charis Kyriakou e987a3535d
Fix executeCommand to pass arguments correctly (#1863) 2022-12-13 13:12:10 +00:00
robertbrignull 060b7c6099 Bump version to v1.7.8 2022-12-13 13:10:27 +00:00
shati-patel 674a126078
Extract github nwo helper functions 2022-12-13 12:58:46 +00:00
Robert 578ffe0e2f v1.7.7 2022-12-13 11:55:42 +00:00
Robert 1e76e583c7 Make live results enabled for everyone 2022-12-13 11:08:39 +00:00
Nora ed9592c2d7
Update extensions/ql-vscode/src/vscode-tests/no-workspace/remote-queries/repository-selection.test.ts
Co-authored-by: Robert <robertbrignull@github.com>
2022-12-13 11:37:12 +01:00
Shati Patel 25b9aeba8e
DB panel: "Add list" command (#1851) 2022-12-13 09:54:00 +00:00
Nora 35ce928068 Show error message when running query on empty list 2022-12-13 09:53:07 +00:00
Charis Kyriakou e521112f3e
Add db config factory function and use it in tests (#1859) 2022-12-13 08:36:37 +00:00
Charis Kyriakou 216faee279
Db module init tidy up (#1858) 2022-12-12 11:59:57 +00:00
Koen Vlaswinkel e2e4879548 Merge remote-tracking branch 'origin/main' into koesie10/typecheck-everything 2022-12-12 10:14:50 +01:00
Koen Vlaswinkel cac7c3ae4e Simplify `gulpfile.ts/tsconfig.json`
The `tsconfig.json` inside `gulpfile.ts` needs to match the root
`tsconfig.json`, so by making it extend the root `tsconfig.json` and
changing just the options which decide which files are included, we can
remove a lot of duplication.
2022-12-12 10:13:58 +01:00
Charis Kyriakou 7dedfca369
Properly track collapsed/expanded events (#1856) 2022-12-12 09:00:19 +00:00
Charis Kyriakou 1a0d88135d
Add executeCommand to app container (#1857) 2022-12-09 17:12:25 +00:00
Nora ed76b46fa5
Merge pull request #1853 from github/nora/test-factories-dbitem
Create and use more factories for DbItem creation
2022-12-09 14:27:29 +01:00
Nora 1dc69a125b
Merge pull request #1848 from github/nora/db-module-initialization
Initialize DbManager when newQueryRun is enabled
2022-12-09 14:21:50 +01:00
Nora 35f582b731 Implement merge comments 2022-12-09 12:53:40 +00:00
Nora e7bab9207d Remove unused checks 2022-12-09 09:59:59 +00:00
Koen Vlaswinkel 3bd61ae1a6 Merge remote-tracking branch 'origin/main' into koesie10/upgrade-vsce 2022-12-09 10:36:02 +01:00
Angela P Wen 698b6ad0e4
Bump CLI version to 2.11.5 for integration tests (#1855) 2022-12-09 09:33:29 +00:00
Nora 33ef89a28c Use new factories 2022-12-09 10:16:49 +01:00
Nora a9b2aec353 Create missing factories and test adjustment 2022-12-09 10:16:49 +01:00
Koen Vlaswinkel 1cb0b0b6cb Replace vsce by @vscode/vsce
The `vsce` package has been replaced by `@vscode/vsce`, as announced
in the VSCode 1.74.0 release notes. There should be no functional
changes between 2.7.0 and 2.15.0 for our use case.

See: https://code.visualstudio.com/updates/v1_74#_renaming-of-vsce-to-vscodevsce
2022-12-09 09:48:27 +01:00
Koen Vlaswinkel 3346bd48cb Merge remote-tracking branch 'origin/main' into koesie10/variant-analysis-remove-item-tests 2022-12-09 09:47:46 +01:00
Koen Vlaswinkel 484c7db8c5 Use `Proxy` for `_VSCODE_NODE_MODULES`
Instead of deleting the complete `_VSCODE_NODE_MODULES` object, we now
use a `Proxy` to intercept the `_isMockFunction` property. This is safer
and will not delete a global variable that VSCode expects to exist.
2022-12-08 18:47:03 +01:00
Koen Vlaswinkel 691121d7c7 Restructure `handleRemoveHistoryItem` tests
This will restructure the `handleRemoveHistoryItem` tests to be more
structured and easier to read.
2022-12-08 14:01:33 +01:00
Koen Vlaswinkel 1ea3cfddb0 Fix failing tests on VSCode 1.74.0
This fixes the tests on VSCode 1.74.0. The issue is as follows:

1. Jest wil try reset all mocks after each test, as it should.
2. When Jest does this, it will loop over all global variables and check
if they are mocks.
3. One of the global variables it checks is _VSCODE_NODE_MODULES, which
is a proxy object.
4. When Jest checks whether it is a proxy by getting _isMockFunction on
it, the `get` function on the proxy object will be called.
5. This will in turn call require, which will try to load
the non-existing `_isMockFunction` module. This throws the error we are
seeing.

By removing the `_VSCODE_NODE_MODULES` property from the global object
in the Jest environment, Jest will not try to reset it, and the tests
should work again.

See: 41bf230089/packages/jest-runtime/src/index.ts (L1173-L1186)
See: ed442a9e99/src/bootstrap-amd.js (L15)
2022-12-08 11:52:45 +01:00
Koen Vlaswinkel 993b8c94d6
Merge pull request #1832 from github/koesie10/restructure-varianta-analysis-manager-tests
Restructure variant analysis manager tests
2022-12-08 10:04:19 +01:00
Koen Vlaswinkel d66e7c6198
Merge pull request #1837 from github/koesie10/fix-no-error-empty-repositories
Fix missing error message on repository selection
2022-12-07 17:57:54 +01:00
Koen Vlaswinkel 597c9c48ff
Merge pull request #1849 from github/koesie10/date-environment-variables
Add environment variables for date test
2022-12-07 17:36:29 +01:00
Koen Vlaswinkel 7fd45efed8 Merge remote-tracking branch 'origin/main' into koesie10/fix-no-error-empty-repositories 2022-12-07 17:29:44 +01:00
Koen Vlaswinkel 2e7557ba09 Run type checking on all directories in CI
This commit adds a new step to the CI workflow that runs type checking
on all directories containing `tsconfig.json` files, using `find` and
`xargs`. Unfortunately, this does not work on Windows, so on Windows
it's not possible to run all of these type checks locally.
2022-12-07 16:50:19 +01:00
Koen Vlaswinkel 0f5117ecec
Merge pull request #1828 from github/koesie10/results-loading
Add spinner when loading results
2022-12-07 16:46:20 +01:00
Koen Vlaswinkel 0ae7bb821d Extract mocking of repo states into method 2022-12-07 16:44:34 +01:00
Koen Vlaswinkel ba419dd561 Remove duplicate `describe` 2022-12-07 16:40:15 +01:00
Koen Vlaswinkel 3dd0ef50e0
Merge pull request #1846 from github/koesie10/monitor-multiple-responses-test
Add integration test for variant analysis monitor
2022-12-07 16:38:47 +01:00
Nora 1c1117f7a3 Suggestion: initialize DbManager when newQueryRun is enabled 2022-12-07 16:35:51 +01:00
Koen Vlaswinkel 4e66b62534 Add environment variables for date test
This adds the environment variables necessary for running the date test
in all of these cases:
- When running the npm script outside of VSCode (using `cross-env`)
- When using the Jest Runner "Run" option (`terminal.integrated.env.*`)
- When using the Jest Runner "Debug" option
2022-12-07 16:35:48 +01:00
Nora 572ba290b4
Merge pull request #1838 from github/charis-nora/run-mrva-against-selected-db
Use currently selected remote DB when Variant Analysis is run
2022-12-07 15:05:35 +01:00
Koen Vlaswinkel 63c2932cd9 Add integration test for variant analysis monitor
This integration test will check that the monitor will actually make
multiple requests to the API and that it will trigger a download
extension command for each repo that has finished scanning.
2022-12-07 14:49:32 +01:00
Charis Kyriakou d97eb2e76b
Track expanded state of db items (#1844) 2022-12-07 12:39:18 +00:00
Nora 323862a828 Merge comments 2022-12-07 12:57:10 +01:00
Koen Vlaswinkel 502d4236ad Add tests for removing remote queries and variant analyses
Unfortunately, one of the tests we have for local queries doesn't seem
to be working for variant analyses. I'm not sure why it isn't
working, but I think it's better to get the rest of the integration
tests in and then figure out what's going on with that one.
2022-12-07 12:30:56 +01:00
dependabot[bot] 28652a2088
Bump decode-uri-component from 0.2.0 to 0.2.2 in /extensions/ql-vscode (#1842)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 17:39:18 +01:00
dependabot[bot] 04b4d15099
Bump @xmldom/xmldom from 0.8.3 to 0.8.6 in /extensions/ql-vscode (#1843)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.6)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 17:20:19 +01:00
Shati Patel 7ef75f5971
New DB panel: Add UI command to select database item (#1840) 2022-12-06 16:00:08 +00:00
Koen Vlaswinkel 4bfefb8ebb
Merge pull request #1841 from github/koesie10/fix-monitor-await
Fix incorrect await for monitor
2022-12-06 16:30:15 +01:00
Charis Kyriakou a5fcfe7f40
Add functionality to set the selected db item (#1839) 2022-12-06 15:20:07 +00:00
Nora 7a3d5c1925 Add unit tests 2022-12-06 15:28:14 +01:00
Nora 18c3ce237e Reorder existing tests in new describe blog 2022-12-06 15:25:33 +01:00