How to use standard-changelog - 4 common examples

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(
github algolia / shipjs / packages / shipjs-cli / src / util / generateChangelog.js View on Github external
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(
          fs.createWriteStream(options.outfile, {
            flags: 'a',
          })
        )
github algolia / shipjs / packages / shipjs-cli / src / util / generateChangelog.js View on Github external
.on('finish', function() {
          standardChangelog.checkpoint('appended changes to %s', [
            options.outfile,
          ]);
          resolve();
        });
    } else {
github algolia / shipjs / packages / shipjs-cli / src / util / generateChangelog.js View on Github external
.on('finish', function() {
              standardChangelog.checkpoint('output changes to %s', [
                options.outfile,
              ]);
              rimraf.sync(tmp);
              resolve();
            });
        });

standard-changelog

Generate a changelog from git metadata with Angular commit convention.

ISC
Latest version published 7 months ago

Package Health Score

82 / 100
Full package analysis