Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

happy-conventional-commit

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

happy-conventional-commit - npm Package Compare versions

Comparing version 0.0.18 to 0.1.0

2

lib/ConventionalCommitReleaseNotes.d.ts

@@ -13,2 +13,3 @@ /**

* @param [options.author] "githubUsername" or "nameAndEmail".
* @param [options.authorUsername] Use this username for author when "author" is not specified or if it was not possible to retrieve the Github username based on email.
* @returns Release notes.

@@ -21,2 +22,3 @@ */

author?: 'githubUsername' | 'nameAndEmail';
authorUsername?: string;
}): Promise<string>;

@@ -23,0 +25,0 @@ /**

28

lib/ConventionalCommitReleaseNotes.js

@@ -25,2 +25,3 @@ "use strict";

* @param [options.author] "githubUsername" or "nameAndEmail".
* @param [options.authorUsername] Use this username for author when "author" is not specified or if it was not possible to retrieve the Github username based on email.
* @returns Release notes.

@@ -40,13 +41,23 @@ */

: change.message;
const author = options?.author === 'githubUsername' && change.author.githubUsername
? change.author.githubUsername
: options?.author === 'nameAndEmail'
? `${change.author.name} (${change.author.email})`
: null;
let author = '';
switch (options?.author) {
case 'githubUsername':
author =
change.author.githubUsername || options?.authorUsername
? `@${change.author.githubUsername || options?.authorUsername}`
: null;
break;
case 'nameAndEmail':
author = `${change.author.name} (${change.author.email})`;
break;
default:
author = options?.authorUsername ? `@${options?.authorUsername}` : null;
break;
}
let userAndTask = '';
if (author && change.taskId) {
userAndTask = ` - By **@${author}** in task ${change.taskId}`;
userAndTask = ` - By **${author}** in task ${change.taskId}`;
}
else if (author) {
userAndTask = ` - By **@${author}**`;
userAndTask = ` - By **${author}**`;
}

@@ -217,3 +228,4 @@ else if (change.taskId) {

commits.push({
message,
// Remove @ from message to avoid Github to link to a user.
message: message.replace('@', ''),
author: {

@@ -220,0 +232,0 @@ name: userName,

{
"name": "happy-conventional-commit",
"description": "Tools for getting a happy conventional commit setup.",
"version": "0.0.18",
"version": "0.1.0",
"author": "David Ortner",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -42,2 +42,3 @@ import ChildProcess from 'child_process';

* @param [options.author] "githubUsername" or "nameAndEmail".
* @param [options.authorUsername] Use this username for author when "author" is not specified or if it was not possible to retrieve the Github username based on email.
* @returns Release notes.

@@ -50,2 +51,3 @@ */

author?: 'githubUsername' | 'nameAndEmail';
authorUsername?: string;
}): Promise<string> {

@@ -66,14 +68,24 @@ const releases = await this.getReleases(options);

: change.message;
const author =
options?.author === 'githubUsername' && change.author.githubUsername
? change.author.githubUsername
: options?.author === 'nameAndEmail'
? `${change.author.name} (${change.author.email})`
: null;
let author = '';
switch (options?.author) {
case 'githubUsername':
author =
change.author.githubUsername || options?.authorUsername
? `@${change.author.githubUsername || options?.authorUsername}`
: null;
break;
case 'nameAndEmail':
author = `${change.author.name} (${change.author.email})`;
break;
default:
author = options?.authorUsername ? `@${options?.authorUsername}` : null;
break;
}
let userAndTask = '';
if (author && change.taskId) {
userAndTask = ` - By **@${author}** in task ${change.taskId}`;
userAndTask = ` - By **${author}** in task ${change.taskId}`;
} else if (author) {
userAndTask = ` - By **@${author}**`;
userAndTask = ` - By **${author}**`;
} else if (change.taskId) {

@@ -301,3 +313,4 @@ userAndTask = ` - In task ${change.taskId}`;

commits.push(<ICommit>{
message,
// Remove @ from message to avoid Github to link to a user.
message: message.replace('@', ''),
author: {

@@ -304,0 +317,0 @@ name: userName,

Sorry, the diff of this file is not supported yet

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