From c183dca87194cf9222868206051c367fa619f92c Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 12 Mar 2026 18:43:14 +0000 Subject: [PATCH 1/2] Move `ava` config out of `package.json` --- ava.config.mjs | 8 ++++++++ eslint.config.mjs | 1 + package.json | 8 -------- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 ava.config.mjs diff --git a/ava.config.mjs b/ava.config.mjs new file mode 100644 index 0000000000..4cb202ed52 --- /dev/null +++ b/ava.config.mjs @@ -0,0 +1,8 @@ +export default { + typescript: { + rewritePaths: { + "src/": "build/", + }, + compile: false, + }, +}; diff --git a/eslint.config.mjs b/eslint.config.mjs index 97e15194ee..ca4a4fa978 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -19,6 +19,7 @@ export default [ "src/testdata/**/*", "tests/**/*", "build.mjs", + "ava.config.mjs", "eslint.config.mjs", ".github/**/*", "pr-checks/**/*", diff --git a/package.json b/package.json index 57d680d630..a810e13776 100644 --- a/package.json +++ b/package.json @@ -14,14 +14,6 @@ "test-debug": "npm run test -- --timeout=20m", "transpile": "tsc --build --verbose" }, - "ava": { - "typescript": { - "rewritePaths": { - "src/": "build/" - }, - "compile": false - } - }, "license": "MIT", "dependencies": { "@actions/artifact": "^5.0.3", From ea703668e01cf3427d3d8bc1f03d307e613d68ad Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 12 Mar 2026 18:55:03 +0000 Subject: [PATCH 2/2] Avoid bundling `package.json` - `package.json` is bundled by `esbuild` because we depend on it in `actions-util.ts` - That is so we can access the `version` property - We now use `build.mjs` to define a constant for it instead - We also set this constant in `ava.setup.mjs` for tests - This reduces the size of the generated `.js` files and avoids changing them entirely in some cases --- ava.config.mjs | 1 + ava.setup.mjs | 3 + build.mjs | 9 ++- eslint.config.mjs | 1 + lib/analyze-action-post.js | 118 ++---------------------------- lib/analyze-action.js | 114 +---------------------------- lib/autobuild-action.js | 114 +---------------------------- lib/init-action-post.js | 118 ++---------------------------- lib/init-action.js | 114 +---------------------------- lib/resolve-environment-action.js | 114 +---------------------------- lib/setup-codeql-action.js | 114 +---------------------------- lib/start-proxy-action-post.js | 118 ++---------------------------- lib/start-proxy-action.js | 114 +---------------------------- lib/upload-lib.js | 114 +---------------------------- lib/upload-sarif-action-post.js | 118 ++---------------------------- lib/upload-sarif-action.js | 114 +---------------------------- src/actions-util.ts | 10 ++- 17 files changed, 62 insertions(+), 1346 deletions(-) create mode 100644 ava.setup.mjs diff --git a/ava.config.mjs b/ava.config.mjs index 4cb202ed52..7bd103c94e 100644 --- a/ava.config.mjs +++ b/ava.config.mjs @@ -5,4 +5,5 @@ export default { }, compile: false, }, + require: ["./ava.setup.mjs"], }; diff --git a/ava.setup.mjs b/ava.setup.mjs new file mode 100644 index 0000000000..e6c370e01b --- /dev/null +++ b/ava.setup.mjs @@ -0,0 +1,3 @@ +import pkg from "./package.json" with { type: "json" }; + +globalThis.__CODEQL_ACTION_VERSION__ = pkg.version; diff --git a/build.mjs b/build.mjs index 05f7e05021..54b9cafd48 100644 --- a/build.mjs +++ b/build.mjs @@ -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); @@ -13,7 +15,7 @@ const OUT_DIR = join(__dirname, "lib"); /** * Clean the output directory before building. - * + * * @type {esbuild.Plugin} */ const cleanPlugin = { @@ -27,7 +29,7 @@ const cleanPlugin = { /** * Copy defaults.json to the output directory since other projects depend on it. - * + * * @type {esbuild.Plugin} */ const copyDefaultsPlugin = { @@ -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(); diff --git a/eslint.config.mjs b/eslint.config.mjs index ca4a4fa978..e84c48b8a4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -20,6 +20,7 @@ export default [ "tests/**/*", "build.mjs", "ava.config.mjs", + "ava.setup.mjs", "eslint.config.mjs", ".github/**/*", "pr-checks/**/*", diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index ef40aa24f4..7f3ecdf6eb 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -102526,7 +102419,7 @@ The following characters are not allowed in files that are uploaded due to limit }); // node_modules/@actions/artifact/package.json -var require_package3 = __commonJS({ +var require_package2 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", @@ -102605,7 +102498,7 @@ var require_user_agent2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; - var packageJson = require_package3(); + var packageJson = require_package2(); function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } @@ -161229,7 +161122,6 @@ async function asyncSome(array, predicate) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -161246,7 +161138,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 58c2193809..74b048da07 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -106393,7 +106286,6 @@ function unsafeEntriesInvariant(object) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -106410,7 +106302,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index f603f4159a..008dcde546 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -103200,7 +103093,6 @@ async function asyncSome(array, predicate) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -103217,7 +103109,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index af92a4ed20..da4854e85e 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -102526,7 +102419,7 @@ The following characters are not allowed in files that are uploaded due to limit }); // node_modules/@actions/artifact/package.json -var require_package3 = __commonJS({ +var require_package2 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", @@ -102605,7 +102498,7 @@ var require_user_agent2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; - var packageJson = require_package3(); + var packageJson = require_package2(); function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } @@ -164334,7 +164227,6 @@ var Failure = class { }; // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -164351,7 +164243,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/init-action.js b/lib/init-action.js index 9cea791ccd..390ec79cd0 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92914,7 +92807,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92986,7 +92879,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -103762,7 +103655,6 @@ var Failure = class { }; // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -103779,7 +103671,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 97dfba7b8d..f4a616b3c3 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -103208,7 +103101,6 @@ async function asyncSome(array, predicate) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -103225,7 +103117,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index a227b4c6e3..1c0c79b14b 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -91466,7 +91359,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -91538,7 +91431,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -103305,7 +103198,6 @@ async function asyncSome(array, predicate) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -103322,7 +103214,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 8fc9dcab58..ce9c8662e7 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -101153,7 +101046,7 @@ The following characters are not allowed in files that are uploaded due to limit }); // node_modules/@actions/artifact/package.json -var require_package3 = __commonJS({ +var require_package2 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", @@ -101232,7 +101125,7 @@ var require_user_agent2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; - var packageJson = require_package3(); + var packageJson = require_package2(); function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } @@ -161181,7 +161074,6 @@ function getErrorMessage(error3) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -161198,7 +161090,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 4ab566dc03..2bade8f3c9 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -91466,7 +91359,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -91538,7 +91431,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -120346,7 +120239,6 @@ function isDefined2(value) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -120363,7 +120255,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/upload-lib.js b/lib/upload-lib.js index be9307fb34..0739ab2e8c 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -47278,113 +47278,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -92763,7 +92656,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -92835,7 +92728,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -106098,7 +105991,6 @@ async function asyncSome(array, predicate) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -106115,7 +106007,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index c88e1bb00e..42080f62b5 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -53828,7 +53721,7 @@ The following characters are not allowed in files that are uploaded due to limit }); // node_modules/@actions/artifact/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", @@ -53907,7 +53800,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = void 0; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/artifact-${packageJson.version}`; } @@ -155097,7 +154990,7 @@ var require_config2 = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package3 = __commonJS({ +var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -155169,7 +155062,7 @@ var require_user_agent2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package3(); + var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -161181,7 +161074,6 @@ function getErrorMessage(error3) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -161198,7 +161090,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index b89d4cd25c..3dfa1486e3 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -45981,113 +45981,6 @@ var require_semver2 = __commonJS({ } }); -// package.json -var require_package = __commonJS({ - "package.json"(exports2, module2) { - module2.exports = { - name: "codeql", - version: "4.32.7", - private: true, - description: "CodeQL action", - scripts: { - _build_comment: "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'", - build: "./scripts/check-node-modules.sh && npm run transpile && node build.mjs", - lint: "eslint --report-unused-disable-directives --max-warnings=0 .", - "lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif", - "lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix", - ava: "npm run transpile && ava --verbose", - test: "npm run ava -- src/", - "test-debug": "npm run test -- --timeout=20m", - transpile: "tsc --build --verbose" - }, - ava: { - typescript: { - rewritePaths: { - "src/": "build/" - }, - compile: false - } - }, - license: "MIT", - dependencies: { - "@actions/artifact": "^5.0.3", - "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^5.0.5", - "@actions/core": "^2.0.3", - "@actions/exec": "^2.0.0", - "@actions/github": "^8.0.1", - "@actions/glob": "^0.5.0", - "@actions/http-client": "^3.0.0", - "@actions/io": "^2.0.0", - "@actions/tool-cache": "^3.0.1", - "@octokit/plugin-retry": "^8.0.0", - "@schemastore/package": "0.0.10", - archiver: "^7.0.1", - "fast-deep-equal": "^3.1.3", - "follow-redirects": "^1.15.11", - "get-folder-size": "^5.0.0", - "https-proxy-agent": "^7.0.6", - "js-yaml": "^4.1.1", - jsonschema: "1.4.1", - long: "^5.3.2", - "node-forge": "^1.3.3", - semver: "^7.7.4", - uuid: "^13.0.0" - }, - devDependencies: { - "@ava/typescript": "6.0.0", - "@eslint/compat": "^2.0.2", - "@microsoft/eslint-formatter-sarif": "^3.1.0", - "@octokit/types": "^16.0.0", - "@types/archiver": "^7.0.0", - "@types/follow-redirects": "^1.14.4", - "@types/js-yaml": "^4.0.9", - "@types/node": "^20.19.9", - "@types/node-forge": "^1.3.14", - "@types/sarif": "^2.1.7", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - ava: "^7.0.0", - esbuild: "^0.27.3", - eslint: "^9.39.2", - "eslint-import-resolver-typescript": "^3.8.7", - "eslint-plugin-github": "^6.0.0", - "eslint-plugin-import-x": "^4.16.1", - "eslint-plugin-jsdoc": "^62.7.1", - "eslint-plugin-no-async-foreach": "^0.1.1", - glob: "^11.1.0", - globals: "^17.4.0", - nock: "^14.0.11", - sinon: "^21.0.2", - typescript: "^5.9.3", - "typescript-eslint": "^8.56.1" - }, - overrides: { - "@actions/tool-cache": { - semver: ">=6.3.1" - }, - "@octokit/request-error": { - semver: ">=5.1.1" - }, - "@octokit/request": { - semver: ">=8.4.1" - }, - "@octokit/plugin-paginate-rest": { - semver: ">=9.2.2" - }, - "eslint-plugin-import": { - semver: ">=6.3.1" - }, - "eslint-plugin-jsx-a11y": { - semver: ">=6.3.1" - }, - "brace-expansion@2.0.1": "2.0.2", - glob: "^11.1.0" - } - }; - } -}); - // node_modules/bottleneck/light.js var require_light = __commonJS({ "node_modules/bottleneck/light.js"(exports2, module2) { @@ -91466,7 +91359,7 @@ var require_config = __commonJS({ }); // node_modules/@actions/cache/package.json -var require_package2 = __commonJS({ +var require_package = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", @@ -91538,7 +91431,7 @@ var require_user_agent = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUserAgentString = getUserAgentString; - var packageJson = require_package2(); + var packageJson = require_package(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } @@ -106127,7 +106020,6 @@ function unsafeEntriesInvariant(object) { } // src/actions-util.ts -var pkg = require_package(); var getRequiredInput = function(name) { const value = core4.getInput(name); if (!value) { @@ -106144,7 +106036,7 @@ function getTemporaryDirectory() { return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } function getActionVersion() { - return pkg.version; + return "4.32.7"; } function getWorkflowEventName() { return getRequiredEnvParam("GITHUB_EVENT_NAME"); diff --git a/src/actions-util.ts b/src/actions-util.ts index 736d35d0f1..e1a7adb8f0 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -5,7 +5,6 @@ import * as core from "@actions/core"; import * as toolrunner from "@actions/exec/lib/toolrunner"; import * as github from "@actions/github"; import * as io from "@actions/io"; -import { JSONSchemaForNPMPackageJsonFiles } from "@schemastore/package"; import type { Config } from "./config-utils"; import { Logger } from "./logging"; @@ -16,8 +15,11 @@ import { ConfigurationError, } from "./util"; -// eslint-disable-next-line import/no-commonjs, @typescript-eslint/no-require-imports -const pkg = require("../package.json") as JSONSchemaForNPMPackageJsonFiles; +/** + * This constant is set to the value of the `"version"` property in `package.json` by `esbuild`. + * It is also set in `ava.setup.mjs` for tests. + */ +declare const __CODEQL_ACTION_VERSION__: string; /** * Wrapper around core.getInput for inputs that always have a value. @@ -52,7 +54,7 @@ export function getTemporaryDirectory(): string { } export function getActionVersion(): string { - return pkg.version!; + return __CODEQL_ACTION_VERSION__; } /**