Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
git-raw-commits
Advanced tools
The git-raw-commits npm package is designed to generate raw git commits from your repository's history. It allows developers to programmatically access commit information, which can be useful for generating changelogs, analyzing project history, or automating versioning processes.
Generating raw commits
This feature allows you to generate raw commit data between two tags (from 'v1.0.0' to 'v2.0.0' in this example). The output can be piped to any writable stream, such as `process.stdout` for display or a file stream for saving.
const gitRawCommits = require('git-raw-commits');
gitRawCommits({ from: 'v1.0.0', to: 'v2.0.0' }).pipe(process.stdout);
Filtering commits
This feature demonstrates how to filter commits by a specific pattern using the `grep` option. In this example, only commits with 'Fix' in their messages between 'v1.0.0' and the latest commit ('HEAD') are generated.
const gitRawCommits = require('git-raw-commits');
gitRawCommits({ from: 'v1.0.0', to: 'HEAD', grep: 'Fix' }).pipe(process.stdout);
Similar to git-raw-commits, conventional-changelog is a tool for generating changelogs based on semantic versioning and commit conventions. While git-raw-commits provides raw commit data, conventional-changelog processes this data to create formatted changelog entries, offering a higher-level abstraction.
gitlog is another npm package that allows you to retrieve commit logs from your git repository. Compared to git-raw-commits, gitlog offers a simpler interface for accessing commit information but lacks the fine-grained control over commit selection and formatting.
Get raw git commits out of your repository using git-log(1).
# pnpm
pnpm add git-raw-commits
# yarn
yarn add git-raw-commits
# npm
npm i git-raw-commits
# Example
git-raw-commits --from HEAD~2 --to HEAD^
# For more details
git-raw-commits --help
For JS API see @conventional-changelog/git-client.
MIT © Steve Mao
FAQs
Get raw git commits out of your repository using git-log(1).
The npm package git-raw-commits receives a total of 3,405,010 weekly downloads. As such, git-raw-commits popularity was classified as popular.
We found that git-raw-commits demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.