How to use conventional-changelog - 10 common examples

To help you get started, we’ve selected a few conventional-changelog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LokiJS-Forge / LokiDB / scripts / deploy.ts View on Github external
const changelog_lines = changelog.split("\n");

      CHANGELOG.header = changelog_lines.splice(0, 2).join("\n");
      CHANGELOG.changes = changelog_lines.splice(2, changelog_lines.length - 6).join("\n");

      // Get changelog body.
      const tag_message = run("git", ["cat-file", "-p", COMMIT_TAG])[1].toString().split("\n");
      if (tag_message[0].startsWith("object")) {
        CHANGELOG.body = tag_message.slice(5).join("\n");
      }

      resolve();
    });

    // Generate changelog from commit messages.
    require("conventional-changelog")({
      preset: "angular"
    }).pipe(changelog_buffer);
  });
}
github semantic-release / semantic-release / lib / type / commits.js View on Github external
module.exports = function (from, cb) {
  git.getCommits({
    log: console.log.bind(console),
    warn: console.warn.bind(console),
    from: from
  }, efh(cb)(function (commits) {
    cb(null, commits)
  }))
}
github cerebral / cerebral / sr-prerelease.js View on Github external
commits.map(function (commit) {
    return parseRawCommit(commit.hash + '\n' + commit.message)
  }).filter(function (commit) {
    return !!commit
github marionebl / jogwheel / source / scripts / release-pull-request.js View on Github external
return new Promise((resolve, reject) => {
		const data = [];

		conventionalChangelog({
			preset: 'angular'
		})
		.on('data', chunk => {
			data.push(chunk);
		})
		.on('end', () => {
			resolve(data.join(''));
		})
		.on('error', error => {
			reject(error);
		});
	});
}
github ngrx / router / gulpfile.babel.js View on Github external
gulp.task('changelog', function () {
	return changelog({
		preset: 'angular',
		releaseCount: 0
	})
	.pipe(fs.createWriteStream('CHANGELOG.md'));
});
github semantic-release / semantic-release / src / lib / release-notes.js View on Github external
export default function (cb) {
  const pkg = JSON.parse(readFile('./package.json'))
  const repository = pkg.repository ? parseUrl(pkg.repository.url) : null

  changelog({
    version: pkg.version,
    repository: repository,
    file: false
  }, cb)
}
github ngUpgraders / ng-forward / gulpfile.babel.js View on Github external
gulp.task('changelog', function () {
	return conventionalChangelog({
		preset: 'angular',
		releaseCount: 0
	})
		.pipe(fs.createWriteStream('CHANGELOG.md'));
});
github algolia / shipjs / packages / shipjs / src / step / prepare / updateChangelog.js View on Github external
function runConventionalChangelog({
  args,
  templateContext,
  gitRawCommitsOpts,
  resolve,
  reject,
}) {
  const changelogStream = conventionalChangelog(
    args,
    templateContext,
    gitRawCommitsOpts
  ).on('error', reject);

  const readStream = fs.createReadStream(args.infile).on('error', reject);
  if (args.sameFile) {
    if (args.append) {
      changelogStream
        .pipe(
          fs.createWriteStream(args.outfile, {
            flags: 'a',
          })
        )
        .on('finish', resolve);
    } else {
github fusionstrings / project-fusion / build / tasks / release.js View on Github external
gulp.task('changelog', () => {
  return changelog({
    preset: 'angular',
    releaseCount: 0
  })
  .pipe(fs.createWriteStream(paths.changelog));
});
github pivotal-cf / pivotal-ui / library / tasks / release-prepare.js View on Github external
gulp.task('release-generate-changelog', () => {
  const newChangesStream = changelog(
    {preset: 'angular', warn: log},
    {},
    {},
    {noteKeywords: ['BREAKING CHANGE', 'DEPRECATION WARNING']},
    {transform: commitTransform}
  );

  const oldChangesStream = gulp.src('../CHANGELOG.md')
    .pipe(map((file, cb) => cb(null, file.contents)));

  const latestChangesFileStream = newChangesStream
    .pipe(source('LATEST_CHANGES.md'));

  const changelogFileStream = series(newChangesStream, oldChangesStream)
    .pipe(source('CHANGELOG.md'));

conventional-changelog

Generate a changelog from git metadata.

ISC
Latest version published 7 months ago

Package Health Score

87 / 100
Full package analysis