Skip to content

Commit ffc3d40

Browse files
committed
Merge branch 'main' into alexet/prepare-new-qs
2 parents e5fe214 + 8c7c197 commit ffc3d40

108 files changed

Lines changed: 49217 additions & 33495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
"runtimeArgs": [
3636
"--inspect=9229"
3737
],
38+
"env": {
39+
"LANG": "en-US"
40+
},
3841
"args": [
3942
"--exit",
4043
"-u",
@@ -43,13 +46,27 @@
4346
"--diff",
4447
"-r",
4548
"ts-node/register",
49+
"-r",
50+
"test/mocha.setup.js",
4651
"test/pure-tests/**/*.ts"
4752
],
4853
"stopOnEntry": false,
4954
"sourceMaps": true,
5055
"console": "integratedTerminal",
5156
"internalConsoleOptions": "neverOpen"
5257
},
58+
{
59+
"name": "Launch Unit Tests - React (vscode-codeql)",
60+
"type": "node",
61+
"request": "launch",
62+
"program": "${workspaceFolder}/extensions/ql-vscode/node_modules/.bin/jest",
63+
"showAsyncStacks": true,
64+
"cwd": "${workspaceFolder}/extensions/ql-vscode",
65+
"stopOnEntry": false,
66+
"sourceMaps": true,
67+
"console": "integratedTerminal",
68+
"internalConsoleOptions": "neverOpen"
69+
},
5370
{
5471
"name": "Launch Integration Tests - No Workspace (vscode-codeql)",
5572
"type": "extensionHost",

.vscode/settings.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
"typescript",
3131
"typescriptreact"
3232
],
33-
"eslint.options": {
34-
// This is necessary so that eslint can properly resolve its plugins
35-
"resolvePluginsRelativeTo": "./extensions/ql-vscode"
36-
},
33+
// This is necessary to ensure that ESLint can find the correct configuration files and plugins.
34+
"eslint.workingDirectories": ["./extensions/ql-vscode"],
3735
"editor.formatOnSave": false,
3836
"typescript.preferences.quoteStyle": "single",
3937
"javascript.preferences.quoteStyle": "single",
40-
"editor.wordWrapColumn": 100
38+
"editor.wordWrapColumn": 100,
39+
"jest.rootPath": "./extensions/ql-vscode"
4140
}

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
**/* @github/codeql-vscode-reviewers
22
/extensions/ql-vscode/src/remote-queries/ @github/code-scanning-secexp-reviewers
3+
/extensions/ql-vscode/src/view/remote-queries/ @github/code-scanning-secexp-reviewers
4+
/extensions/ql-vscode/src/view/variant-analysis/ @github/code-scanning-secexp-reviewers

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ From inside of VSCode, open the `launch.json` file and in the _Launch Integratio
160160
* **IMPORTANT** Make sure you are on the `main` branch and your local checkout is fully updated when you add the tag.
161161
* If you accidentally add the tag to the wrong ref, you can just force push it to the right one later.
162162
1. Monitor the status of the release build in the `Release` workflow in the Actions tab.
163+
* DO NOT approve the "publish" stages of the workflow yet.
163164
1. Download the VSIX from the draft GitHub release at the top of [the releases page](https://github.com/github/vscode-codeql/releases) that is created when the release build finishes.
164165
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
165166
or look at the source if there's any doubt the right code is being shipped.

extensions/ql-vscode/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
node: true,
1111
es6: true,
1212
},
13-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
13+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jest-dom/recommended"],
1414
rules: {
1515
"@typescript-eslint/no-use-before-define": 0,
1616
"@typescript-eslint/no-unused-vars": [

extensions/ql-vscode/CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
## [UNRELEASED]
44

5-
- Removed the ability to manually upgrade databases from the context menu on databases. Databases are non-destructively upgraded automatically so
6-
for most users this was not needed. For advanced users this is still available in the Command Palette. [#1501](https://github.com/github/vscode-codeql/pull/1501)
5+
## 1.7.0 - 20 September 2022
6+
7+
- Remove ability to download databases from LGTM. [#1467](https://github.com/github/vscode-codeql/pull/1467)
8+
- Removed the ability to manually upgrade databases from the context menu on databases. Databases are non-destructively upgraded automatically so for most users this was not needed. For advanced users this is still available in the Command Palette. [#1501](https://github.com/github/vscode-codeql/pull/1501)
9+
- Always restart the query server after a manual database upgrade. This avoids a bug in the query server where an invalid dbscheme was being retained in memory after an upgrade. [#1519](https://github.com/github/vscode-codeql/pull/1519)
710

811
## 1.6.12 - 1 September 2022
912

@@ -19,7 +22,7 @@ No user facing changes.
1922

2023
No user facing changes.
2124

22-
## 1.6.9 - 20 July 2022
25+
## 1.6.9 - 20 July 2022
2326

2427
No user facing changes.
2528

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property and type check, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
module.exports = {
7+
// All imported modules in your tests should be mocked automatically
8+
// automock: false,
9+
10+
// Stop running tests after `n` failures
11+
// bail: 0,
12+
13+
// The directory where Jest should store its cached dependency information
14+
// cacheDirectory: "/private/var/folders/6m/1394pht172qgd7dmw1fwjk100000gn/T/jest_dx",
15+
16+
// Automatically clear mock calls, instances, contexts and results before every test
17+
// clearMocks: true,
18+
19+
// Indicates whether the coverage information should be collected while executing the test
20+
// collectCoverage: false,
21+
22+
// An array of glob patterns indicating a set of files for which coverage information should be collected
23+
// collectCoverageFrom: undefined,
24+
25+
// The directory where Jest should output its coverage files
26+
// coverageDirectory: undefined,
27+
28+
// An array of regexp pattern strings used to skip coverage collection
29+
// coveragePathIgnorePatterns: [
30+
// "/node_modules/"
31+
// ],
32+
33+
// Indicates which provider should be used to instrument code for coverage
34+
coverageProvider: 'v8',
35+
36+
// A list of reporter names that Jest uses when writing coverage reports
37+
// coverageReporters: [
38+
// "json",
39+
// "text",
40+
// "lcov",
41+
// "clover"
42+
// ],
43+
44+
// An object that configures minimum threshold enforcement for coverage results
45+
// coverageThreshold: undefined,
46+
47+
// A path to a custom dependency extractor
48+
// dependencyExtractor: undefined,
49+
50+
// Make calling deprecated APIs throw helpful error messages
51+
// errorOnDeprecated: false,
52+
53+
// The default configuration for fake timers
54+
// fakeTimers: {
55+
// "enableGlobally": false
56+
// },
57+
58+
// Force coverage collection from ignored files using an array of glob patterns
59+
// forceCoverageMatch: [],
60+
61+
// A path to a module which exports an async function that is triggered once before all test suites
62+
// globalSetup: undefined,
63+
64+
// A path to a module which exports an async function that is triggered once after all test suites
65+
// globalTeardown: undefined,
66+
67+
// A set of global variables that need to be available in all test environments
68+
// globals: {},
69+
70+
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
71+
// maxWorkers: "50%",
72+
73+
// An array of directory names to be searched recursively up from the requiring module's location
74+
// moduleDirectories: [
75+
// "node_modules"
76+
// ],
77+
78+
// An array of file extensions your modules use
79+
moduleFileExtensions: [
80+
'js',
81+
'mjs',
82+
'cjs',
83+
'jsx',
84+
'ts',
85+
'tsx',
86+
'json'
87+
],
88+
89+
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
90+
'moduleNameMapper': {
91+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/test/__mocks__/fileMock.ts',
92+
'\\.(css|less)$': '<rootDir>/test/__mocks__/styleMock.ts'
93+
},
94+
95+
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
96+
// modulePathIgnorePatterns: [],
97+
98+
// Activates notifications for test results
99+
// notify: false,
100+
101+
// An enum that specifies notification mode. Requires { notify: true }
102+
// notifyMode: "failure-change",
103+
104+
// A preset that is used as a base for Jest's configuration
105+
preset: 'ts-jest',
106+
107+
// Run tests from one or more projects
108+
// projects: undefined,
109+
110+
// Use this configuration option to add custom reporters to Jest
111+
// reporters: undefined,
112+
113+
// Automatically reset mock state before every test
114+
// resetMocks: false,
115+
116+
// Reset the module registry before running each individual test
117+
// resetModules: false,
118+
119+
// A path to a custom resolver
120+
// resolver: undefined,
121+
122+
// Automatically restore mock state and implementation before every test
123+
// restoreMocks: false,
124+
125+
// The root directory that Jest should scan for tests and modules within
126+
// rootDir: undefined,
127+
128+
// A list of paths to directories that Jest should use to search for files in
129+
// roots: [
130+
// "<rootDir>"
131+
// ],
132+
133+
// Allows you to use a custom runner instead of Jest's default test runner
134+
// runner: "jest-runner",
135+
136+
// The paths to modules that run some code to configure or set up the testing environment before each test
137+
// setupFiles: [],
138+
139+
// A list of paths to modules that run some code to configure or set up the testing framework before each test
140+
setupFilesAfterEnv: ['<rootDir>/test/jest.setup.ts'],
141+
142+
// The number of seconds after which a test is considered as slow and reported as such in the results.
143+
// slowTestThreshold: 5,
144+
145+
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
146+
// snapshotSerializers: [],
147+
148+
// The test environment that will be used for testing
149+
testEnvironment: 'jsdom',
150+
151+
// Options that will be passed to the testEnvironment
152+
// testEnvironmentOptions: {},
153+
154+
// Adds a location field to test results
155+
// testLocationInResults: false,
156+
157+
// The glob patterns Jest uses to detect test files
158+
testMatch: [
159+
'**/__tests__/**/*.[jt]s?(x)'
160+
],
161+
162+
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
163+
// testPathIgnorePatterns: [
164+
// "/node_modules/"
165+
// ],
166+
167+
// The regexp pattern or array of patterns that Jest uses to detect test files
168+
// testRegex: [],
169+
170+
// This option allows the use of a custom results processor
171+
// testResultsProcessor: undefined,
172+
173+
// This option allows use of a custom test runner
174+
// testRunner: "jest-circus/runner",
175+
176+
// A map from regular expressions to paths to transformers
177+
transform: {
178+
'^.+\\.tsx?$': [
179+
'ts-jest',
180+
{
181+
tsconfig: 'src/view/tsconfig.spec.json',
182+
},
183+
],
184+
'node_modules': [
185+
'babel-jest',
186+
{
187+
presets: [
188+
'@babel/preset-env'
189+
],
190+
plugins: [
191+
'@babel/plugin-transform-modules-commonjs',
192+
]
193+
}
194+
]
195+
},
196+
197+
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
198+
'transformIgnorePatterns': [
199+
// These use ES modules, so need to be transformed
200+
'node_modules/(?!(?:@vscode/webview-ui-toolkit|@microsoft/.+|exenv-es6)/.*)'
201+
],
202+
203+
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
204+
// unmockedModulePathPatterns: undefined,
205+
206+
// Indicates whether each individual test should be reported during the run
207+
// verbose: undefined,
208+
209+
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
210+
// watchPathIgnorePatterns: [],
211+
212+
// Whether to use watchman for file crawling
213+
// watchman: true,
214+
};

0 commit comments

Comments
 (0)