Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
should-semantic-release
Advanced tools
Checks whether a semantic release should be run for a repository. 💂
Checks whether a semantic release should be run for a repository. 💂
This function determines whether a semantic release should occur for a package based on Git history. It returns true if a "meaningful" commit has come since the most recent release commit.
if npx should-semantic-release ; then npx release-it ; fi
This can be useful, for example, to prevent a release-it
release.
should-semantic-release
accepts the following CLI flag:
-v
/--verbose
(default: false
): Whether to log debug information to the console$ npx should-semantic-release --verbose
Checking up to 123 commits for release readiness...
Checking commit: chore: an example chore (#101)
Found type chore.
Checking commit: chore: another example chore (#100)
Found type chore.
Checking commit: chore: release v1.27.31
This is a release commit. Returning false.
Based on a commit's conventional commit message type:
feat
fix
, or perf
, it's considered "meaningful"BREAKING CHANGE:
at the start of any commit message lines or via an !
appended to the type, it's considered "meaningful"docs
, refactor
, style
, or test
, it's ignoredv1.2.3
, chore: release 1.2.3
, or similar, it's considered a "release"See getCommitMeaning
for the exact logic used.
Alternately, you can call this import asynchronous shouldSemanticRelease
function into Node scripts:
import { shouldSemanticRelease } from "should-semantic-release";
if (await shouldSemanticRelease()) {
console.log("Let's release! 🚀");
}
shouldSemanticRelease
accepts an optional options object with the following parameter:
verbose
(default: false
)import { shouldSemanticRelease } from "should-semantic-release";
await shouldSemanticRelease({ verbose: true });
See .github/CONTRIBUTING.md
.
Thanks! 💖
Josh Goldberg 💻 🚧 🚇 🤔 | Katya Pavlenko 💻 | Stephen Zhou 💻 | Steven Luscher 🤔 |
💙 This package is based on @JoshuaKGoldberg's create-typescript-app.
FAQs
Checks whether a semantic release should be run for a repository. 💂
We found that should-semantic-release demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.