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

conventional-changelog-writer

Package Overview
Dependencies
Maintainers
8
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conventional-changelog-writer - npm Package Compare versions

Comparing version 4.0.17 to 4.0.18

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [4.0.18](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.17...conventional-changelog-writer@4.0.18) (2020-11-05)
### Bug Fixes
* **deps:** update dependency through2 to v4 ([#657](https://github.com/conventional-changelog/conventional-changelog/issues/657)) ([7ae618c](https://github.com/conventional-changelog/conventional-changelog/commit/7ae618c81491841e5b1d796d3933aac0c54bc312))
## [4.0.17](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.16...conventional-changelog-writer@4.0.17) (2020-06-20)

@@ -8,0 +19,0 @@

33

cli.js
#!/usr/bin/env node
'use strict'
var conventionalChangelogWriter = require('./')
var forEach = require('lodash').forEach
var fs = require('fs')
var meow = require('meow')
var path = require('path')
var split = require('split')
const conventionalChangelogWriter = require('./')
const forEach = require('lodash').forEach
const fs = require('fs')
const meow = require('meow')
const path = require('path')
const split = require('split')
var cli = meow(`
const cli = meow(`
Usage

@@ -35,4 +35,4 @@ conventional-changelog-writer <path> [<path> ...]

var filePaths = []
var flags = cli.flags
const filePaths = []
const flags = cli.flags

@@ -43,6 +43,6 @@ forEach(cli.input, function (input) {

var length = filePaths.length
const length = filePaths.length
var templateContext
var contextPath = flags.context
let templateContext
const contextPath = flags.context
if (contextPath) {

@@ -57,4 +57,4 @@ try {

var options
var optionsPath = flags.options
let options
const optionsPath = flags.options
if (optionsPath) {

@@ -69,4 +69,5 @@ try {

let stream
try {
var stream = conventionalChangelogWriter(templateContext, options)
stream = conventionalChangelogWriter(templateContext, options)
} catch (err) {

@@ -78,3 +79,3 @@ console.error(err.toString())

function processFile (fileIndex) {
var filePath = filePaths[fileIndex]
const filePath = filePaths[fileIndex]
fs.createReadStream(filePath)

@@ -81,0 +82,0 @@ .on('error', function (err) {

'use strict'
var dateFormat = require('dateformat')
var join = require('path').join
var readFileSync = require('fs').readFileSync
var semverValid = require('semver').valid
var through = require('through2')
var util = require('./lib/util')
var _ = require('lodash')
const dateFormat = require('dateformat')
const join = require('path').join
const readFileSync = require('fs').readFileSync
const semverValid = require('semver').valid
const through = require('through2')
const util = require('./lib/util')
const _ = require('lodash')
function conventionalChangelogWriter (context, options) {
var savedKeyCommit
var commits = []
var firstRelease = true
var neverGenerated = true
let savedKeyCommit
let commits = []
let firstRelease = true
let neverGenerated = true

@@ -69,3 +69,3 @@ context = _.extend({

var generateOn = options.generateOn
let generateOn = options.generateOn
if (_.isString(generateOn)) {

@@ -88,5 +88,5 @@ generateOn = function (commit) {

try {
var result
var commit = util.processCommit(chunk, options.transform, context)
var keyCommit = commit || chunk
let result
const commit = util.processCommit(chunk, options.transform, context)
const keyCommit = commit || chunk

@@ -150,3 +150,3 @@ // previous blocks of logs

try {
var result = util.generate(options, commits, context, savedKeyCommit)
const result = util.generate(options, commits, context, savedKeyCommit)

@@ -153,0 +153,0 @@ if (options.includeDetails) {

'use strict'
var compareFunc = require('compare-func')
var conventionalCommitsFilter = require('conventional-commits-filter')
var Handlebars = require('handlebars')
var semver = require('semver')
var _ = require('lodash')
var stringify = require('json-stringify-safe')
const compareFunc = require('compare-func')
const conventionalCommitsFilter = require('conventional-commits-filter')
const Handlebars = require('handlebars')
const semver = require('semver')
const _ = require('lodash')
const stringify = require('json-stringify-safe')
function compileTemplates (templates) {
var main = templates.mainTemplate
var headerPartial = templates.headerPartial
var commitPartial = templates.commitPartial
var footerPartial = templates.footerPartial
var partials = templates.partials
const main = templates.mainTemplate
const headerPartial = templates.headerPartial
const commitPartial = templates.commitPartial
const footerPartial = templates.footerPartial
const partials = templates.partials

@@ -47,4 +47,4 @@ if (_.isString(headerPartial)) {

function getCommitGroups (groupBy, commits, groupsSort, commitsSort) {
var commitGroups = []
var commitGroupsObj = _.groupBy(commits, function (commit) {
const commitGroups = []
const commitGroupsObj = _.groupBy(commits, function (commit) {
return commit[groupBy] || ''

@@ -76,7 +76,7 @@ })

function getNoteGroups (notes, noteGroupsSort, notesSort) {
var retGroups = []
const retGroups = []
_.forEach(notes, function (note) {
var title = note.title
var titleExists = false
const title = note.title
let titleExists = false

@@ -113,3 +113,3 @@ _.forEach(retGroups, function (group) {

function processCommit (chunk, transform, context) {
var commit
let commit

@@ -133,3 +133,3 @@ try {

_.forEach(transform, function (el, path) {
var value = _.get(commit, path)
let value = _.get(commit, path)

@@ -151,3 +151,3 @@ if (_.isFunction(el)) {

function getExtraContext (commits, notes, options) {
var context = {}
const context = {}

@@ -164,5 +164,5 @@ // group `commits` by `options.groupBy`

function generate (options, commits, context, keyCommit) {
var notes = []
var filteredCommits
var compiled = compileTemplates(options)
let notes = []
let filteredCommits
const compiled = compileTemplates(options)

@@ -169,0 +169,0 @@ if (options.ignoreReverted) {

{
"name": "conventional-changelog-writer",
"version": "4.0.17",
"version": "4.0.18",
"description": "Write logs based on conventional commits and templates",

@@ -40,3 +40,3 @@ "bugs": {

"compare-func": "^2.0.0",
"conventional-commits-filter": "^2.0.6",
"conventional-commits-filter": "^2.0.7",
"dateformat": "^3.0.0",

@@ -46,6 +46,6 @@ "handlebars": "^4.7.6",

"lodash": "^4.17.15",
"meow": "^7.0.0",
"meow": "^8.0.0",
"semver": "^6.0.0",
"split": "^1.0.0",
"through2": "^3.0.0"
"through2": "^4.0.0"
},

@@ -61,3 +61,3 @@ "scripts": {

},
"gitHead": "3dedddc397e7cbcf5a2ff971ca933992b9e4d11f"
"gitHead": "cc567b98facf71315f4b1620d81ce01d155efaca"
}
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