Skip to content

Commit e26813c

Browse files
committed
Run version ~0.2.0 of the ML-powered query pack for v2.8.4+ of the CLI
1 parent 2c03704 commit e26813c

File tree

6 files changed

+21
-7
lines changed

6 files changed

+21
-7
lines changed

lib/config-utils.test.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/util.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config-utils.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,3 +1837,12 @@ test(
18371837
"security-and-quality",
18381838
process.platform === "win32" ? undefined : "0.0.1"
18391839
);
1840+
// Test that the ~0.2.0 version of ML-powered queries is run on v2.8.4 of the CLI.
1841+
test(
1842+
mlPoweredQueriesMacro,
1843+
"2.8.4",
1844+
true,
1845+
undefined,
1846+
"security-extended",
1847+
process.platform === "win32" ? undefined : "~0.2.0"
1848+
);

src/util.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,11 @@ export const ML_POWERED_JS_QUERIES_PACK_NAME =
661661
* queries beta.
662662
*/
663663
export async function getMlPoweredJsQueriesPack(
664-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
665-
_codeQL: CodeQL
664+
codeQL: CodeQL
666665
): Promise<PackWithVersion> {
666+
if (await codeQlVersionAbove(codeQL, "2.8.4")) {
667+
return { packName: ML_POWERED_JS_QUERIES_PACK_NAME, version: "~0.2.0" };
668+
}
667669
return { packName: ML_POWERED_JS_QUERIES_PACK_NAME, version: "~0.1.0" };
668670
}
669671

0 commit comments

Comments
 (0)