Skip to content

Commit 288532c

Browse files
Jake LauerJake Lauer
authored andcommitted
ci(:skip:): adding commitlint and commitizen
changing the way releases work to use commit-based versioning rather than opinion-based versioning
1 parent 7340584 commit 288532c

File tree

7 files changed

+535
-27
lines changed

7 files changed

+535
-27
lines changed

.commitlintrc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
extends:
2+
- '@commitlint/config-conventional'
3+
questions:
4+
type:
5+
description: "Select the type of change that you're committing"
6+
enum:
7+
feat:
8+
description: 'A new feature'
9+
title: 'Features'
10+
emoji: '✨'
11+
fix:
12+
description: 'A bug fix'
13+
title: 'Bug Fixes'
14+
emoji: '🐛'
15+
docs:
16+
description: 'Documentation only changes'
17+
title: 'Documentation'
18+
emoji: '📚'
19+
style:
20+
description: 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)'
21+
title: 'Styles'
22+
emoji: '💎'
23+
refactor:
24+
description: 'A code change that neither fixes a bug nor adds a feature'
25+
title: 'Code Refactoring'
26+
emoji: '📦'
27+
perf:
28+
description: 'A code change that improves performance'
29+
title: 'Performance Improvements'
30+
emoji: '🚀'
31+
test:
32+
description: 'Adding missing tests or correcting existing tests'
33+
title: 'Tests'
34+
emoji: '🚨'
35+
build:
36+
description: 'Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)'
37+
title: 'Builds'
38+
emoji: '🛠'
39+
ci:
40+
description: 'Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)'
41+
title: 'Continuous Integrations'
42+
emoji: '⚙️'
43+
chore:
44+
description: "Other changes that don't modify src or test files"
45+
title: 'Chores'
46+
emoji: '♻️'
47+
revert:
48+
description: 'Reverts a previous commit'
49+
title: 'Reverts'
50+
emoji: '🗑'
51+
scope:
52+
description: 'What is the scope of this change (e.g. component or file name)'
53+
subject:
54+
description: 'Write a short, imperative tense description of the change'
55+
body:
56+
description: 'Provide a longer description of the change'
57+
isBreaking:
58+
description: 'Are there any breaking changes?'
59+
breakingBody:
60+
description: 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself'
61+
breaking:
62+
description: 'Describe the breaking changes'
63+
isIssueAffected:
64+
description: 'Does this change affect any open issues?'
65+
issuesBody:
66+
description: 'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself'
67+
issues:
68+
description: 'Add issue references (e.g. "fix #123", "re #123".)'

.eslintrc.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
22
parser: "@typescript-eslint/parser",
3+
ignores: ["*.js"],
34
parserOptions: {
4-
project: ["./tsconfig.json", "./.examples/tic-tac-toe/tsconfig.json", "./packages/eslint-plugin-theseus/tsconfig.json"],
5+
project: ["./tsconfig.json", "./.examples/tic-tac-toe/tsconfig.json", "./packages/eslint-plugin-theseus/tsconfig.json"],
56
ecmaVersion: 2018,
67
sourceType: "module",
78
tsconfigRootDir: "./",

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm commitlint --edit

.releaserc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
branches:
2-
- main
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
"@semantic-release/npm",
8+
"@semantic-release/github",
9+
"@semantic-release/git"
10+
]
11+
}

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"prepublish": "pnpm build && pnpm test",
1919
"prepare": "husky install",
2020
"reinstall": "npx npkill && pnpm install",
21+
"commit": "commit",
2122
"// ==== TESTING ==== //": "",
2223
"lint": "git add . && pnpm lint-staged",
2324
"lint-fix": "eslint ./ --fix --resolve-plugins-relative-to=./",
@@ -40,8 +41,16 @@
4041
"winston": "^3.12.0"
4142
},
4243
"devDependencies": {
44+
"@commitlint/cli": "^19.3.0",
45+
"@commitlint/config-conventional": "^19.2.2",
46+
"@semantic-release/changelog": "^6.0.3",
47+
"@semantic-release/commit-analyzer": "^12.0.0",
48+
"@semantic-release/git": "^10.0.1",
49+
"@semantic-release/github": "^10.0.5",
50+
"@semantic-release/npm": "^12.0.1",
51+
"@semantic-release/release-notes-generator": "^13.0.0",
4352
"@theseus/gpt-zip": "workspace:latest",
44-
"@theseus/publisher": "workspace:latest",
53+
"@theseus/publisher": "workspace:^",
4554
"@types/chai": "^4.3.12",
4655
"@types/chai-as-promised": "^7.1.8",
4756
"@types/deep-equal": "^1.0.4",

packages/publisher/package.json

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
{
2-
"name": "@theseus/publisher",
3-
"private": true,
4-
"version": "1.0.0",
5-
"description": "",
6-
"main": "index.js",
7-
"scripts": {
8-
"update": "node ./update-version.js",
9-
"pub": "node ./publish.js"
10-
},
11-
"bin": {
12-
"update-version": "./update-version.js",
13-
"publish-theseus": "./publish.js",
14-
"commit": "./commit.js"
15-
},
16-
"dependencies": {
17-
"arg": "^5.0.1",
18-
"prompts": "^2.4.2"
19-
},
20-
"keywords": [ ],
21-
"author": "",
22-
"license": "ISC"
2+
"name": "@theseus/publisher",
3+
"private": true,
4+
"version": "1.0.0",
5+
"description": "",
6+
"main": "index.js",
7+
"scripts": {
8+
"update": "node ./update-version.js",
9+
"pub": "node ./publish.js"
10+
},
11+
"bin": {
12+
"update-version": "./update-version.js",
13+
"publish-theseus": "./publish.js"
14+
},
15+
"dependencies": {
16+
"arg": "^5.0.1",
17+
"prompts": "^2.4.2"
18+
},
19+
"keywords": [],
20+
"author": "",
21+
"license": "ISC"
2322
}

0 commit comments

Comments
 (0)