Socket
Socket
Sign inDemoInstall

@commitlint/read

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/read - npm Package Compare versions

Comparing version 19.0.3 to 19.2.0

1

lib/read.d.ts

@@ -5,2 +5,3 @@ interface GetCommitMessageOptions {

to?: string;
last?: boolean;
edit?: boolean | string;

@@ -7,0 +8,0 @@ gitLogArgs?: string;

import minimist from 'minimist';
import { getHistoryCommits } from './get-history-commits.js';
import { getEditCommit } from './get-edit-commit.js';
import { execa } from 'execa';
// Get commit messages
export default async function getCommitMessages(settings) {
const { cwd, from, to, edit, gitLogArgs } = settings;
const { cwd, from, to, last, edit, gitLogArgs } = settings;
if (edit) {
return getEditCommit(cwd, edit);
}
if (last) {
const executeGitCommand = await execa('git', [
'log',
'-1',
'--pretty=format:"%B"',
]);
return [executeGitCommand.stdout];
}
let gitOptions = { from, to };
if (gitLogArgs) {
gitOptions = Object.assign(Object.assign({}, minimist(gitLogArgs.split(' '))), { from,
to });
gitOptions = {
...minimist(gitLogArgs.split(' ')),
from,
to,
};
}

@@ -15,0 +27,0 @@ return getHistoryCommits(gitOptions, { cwd });

8

package.json
{
"name": "@commitlint/read",
"type": "module",
"version": "19.0.3",
"version": "19.2.0",
"description": "Read commit messages from a specified range or last edit",

@@ -42,4 +42,3 @@ "main": "lib/read.js",

"@types/git-raw-commits": "^2.0.3",
"@types/minimist": "^1.2.4",
"execa": "^8.0.1"
"@types/minimist": "^1.2.4"
},

@@ -49,6 +48,7 @@ "dependencies": {

"@commitlint/types": "^19.0.3",
"execa": "^8.0.1",
"git-raw-commits": "^4.0.0",
"minimist": "^1.2.8"
},
"gitHead": "9b4ac34069e06cd327760ce37adbde8d537d8e3e"
"gitHead": "a64b417b58b3b1e89f07ff529a29a4af223e9369"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc