Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Format your git commit messages by a set of middlewares.
npm install -g kommit
kommit
npm install --save-dev kommit
{
"script": {
"kommit": "kommit"
}
}
npm run kommit
Thanks to the middleware mechanism, Kommit
is designed as highly customizable.
First of all, to change the behaviour of kommit
, you should create a folder called .kommit
in the root of the project. And then add a config.js
file into it. So the configuration file is placed on the path of .kommit/config.js
.
The configuration object should be exported in Commonjs pattern.
module.exports = {
/* ... */
}
members: String[]
The members field should list all the members in your team. So it is able to choose one as your pair. That is for the Pair Programming.
module.exports = {
members: [
'Idan Loo <im@siwei.lu>',
'Fake Name <fake@siwei.lu>',
/* ... */
],
}
hooks: Object
The hooks fields currently contain two hooks. The before hook is a middleware which will be executed before committing, whereas the after hook will be executed after committing.
module.exports = {
hooks: {
async before(ctx, next) {
/* Do something using the ctx */
// Call the next method to commit this change
// Avoid calling next to cancel this committing
await next()
},
async after(ctx, next) {
/* Do something to handle the end of committing */
// Calling next is essential as well
await next()
},
},
}
To know more things about how to create middlewares, check here
scopes: String[]
The scopes field consists of a set of scopes. It will be chosen while committing.
module.exports = {
scopes: ['middlewares', 'config', 'git', 'ui'],
}
The Context consists of a set of values shared with every middleware.
path: String
The path you are committing in is process.cwd()
by default.
type: CommitType
The type you choosing from a group of commit types. It defined by ACMF includes feat
, fix
, test
, chore
, docs
, refactor
, style
, ci
and pref
.
subject: String
The subject of this change you filling.
scope?: String
The scope you choosing from a pre-defined scopes
in the config.js
. It will be passed if the scopes
fields is not provided.
body?: String
The body describes the details of this committing.
footer?: String[]
The footer is an array consisting of some extra information of this committing.
error?: Error
The error is the result of committing. It only can be used in the after hook.
Commit Message Format is playing a more and more important role on cooperating development. Angular Commit Message Format (ACMF), one of the most well known formats, helps us make git flows clearer and easier to generate documentations.
The Question is, however, this format is a bit complicated. You have to remember lots of concepts and make sure your cooperators know them as well. That does make newbies even some developers who know it well confused.
Anyway, we all know how helpful this format is, and we all are struggling to use it. So why don't we create a tool to make it easier to use?
git-cz has done the same thing I want to do. To be honest, Kommit
is inspired by git-cz
.
There still are some things I can not handle using git-cz
. Because my team chooses a variant of ACMF for our demands. But git-cz
is not such customizable, so I write Kommit
.
FAQs
Format your git commit messages by a set of middlewares
The npm package kommit receives a total of 33 weekly downloads. As such, kommit popularity was classified as not popular.
We found that kommit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.