Skip to content

Commit

Permalink
Run version ~0.2.0 of the ML-powered query pack for v2.8.4+ of the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Mar 31, 2022
1 parent 2c03704 commit e26813c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
2 changes: 2 additions & 0 deletions lib/config-utils.test.js

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

2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions lib/util.js

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

2 changes: 1 addition & 1 deletion lib/util.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1837,3 +1837,12 @@ test(
"security-and-quality",
process.platform === "win32" ? undefined : "0.0.1"
);
// Test that the ~0.2.0 version of ML-powered queries is run on v2.8.4 of the CLI.
test(
mlPoweredQueriesMacro,
"2.8.4",
true,
undefined,
"security-extended",
process.platform === "win32" ? undefined : "~0.2.0"
);
6 changes: 4 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,11 @@ export const ML_POWERED_JS_QUERIES_PACK_NAME =
* queries beta.
*/
export async function getMlPoweredJsQueriesPack(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_codeQL: CodeQL
codeQL: CodeQL
): Promise<PackWithVersion> {
if (await codeQlVersionAbove(codeQL, "2.8.4")) {
return { packName: ML_POWERED_JS_QUERIES_PACK_NAME, version: "~0.2.0" };
}
return { packName: ML_POWERED_JS_QUERIES_PACK_NAME, version: "~0.1.0" };
}

Expand Down

0 comments on commit e26813c

Please sign in to comment.