623c707d77
* chore: enforce pre-PR validation with aggregate scripts, git hooks, and PR checklist Add tooling to help contributors run the same checks as CI before submitting a pull request, reducing avoidable format/lint/build failures. - Add aggregate npm scripts: - `npm run check` runs format-check + lint + build + test (mirrors CI) - `npm run fix` runs format + lint:fix + build - Add husky + lint-staged git hooks (installed via `npm install`): - pre-commit formats and lints staged files - pre-push rebuilds dist/ and runs the test suite - Add a checklist item to the PR template prompting contributors to run `npm run check` locally - Document the aggregate scripts and hooks in docs/contributors.md dist/ is intentionally not auto-committed by CI to avoid pwn-request security risks; the existing `Check dist/` workflow continues to verify it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
78 lines
2.4 KiB
JSON
78 lines
2.4 KiB
JSON
{
|
|
"name": "setup-java",
|
|
"version": "5.3.0",
|
|
"private": true,
|
|
"description": "setup java action",
|
|
"main": "dist/setup/index.js",
|
|
"engines": {
|
|
"node": ">=24.0.0"
|
|
},
|
|
"scripts": {
|
|
"build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts",
|
|
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
|
|
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
|
|
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
|
|
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
|
|
"check": "npm run format-check && npm run lint && npm run build && npm test",
|
|
"fix": "npm run format && npm run lint:fix && npm run build",
|
|
"prepare": "husky install",
|
|
"prerelease": "npm run-script build",
|
|
"release": "git add -f dist/setup/index.js dist/cleanup/index.js",
|
|
"test": "jest"
|
|
},
|
|
"lint-staged": {
|
|
"*.ts": [
|
|
"prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write",
|
|
"eslint --config ./.eslintrc.js --fix"
|
|
],
|
|
"*.{yml,yaml}": [
|
|
"prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write"
|
|
]
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/actions/setup-java.git"
|
|
},
|
|
"keywords": [
|
|
"actions",
|
|
"java",
|
|
"setup"
|
|
],
|
|
"author": "GitHub",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@actions/cache": "^5.1.0",
|
|
"@actions/core": "^2.0.3",
|
|
"@actions/exec": "^2.0.0",
|
|
"@actions/glob": "^0.5.1",
|
|
"@actions/http-client": "^3.0.2",
|
|
"@actions/io": "^2.0.0",
|
|
"@actions/tool-cache": "^3.0.1",
|
|
"semver": "^7.6.0",
|
|
"xmlbuilder2": "^4.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jest": "^30.0.0",
|
|
"@types/node": "^26.0.0",
|
|
"@types/semver": "^7.5.8",
|
|
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
"@typescript-eslint/parser": "^8.61.1",
|
|
"@vercel/ncc": "^0.44.0",
|
|
"eslint": "^8.57.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-jest": "^29.0.1",
|
|
"eslint-plugin-node": "^11.1.0",
|
|
"husky": "^9.1.7",
|
|
"jest": "^30.4.2",
|
|
"jest-circus": "^30.4.2",
|
|
"lint-staged": "^17.0.8",
|
|
"prettier": "^3.6.2",
|
|
"ts-jest": "^29.4.11",
|
|
"typescript": "^5.3.3"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/actions/setup-java/issues"
|
|
},
|
|
"homepage": "https://github.com/actions/setup-java#readme"
|
|
}
|