From 91dc639d1d35d964f6460a5af2e996c7562228fd Mon Sep 17 00:00:00 2001 From: Josh Johanning Date: Sun, 29 Mar 2026 10:00:04 -0500 Subject: [PATCH 1/2] chore: update package.json scripts for consistency --- package.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index c4f4ca5..7adcc72 100644 --- a/package.json +++ b/package.json @@ -9,17 +9,18 @@ }, "main": "dist/index.js", "scripts": { - "format": "npx prettier --write .", + "bundle": "npm run format:write && npm run package", + "ci-test": "npm run test:bash && NODE_OPTIONS='--experimental-vm-modules' npx jest --coverage", + "coverage": "npx @joshjohanning/make-coverage-badge-better --label-color '#333' --output-path ./badges/coverage.svg", + "format:write": "npx prettier --write .", "format:check": "npx prettier --check .", - "lint": "npx eslint src/**/*.js", - "test": "npm run test:bash && npm run test:js", + "lint": "npx eslint .", + "package": "npx @vercel/ncc build src/index.js -o dist --source-map --license licenses.txt", + "package:watch": "npm run package -- --watch", + "test": "npm run test:bash && NODE_OPTIONS='--experimental-vm-modules' npx jest", "test:bash": "./__tests__/action.test.sh", - "test:js": "NODE_OPTIONS=--experimental-vm-modules npx jest", - "test:watch": "NODE_OPTIONS=--experimental-vm-modules npx jest --watch", - "test:coverage": "NODE_OPTIONS=--experimental-vm-modules npx jest --coverage", - "coverage": "npx @joshjohanning/make-coverage-badge-better --label-color '#333' --output-path ./badges/coverage.svg", - "package": "npx @vercel/ncc build --source-map --license licenses.txt src/index.js -o dist", - "all": "npm run format && npm run lint && npm run test:coverage && npm run coverage && npm run package" + "test:watch": "NODE_OPTIONS='--experimental-vm-modules' npx jest --watch", + "all": "npm run format:write && npm run lint && npm run ci-test && npm run coverage && npm run package" }, "repository": { "type": "git", From 34e25a19af19cbf9a3454b3335e82f88a00b99bb Mon Sep 17 00:00:00 2001 From: Josh Johanning Date: Sun, 29 Mar 2026 10:02:06 -0500 Subject: [PATCH 2/2] chore(tests): update linting error --- __tests__/index.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 6a9e2f5..58fa8b7 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -159,7 +159,7 @@ describe('Azure DevOps Commit Validator', () => { await run(); expect(mockSetFailed).toHaveBeenCalledWith( - "At least one of 'check-commits' or 'check-pull-request' must be set to true. Both are currently set to false." + `At least one of 'check-commits' or 'check-pull-request' must be set to true. Both are currently set to false.` ); }); @@ -775,7 +775,7 @@ describe('Azure DevOps Commit Validator', () => { await run(); expect(mockWarning).toHaveBeenCalledWith( - expect.stringContaining("Invalid value 'invalid-value' for 'pull-request-check-scope'") + expect.stringContaining(`Invalid value 'invalid-value' for 'pull-request-check-scope'`) ); // Should still pass because it falls back to title-or-body and title has AB# expect(mockSetFailed).not.toHaveBeenCalled();