Commit Graph

179 Commits

Author SHA1 Message Date
Koen Vlaswinkel
f57bfb6875 Add support for typed commands to CodeQL query
This adds support for detecting the `CommandManager.execute` method in
the unique command use query.

This may not be the best way to implement this. There's a method
`hasUnderlyingType` on `this.getReceiver().getType()`, but I couldn't
really figure out how to get it recognize `CommandManager`. It might be
possible if we can construct the type of `CommandManager`, but this will
probably include the filepath to the `CommandManager` class, which might
not neccessarily be something we want: moving the `CommandManager` class
should not require updating the query. I'm very happy to hear other
suggestions.
2023-03-23 13:55:52 +01:00
Andrew Eisenberg
7bc6276115 Update .github/codeql/codeql-config.yml
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2023-03-08 07:10:53 -08:00
Andrew Eisenberg
a5021dc4c9 Add security experimental queries 2023-03-08 07:08:30 -08:00
dependabot[bot]
68ce7c3b53 Bump actions/upload-artifact from 2 to 3 (#2133)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 15:03:58 +00:00
Robert
4d73e1a068 Remove getLocationOrdinal 2023-02-27 17:46:49 +00:00
Robert
6f5ac5df4f Introduce getAUse 2023-02-27 17:45:24 +00:00
Robert
4c880dfb19 Fix typos 2023-02-27 17:42:43 +00:00
Robert
ced9f60949 Add documentation 2023-02-27 16:06:38 +00:00
Robert
c0a65c994a Convert to alert only first usage, instead of all other usages 2023-02-27 15:54:38 +00:00
Robert
ead1869a7e Use PackageJson class 2023-02-27 15:30:45 +00:00
Robert
70ae7284f3 Add unique-command-use.ql 2023-02-21 11:09:15 +00:00
Koen Vlaswinkel
3917b14a58 Merge remote-tracking branch 'origin/main' into koesie10/improve-test-setup 2023-02-13 09:21:39 +01:00
Koen Vlaswinkel
6b8467fc4e Update test script names 2023-02-08 13:14:00 +00:00
Koen Vlaswinkel
483d674da1 Upload sourcemaps as release asset
This will upload the sourcemaps produced as part of the release as a
release asset. This allows the sourcemaps to be downloaded and used
for decoding stack traces beyond the 90 day artifact limit of GitHub
Actions.
2023-02-07 11:06:03 +00:00
Koen Vlaswinkel
15382a02bc Use first-party action for creating release PR
Instead of using the third party `peter-evans/create-pull-request`
action for creating a PR for releases, we can use the already present
`./.github/actions/create-pr` action which is also used for the PR for
bumping CLI versions.
2023-02-01 14:39:00 +01:00
Shati Patel
2c19b32cb3 Minor polish to the "bump CLI" automation (#1996) 2023-01-20 18:42:20 +00:00
Taj
c7f72c5aa9 Ensure cli using latest version from the supported_cli_versions.json (#1992) 2023-01-20 17:13:14 +00:00
Andrew Eisenberg
bd74b410f6 Merge pull request #1973 from github/tjgurwara99/bump-cli-extension
Modifying the `bump-cli` workflow to append/replace version from `supported_cli_versions.json`
2023-01-18 09:54:47 -08:00
Taj
f154b59b14 description for version 2023-01-18 11:10:44 +00:00
Taj
160ee22d1b combined version change and bump-cli workflow 2023-01-17 14:32:19 +00:00
Koen Vlaswinkel
7b5e5a6407 Merge pull request #1963 from github/koesie10/webpack-production-build
Use Webpack in production mode for releases
2023-01-17 09:49:59 +01:00
Taj
bfa6780529 first pass at automating appending/prepending/removing version from supported cli versions 2023-01-16 22:06:15 +00:00
Koen Vlaswinkel
b4bb1b6ad7 Upload sourcemaps for release builds
To allow us to reconstruct a stack trace, this will upload the
sourcemaps for all release builds.
2023-01-16 10:58:00 +01:00
Taj
7f05af942b Merge branch 'github:main' into main 2023-01-13 14:00:41 +00:00
Taj
91dc39b465 added the bump-cli.yml file to trigger the workflow when changed 2023-01-13 12:58:28 +00:00
dependabot[bot]
7004e94b32 Bump actions/dependency-review-action from 1 to 3 (#1897) 2022-12-21 14:32:38 +00:00
dependabot[bot]
4bb3be9fd1 Bump peter-evans/create-pull-request from 3.4.1 to 4.2.3 (#1898) 2022-12-21 14:10:45 +00:00
Shati Patel
f99e5587d0 Update dependencies in workflow files (#1896) 2022-12-21 13:54:49 +00:00
Taj
5a42b8b890 using secrets instead of actions context 2022-12-16 20:30:14 +00:00
Taj
ec9078d616 permission conf and removed deprecated use of set-output 2022-12-16 17:09:39 +00:00
Taj
2723816a5a namespacing actions branch 2022-12-16 13:40:38 +00:00
Taj
54204167b6 separation of concern of creating a PR vs code to change the version 2022-12-16 13:12:19 +00:00
Taj
3f39af2840 workflow to automatically bump cli version if different from the current version 2022-12-14 00:01:36 +00:00
Shati Patel
bce5d420d6 Bump CLI version to 2.11.6 for integration tests (#1869) 2022-12-13 18:15:49 +00:00
Koen Vlaswinkel
e2e4879548 Merge remote-tracking branch 'origin/main' into koesie10/typecheck-everything 2022-12-12 10:14:50 +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
Koen Vlaswinkel
8205b19125 Upgrade actions/upload-artifact to v3
This upgrades the action to remove a deprecation warning about Node 12.
2022-12-07 17:44: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
68de9f09e4 Disable fail-fast for CLI integration tests 2022-11-25 18:37:15 +01:00
Shati Patel
f6613867d3 Bump CLI version to 2.11.4 for integration tests (#1794) 2022-11-25 11:40:28 +00:00
Koen Vlaswinkel
1c820b4812 Switch from npm install to npm ci in CI 2022-11-23 10:44:45 +01:00
Koen Vlaswinkel
d215c7e2de Split workflow run into more jobs
The unit tests and linting is now run separately, which will hopefully
speed up the time it takes for the integration tests to complete.
2022-11-23 10:19:34 +01:00
Shati Patel
7e8fa5c5fe Bump CLI version to 2.11.3 for integration tests (#1752) 2022-11-11 14:35:37 +00:00
Andrew Eisenberg
082d4b8c78 Uses newer actions versions and avoids set-output
`set-output` is deprecated:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-11-07 16:20:29 -08:00
Angela P Wen
77c28e0453 v1.7.3 (#1675)
Some checks failed
Release / Release (push) Has been cancelled
Release / Publish to VS Code Marketplace (push) Has been cancelled
Release / Publish to Open VSX Registry (push) Has been cancelled
2022-10-28 23:11:00 +00:00
Andrew Eisenberg
a3fafc8e59 Merge pull request #1611 from github/aeisenberg/fix-flakes
Test cleanups
2022-10-25 08:26:26 -07:00
Shati Patel
78a0a4e580 Bump CLI version to 2.11.2 for integration tests 2022-10-25 11:30:04 +01:00
Koen Vlaswinkel
104055e703 Add linter for scenario files
This adds a linter for JSON scenario files which will validate the JSON
files in the scenarios directory against the TypeScript types. It will
convert the TypeScript types to JSON schema to simplify this process.

Unfortunately, this will not currently allow adding scenarios with
failing requests since the types do not allow this. Rather than removing
this validation, we should fix the types. This can be done in a follow-up
PR.
2022-10-21 16:41:01 +02:00
Andrew Eisenberg
ccdffc296c Merge branch 'main' into aeisenberg/fix-flakes 2022-10-20 17:07:39 -07:00
Andrew Eisenberg
c85ef15d9e Test cleanups
- Avoid Installing `xvfb` since it is already available.
- Ensure `supportsNewQueryServer()` takes the CLI version into account
- Always run the new query server tests on v2.11.1 and later
- Avoid printing directory contents in `run-remote-query-tests`
- Run tests with `--disable-workspace-trust` to avoid a non-fatal error
  being thrown from the dialog service.
- Ensure the exit code of the extension host while running integration
  tests is the exit code of the actual process. Otherwise, there is
  a possibility that an error exit code is swallowed up and ignored.
- Remove a duplicate unhandledRejection handler.
- Handle Exit code 7 from windows. This appears to be a failure on
  exiting and unrelated to the tests.
- Fix handling of configuration in tests:
    1. It is not possible to update a configuration setting for internal
       settings like `codeql.canary`.
    2. On windows CI, updating configuration after global teardown. So,
       on tests avoid resetting test configuration when tests are over.

Also, I tried to remove all those pesky errors in the logs like:

> [2094:1017/235357.424002:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

I was following advice from here, but I can't get it working.

- https://github.com/microsoft/vscode-test/issues/127
- https://github.com/electron/electron/issues/31981
2022-10-18 16:25:35 -07:00