Skip to content

Commit

Permalink
ci(:skip:): adding commitlint and commitizen
Browse files Browse the repository at this point in the history
changing the way releases work to use commit-based versioning rather than opinion-based versioning
  • Loading branch information
Jake Lauer authored and Jake Lauer committed May 26, 2024
1 parent 7340584 commit 288532c
Show file tree
Hide file tree
Showing 7 changed files with 535 additions and 27 deletions.
68 changes: 68 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
extends:
- '@commitlint/config-conventional'
questions:
type:
description: "Select the type of change that you're committing"
enum:
feat:
description: 'A new feature'
title: 'Features'
emoji: '✨'
fix:
description: 'A bug fix'
title: 'Bug Fixes'
emoji: '🐛'
docs:
description: 'Documentation only changes'
title: 'Documentation'
emoji: '📚'
style:
description: 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)'
title: 'Styles'
emoji: '💎'
refactor:
description: 'A code change that neither fixes a bug nor adds a feature'
title: 'Code Refactoring'
emoji: '📦'
perf:
description: 'A code change that improves performance'
title: 'Performance Improvements'
emoji: '🚀'
test:
description: 'Adding missing tests or correcting existing tests'
title: 'Tests'
emoji: '🚨'
build:
description: 'Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)'
title: 'Builds'
emoji: '🛠'
ci:
description: 'Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)'
title: 'Continuous Integrations'
emoji: '⚙️'
chore:
description: "Other changes that don't modify src or test files"
title: 'Chores'
emoji: '♻️'
revert:
description: 'Reverts a previous commit'
title: 'Reverts'
emoji: '🗑'
scope:
description: 'What is the scope of this change (e.g. component or file name)'
subject:
description: 'Write a short, imperative tense description of the change'
body:
description: 'Provide a longer description of the change'
isBreaking:
description: 'Are there any breaking changes?'
breakingBody:
description: 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself'
breaking:
description: 'Describe the breaking changes'
isIssueAffected:
description: 'Does this change affect any open issues?'
issuesBody:
description: 'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself'
issues:
description: 'Add issue references (e.g. "fix #123", "re #123".)'
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
parser: "@typescript-eslint/parser",
ignores: ["*.js"],
parserOptions: {
project: ["./tsconfig.json", "./.examples/tic-tac-toe/tsconfig.json", "./packages/eslint-plugin-theseus/tsconfig.json"],
project: ["./tsconfig.json", "./.examples/tic-tac-toe/tsconfig.json", "./packages/eslint-plugin-theseus/tsconfig.json"],
ecmaVersion: 2018,
sourceType: "module",
tsconfigRootDir: "./",
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit
13 changes: 11 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
branches:
- main
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"prepublish": "pnpm build && pnpm test",
"prepare": "husky install",
"reinstall": "npx npkill && pnpm install",
"commit": "commit",
"// ==== TESTING ==== //": "",
"lint": "git add . && pnpm lint-staged",
"lint-fix": "eslint ./ --fix --resolve-plugins-relative-to=./",
Expand All @@ -40,8 +41,16 @@
"winston": "^3.12.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.0.5",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^13.0.0",
"@theseus/gpt-zip": "workspace:latest",
"@theseus/publisher": "workspace:latest",
"@theseus/publisher": "workspace:^",
"@types/chai": "^4.3.12",
"@types/chai-as-promised": "^7.1.8",
"@types/deep-equal": "^1.0.4",
Expand Down
41 changes: 20 additions & 21 deletions packages/publisher/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
{
"name": "@theseus/publisher",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"update": "node ./update-version.js",
"pub": "node ./publish.js"
},
"bin": {
"update-version": "./update-version.js",
"publish-theseus": "./publish.js",
"commit": "./commit.js"
},
"dependencies": {
"arg": "^5.0.1",
"prompts": "^2.4.2"
},
"keywords": [ ],
"author": "",
"license": "ISC"
"name": "@theseus/publisher",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"update": "node ./update-version.js",
"pub": "node ./publish.js"
},
"bin": {
"update-version": "./update-version.js",
"publish-theseus": "./publish.js"
},
"dependencies": {
"arg": "^5.0.1",
"prompts": "^2.4.2"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Loading

0 comments on commit 288532c

Please sign in to comment.