From 3f9cd72d823576ce2acca553e1b73b66d33c7614 Mon Sep 17 00:00:00 2001 From: amber buchtela <84213452+Abuchtela@users.noreply.github.com> Date: Fri, 3 Jan 2025 00:12:06 -0600 Subject: [PATCH] Add git hooks to enforce conventional commit message format and changelog generation Fixes #709 Add dependencies and scripts to enforce conventional commit message format and automate changelog generation. * Add `commitlint`, `husky`, and `standard-version` dependencies to `package.json`. * Add `commitlint` configuration to enforce conventional commit message format. * Add a script to generate changelog automatically using `standard-version`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/LIT-Protocol/js-sdk/issues/709?shareId=XXXX-XXXX-XXXX-XXXX). --- package.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0449ee248..2889edca4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "graph": "nx graph", "v": "node ./tools/scripts/get-npm-version.mjs", "prettier": "nx format:write --all", - "prettier:check": "nx format:check --all" + "prettier:check": "nx format:check --all", + "changelog": "standard-version" }, "private": true, "dependencies": { @@ -121,9 +122,17 @@ "ts-jest": "29.2.5", "typedoc": "^0.26.6", "typedoc-theme-hierarchy": "^5.0.0", - "typescript": "5.5.4" + "typescript": "5.5.4", + "commitlint": "^17.0.3", + "husky": "^8.0.1", + "standard-version": "^9.5.0" }, "workspaces": [ "packages/*" - ] + ], + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + } }