js/highcharts-master/generate-changelog.js
/**
     * Prepare the log for each product, and sort the result to get all additions, fixes
     * etc. nicely lined up.
     */
Prepare the log for each product, and sort the result to get all additions, fixes
etc. nicely lined up.
Prepare the log for each product and sort the result to get all additions fixes etc . nicely lined up .
function washLog(name, log) {
        var washed = [],
            proceed = true;
        log.forEach(function (item) {
            if (proceed && (new RegExp('official release ---$')).test(item) &&
                    !params.since) {
                proceed = false;
            }
            if (proceed) {
                if (name === 'Highstock' && item.indexOf('Highstock:') === 0) {
                    washed.push(item.replace(/Highstock:\s?/, ''));
                } else if (name === 'Highmaps' && item.indexOf('Highmaps:') === 0) {
                    washed.push(item.replace(/Highmaps:\s?/, ''));
                } else if (name === 'Highcharts' && !/^High(stock|maps):/.test(item)) {
                    washed.push(item);
                }
            }
        });
        if (proceed === true && !params.since) {
            throw 'Last release not located, try setting an older start date.';
        }
        washed.sort();
        var fixes = washed.filter(message => {
            return message.indexOf('Fixed') === 0;
        });
        if (fixes.length > 0) {
            washed = washed.filter(message => {
                return message.indexOf('Fixed') !== 0;
            });
            washed = washed.concat(fixes);
            washed.startFixes = washed.length - fixes.length;
        }
        return washed;
    }
function washLog ( name , log ) { var washed = [ ] , proceed = true ; log . forEach ( function ( item ) { if ( proceed && ( new RegExp ( 'official release ---$' ) ) . test ( item ) && ! params . since ) { proceed = false ; } if ( proceed ) { if ( name === 'Highstock' && item . indexOf ( 'Highstock:' ) === 0 ) { washed . push ( item . replace ( / Highstock:\s? / , '' ) ) ; } else if ( name === 'Highmaps' && item . indexOf ( 'Highmaps:' ) === 0 ) { washed . push ( item . replace ( / Highmaps:\s? / , '' ) ) ; } else if ( name === 'Highcharts' && ! / ^High(stock|maps): / . test ( item ) ) { washed . push ( item ) ; } } } ) ; if ( proceed === true && ! params . since ) { throw 'Last release not located, try setting an older start date.' ; } washed . sort ( ) ; var fixes = washed . filter ( message => { return message . indexOf ( 'Fixed' ) === 0 ; } ) ; if ( fixes . length > 0 ) { washed = washed . filter ( message => { return message . indexOf ( 'Fixed' ) !== 0 ; } ) ; washed = washed . concat ( fixes ) ; washed . startFixes = washed . length - fixes . length ; } return washed ; }
Prepare the log for each product, and sort the result to get all additions, fixes
 etc.
Prepare the log for each product and sort the result to get all additions fixes etc .
// Keep only the commits after the last release // Commits tagged with Highstock or Highmaps // All others go into the Highcharts changelog for review // Last release not found, abort // Sort alphabetically // Pull out Fixes and append at the end