
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
semantic-commit-emoji
Advanced tools
Prepend emoji to matching semantic commit messages.
commit-msg git hook.Example:
$ git commit -m "feat: Add new function" -m "Some expanded description about the feature"
$ git log --format=%B -n 1 HEAD
:sparkles:feat: Add new function
Some expanded description about the feature
$
The list of current message types and their used emoji
| Type | Emoji |
|---|---|
| feat | :sparkles: :sparkles: |
| fix | :bug: :bug: |
| docs | :pencil: :pencil: |
| refactor | :recycle: :recycle: |
| style | :art: :art: |
| test | :microscope: :microscope: |
| perf | :zap: :zap: |
| hotfix | :ambulance: :ambulance: |
| locale | :globe_with_meridians: :globe_with_meridians: |
| ci | :construction_worker: :construction_worker: |
| chore | :wrench: :wrench: |
| typing | :label: :label: |
This can either be a global module if this is just a personal preference, or a project one, so that you may enforce consistency on all contributors. It is recommended that you use a utility, like Husky, to manage consistently setting up git hooks on project setup.
yarn global add semantic-commit-emoji
# or
npm g i semantic-commit-emoji
yarn add --dev semantic-commit-emoji
# or
npm install --save-dev semantic-commit-emoji
For a standalone git hook, you can symlink the script into the appropriate hook
mkdir -p .git/hooks
ln -s ./node_modules/.bin/semantic-commit-emoji
If you want this hook to run with other commit-message or prepare-commit-message hooks, it can be called from the hook file like this (assuming sh syntax):
#!/bin/sh
# ... Other git hooks
# If globally installed module
commit-message-emoji "$@"
# Or yarn v2 global replacement
yarn dlx semantic-commit-emoji "$@"
# Or if localy installed module
npx commit-message-emoji "$@"
An example for husky can be found in this repo's .husky/commit-msg hook.
By design, this package will let you override an emoji with your own if you provide it in your message. This offers the greatest flexibility for your own preferences over the conventions of this script.
It is recommended that you use this in the commit-msg hook, as the prepare-commit-msg hook prepares templates for an editor.
This means that if a user runs git commit their message that was entered via an external editor will not get processed, and therefore will miss the benefits of this package.
Since this is a user script, this will not be able to rewrite messages generated by git server actions, like merging a PR on github or bitbucket. If need be, you could write a CI step to detect merged and reverts from your source control server, rewrite the message and force push it back up. However, it is the opinion of the maintainer that you shoud probably just do a manual merge of PRs according to the copy+paste script that github provides.
FAQs
CLI for rewriting semantic commits with an emoji prefix
The npm package semantic-commit-emoji receives a total of 3,754 weekly downloads. As such, semantic-commit-emoji popularity was classified as popular.
We found that semantic-commit-emoji demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.