Socket
Socket
Sign inDemoInstall

@semantic-release/changelog

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-release/changelog - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

24

lib/verify.js

@@ -6,14 +6,20 @@ const {isString, isUndefined} = require('lodash');

const isNonEmptyString = value => isString(value) && value.trim();
const VALIDATORS = {
changelogFile: isNonEmptyString,
changelogTitle: isNonEmptyString,
};
module.exports = pluginConfig => {
const {changelogFile, changelogTitle} = resolveConfig(pluginConfig);
const errors = [];
const options = resolveConfig(pluginConfig);
if (!isUndefined(changelogFile) && !(isString(changelogFile) && changelogFile.trim())) {
errors.push(getError('EINVALIDCHANGELOGFILE', {changelogFile}));
}
const errors = Object.entries(options).reduce(
(errors, [option, value]) =>
!isUndefined(value) && value !== false && !VALIDATORS[option](value)
? [...errors, getError(`EINVALID${option.toUpperCase()}`, {[option]: value})]
: errors,
[]
);
if (!isUndefined(changelogTitle) && !(isString(changelogTitle) && changelogTitle.trim())) {
errors.push(getError('EINVALIDCHANGELOGTITLE', {changelogTitle}));
}
if (errors.length > 0) {

@@ -20,0 +26,0 @@ throw new AggregateError(errors);

{
"name": "@semantic-release/changelog",
"description": "Set of semantic-release plugins for creating or updating a changelog file",
"version": "2.1.0",
"version": "2.1.1",
"author": "Pierre Vanduynslager (https://github.com/pvdlg)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -29,2 +29,3 @@ # @semantic-release/changelog

**Note**: If you use a [shareable configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/shareable-configurations.md#shareable-configurations) that defines one of these options you can set it to `false` in your [**semantic-release** configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration) in order to use the default value.

@@ -31,0 +32,0 @@ ### Usage

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