mirror of
https://github.com/imjasonh/govulncheck-action
synced 2026-07-15 04:35:28 +00:00
Updates the project to use ESM modules and replaces ncc with esbuild. This fixes build failures caused by newer @actions/core versions which use strict ESM exports that ncc cannot resolve. Also updates tests to use ESM and dependency injection. Signed-off-by: Jason Hall <imjasonh@gmail.com>
63 lines
1.7 KiB
JSON
63 lines
1.7 KiB
JSON
{
|
|
"name": "govulncheck-action",
|
|
"version": "1.0.0",
|
|
"description": "GitHub Action to run govulncheck and annotate vulnerabilities",
|
|
"main": "index.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "esbuild index.js --bundle --platform=node --format=esm --outfile=dist/index.js --banner:js='import { createRequire } from \"module\"; const require = createRequire(import.meta.url);' && license-checker --production > dist/licenses.txt",
|
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"lint": "eslint src/**/*.js",
|
|
"format": "prettier --write 'src/**/*.js'",
|
|
"format:check": "prettier --check 'src/**/*.js'",
|
|
"prepare": "husky",
|
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
"test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
"test:local": "node test-local.js"
|
|
},
|
|
"keywords": [
|
|
"github",
|
|
"action",
|
|
"govulncheck",
|
|
"vulnerability",
|
|
"security",
|
|
"go"
|
|
],
|
|
"author": "",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"@actions/core": "^3.0.0",
|
|
"@actions/exec": "^3.0.0",
|
|
"@actions/github": "^9.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"esbuild": "^0.27.3",
|
|
"eslint": "^9.39.1",
|
|
"husky": "^9.1.7",
|
|
"jest": "^30.2.0",
|
|
"license-checker": "^25.0.1",
|
|
"lint-staged": "^16.2.7",
|
|
"prettier": "^3.7.4"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"transform": {},
|
|
"collectCoverageFrom": [
|
|
"index.js",
|
|
"lib/**/*.js"
|
|
],
|
|
"coverageThreshold": {
|
|
"global": {
|
|
"branches": 80,
|
|
"functions": 95,
|
|
"lines": 95,
|
|
"statements": 95
|
|
}
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"src/**/*.js": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|