chore: add cz-conventional-changelog cli & update contributing guides (#5148)

* chore: add commitizen cli

added cz-conventional-changelog to make commiting easier with the new linter

* docs: add commiting information to CONTRIBUTING.md

Added information on how to commit to the codebase via conventional commits
This commit is contained in:
bdbch 2024-05-14 14:41:03 +02:00 committed by GitHub
parent d70e8a70b6
commit cdc147a7f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 249 additions and 1 deletions

View File

@ -36,6 +36,11 @@ Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
Before commiting:
- Make sure to run the tests and linter before committing your changes.
- Write [conventional commit messages](https://www.conventionalcommits.org/en). You can use `npm run cz` for that.
## Requirements
If the project maintainer has any additional requirements, you will find them listed here.

236
package-lock.json generated
View File

@ -31,6 +31,7 @@
"@typescript-eslint/parser": "^5.10.2",
"babel-loader": "^8.2.3",
"cypress": "^10.8.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.17.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-cypress": "^2.12.1",
@ -7905,6 +7906,45 @@
"node": ">= 6"
}
},
"node_modules/commitizen": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz",
"integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==",
"dev": true,
"dependencies": {
"cachedir": "2.3.0",
"cz-conventional-changelog": "3.3.0",
"dedent": "0.7.0",
"detect-indent": "6.1.0",
"find-node-modules": "^2.1.2",
"find-root": "1.1.0",
"fs-extra": "9.1.0",
"glob": "7.2.3",
"inquirer": "8.2.5",
"is-utf8": "^0.2.1",
"lodash": "4.17.21",
"minimist": "1.2.7",
"strip-bom": "4.0.0",
"strip-json-comments": "3.1.1"
},
"bin": {
"commitizen": "bin/commitizen",
"cz": "bin/git-cz",
"git-cz": "bin/git-cz"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/commitizen/node_modules/minimist": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/common-ancestor-path": {
"version": "1.0.1",
"dev": true,
@ -8063,6 +8103,12 @@
"node": ">=10"
}
},
"node_modules/conventional-commit-types": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz",
"integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==",
"dev": true
},
"node_modules/conventional-commits-filter": {
"version": "2.0.7",
"dev": true,
@ -8373,6 +8419,26 @@
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/cz-conventional-changelog": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz",
"integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.1",
"commitizen": "^4.0.3",
"conventional-commit-types": "^3.0.0",
"lodash.map": "^4.5.1",
"longest": "^2.0.1",
"word-wrap": "^1.0.3"
},
"engines": {
"node": ">= 10"
},
"optionalDependencies": {
"@commitlint/load": ">6.1.1"
}
},
"node_modules/d3": {
"version": "7.4.5",
"license": "ISC",
@ -8924,6 +8990,15 @@
"dev": true,
"license": "ISC"
},
"node_modules/detect-file": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
"integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/detect-indent": {
"version": "6.1.0",
"dev": true,
@ -9846,6 +9921,18 @@
"node": ">=4"
}
},
"node_modules/expand-tilde": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
"integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==",
"dev": true,
"dependencies": {
"homedir-polyfill": "^1.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/extend": {
"version": "3.0.2",
"dev": true,
@ -10042,6 +10129,22 @@
"url": "https://github.com/avajs/find-cache-dir?sponsor=1"
}
},
"node_modules/find-node-modules": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz",
"integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==",
"dev": true,
"dependencies": {
"findup-sync": "^4.0.0",
"merge": "^2.1.1"
}
},
"node_modules/find-root": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
"integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
"dev": true
},
"node_modules/find-up": {
"version": "2.1.0",
"dev": true,
@ -10053,6 +10156,21 @@
"node": ">=4"
}
},
"node_modules/findup-sync": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz",
"integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==",
"dev": true,
"dependencies": {
"detect-file": "^1.0.0",
"is-glob": "^4.0.0",
"micromatch": "^4.0.2",
"resolve-dir": "^1.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/flat": {
"version": "5.0.2",
"dev": true,
@ -10579,6 +10697,54 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"dev": true,
"dependencies": {
"global-prefix": "^1.0.1",
"is-windows": "^1.0.1",
"resolve-dir": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/global-prefix": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
"integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==",
"dev": true,
"dependencies": {
"expand-tilde": "^2.0.2",
"homedir-polyfill": "^1.0.1",
"ini": "^1.3.4",
"is-windows": "^1.0.1",
"which": "^1.2.14"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/global-prefix/node_modules/ini": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"dev": true
},
"node_modules/global-prefix/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/globals": {
"version": "11.12.0",
"dev": true,
@ -10734,6 +10900,18 @@
"node": ">=12.0.0"
}
},
"node_modules/homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
"integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
"dev": true,
"dependencies": {
"parse-passwd": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/hosted-git-info": {
"version": "6.1.1",
"dev": true,
@ -11648,6 +11826,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==",
"dev": true
},
"node_modules/is-weakref": {
"version": "1.0.2",
"dev": true,
@ -11659,6 +11843,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-wsl": {
"version": "2.2.0",
"dev": true,
@ -13333,6 +13526,12 @@
"integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==",
"dev": true
},
"node_modules/lodash.map": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
"integrity": "sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==",
"dev": true
},
"node_modules/lodash.merge": {
"version": "4.6.2",
"dev": true,
@ -13538,6 +13737,15 @@
"node": ">=8"
}
},
"node_modules/longest": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz",
"integrity": "sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/loose-envify": {
"version": "1.4.0",
"license": "MIT",
@ -13978,6 +14186,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/merge": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz",
"integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==",
"dev": true
},
"node_modules/merge-stream": {
"version": "2.0.0",
"dev": true,
@ -15965,6 +16179,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse-passwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
"integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/parse-path": {
"version": "7.0.0",
"dev": true,
@ -17248,6 +17471,19 @@
"node": ">=8"
}
},
"node_modules/resolve-dir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
"integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==",
"dev": true,
"dependencies": {
"expand-tilde": "^2.0.0",
"global-modules": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/resolve-from": {
"version": "5.0.0",
"dev": true,

View File

@ -9,6 +9,7 @@
"not IE 11"
],
"scripts": {
"cz": "cz",
"start": "npm --prefix ./demos run start",
"dev": "npm run start",
"lint": "eslint --cache --quiet --no-error-on-unmatched-pattern ./",
@ -59,6 +60,7 @@
"@typescript-eslint/parser": "^5.10.2",
"babel-loader": "^8.2.3",
"cypress": "^10.8.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.17.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-cypress": "^2.12.1",
@ -79,5 +81,10 @@
"typescript": "^4.5.5",
"webpack": "^5.68.0"
},
"name": "tiptap"
"name": "tiptap",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}