How to use the standard-changelog function in standard-changelog

To help you get started, we’ve selected a few standard-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 algolia / shipjs / packages / shipjs-cli / src / util / generateChangelog.js View on Github external
...orgOptions,
      outfile: orgOptions.sameFile ? outfile || infile : outfile,
      infile,
    };
    const releaseCount = options.firstRelease ? 0 : options.releaseCount;

    const outputError = err => {
      if (options.verbose) {
        consoleError(grey(err.stack));
      } else {
        consoleError(error(err.toString()));
      }
      process.exit(1); // eslint-disable-line no-process-exit
    };

    const changelogStream = standardChangelog(options, undefined, {}).on(
      'error',
      outputError
    );
    standardChangelog.createIfMissing(infile);

    let readStream = null;
    if (releaseCount !== 0) {
      readStream = fs.createReadStream(infile).on('error', outputError);
    } else {
      readStream = new Readable();
      readStream.push(null);
    }

    if (options.append) {
      changelogStream
        .pipe(

standard-changelog

Generate a changelog from git metadata with Angular commit convention.

ISC
Latest version published 15 days ago

Package Health Score

87 / 100
Full package analysis