function finalizePreviousChange({ removeTrailingNewline = false, } = {}) {
        if (!currentChangeEntry) {
            return;
        }
        // This should never happen in practice, because `mostRecentCategory` is
        // guaranteed to be set if `currentChangeEntry` is set.
        /* istanbul ignore next */
        if (!mostRecentCategory) {
            throw new Error('Cannot finalize change without most recent category.');
        }
        if (removeTrailingNewline && currentChangeEntry.endsWith('\n')) {
            currentChangeEntry = currentChangeEntry.slice(0, currentChangeEntry.length - 1);
        }
        changelog.addChange({
            addToStart: false,
            category: mostRecentCategory,
            description: currentChangeEntry,
            version: mostRecentRelease,
        });
        currentChangeEntry = undefined;
    }
/**
     * Finalize a change entry, adding it to the changelog.
     *
     * This is required because change entries can span multiple lines.
     *
     * @param options
     * @param options.removeTrailingNewline - Indicates that the trailing newline
     * is not a part of the change description, and should therefore be removed.
     */
Finalize a change entry, adding it to the changelog.
This is required because change entries can span multiple lines.

@param options
@param options.removeTrailingNewline - Indicates that the trailing newline
is not a part of the change description, and should therefore be removed.
Finalize a change entry adding it to the changelog . This is required because change entries can span multiple lines . @param options @param options . removeTrailingNewline - Indicates that the trailing newline is not a part of the change description and should therefore be removed .
function finalizePreviousChange({ removeTrailingNewline = false, } = {}) {
        if (!currentChangeEntry) {
            return;
        }
        if (!mostRecentCategory) {
            throw new Error('Cannot finalize change without most recent category.');
        }
        if (removeTrailingNewline && currentChangeEntry.endsWith('\n')) {
            currentChangeEntry = currentChangeEntry.slice(0, currentChangeEntry.length - 1);
        }
        changelog.addChange({
            addToStart: false,
            category: mostRecentCategory,
            description: currentChangeEntry,
            version: mostRecentRelease,
        });
        currentChangeEntry = undefined;
    }
function finalizePreviousChange ( { removeTrailingNewline = false , } = { } ) { if ( ! currentChangeEntry ) { return ; } if ( ! mostRecentCategory ) { throw new Error ( 'Cannot finalize change without most recent category.' ) ; } if ( removeTrailingNewline && currentChangeEntry . endsWith ( '\n' ) ) { currentChangeEntry = currentChangeEntry . slice ( 0 , currentChangeEntry . length - 1 ) ; } changelog . addChange ( { addToStart : false , category : mostRecentCategory , description : currentChangeEntry , version : mostRecentRelease , } ) ; currentChangeEntry = undefined ; }
Finalize a change entry, adding it to the changelog.
Finalize a change entry adding it to the changelog .
// This should never happen in practice, because `mostRecentCategory` is // guaranteed to be set if `currentChangeEntry` is set. /* istanbul ignore next */