Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ava.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
typescript: {
rewritePaths: {
"src/": "build/",
},
compile: false,
},
require: ["./ava.setup.mjs"],
};
3 changes: 3 additions & 0 deletions ava.setup.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import pkg from "./package.json" with { type: "json" };

globalThis.__CODEQL_ACTION_VERSION__ = pkg.version;
9 changes: 7 additions & 2 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { fileURLToPath } from "node:url";
import * as esbuild from "esbuild";
import { globSync } from "glob";

import pkg from "./package.json" with { type: "json" };

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Expand All @@ -13,7 +15,7 @@ const OUT_DIR = join(__dirname, "lib");

/**
* Clean the output directory before building.
*
*
* @type {esbuild.Plugin}
*/
const cleanPlugin = {
Expand All @@ -27,7 +29,7 @@ const cleanPlugin = {

/**
* Copy defaults.json to the output directory since other projects depend on it.
*
*
* @type {esbuild.Plugin}
*/
const copyDefaultsPlugin = {
Expand Down Expand Up @@ -69,6 +71,9 @@ const context = await esbuild.context({
platform: "node",
plugins: [cleanPlugin, copyDefaultsPlugin, onEndPlugin],
target: ["node20"],
define: {
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
},
});

await context.rebuild();
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default [
"src/testdata/**/*",
"tests/**/*",
"build.mjs",
"ava.config.mjs",
"ava.setup.mjs",
"eslint.config.mjs",
".github/**/*",
"pr-checks/**/*",
Expand Down
118 changes: 5 additions & 113 deletions lib/analyze-action-post.js

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

114 changes: 3 additions & 111 deletions lib/analyze-action.js

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

Loading
Loading