migrateUnreleasedChangesToRelease(version) {
        const releaseChanges = this._changes[version];
        if (!releaseChanges) {
            throw new Error(`Specified release version does not exist: '${version}'`);
        }
        const unreleasedChanges = this._changes[constants_1.unreleased];
        for (const category of Object.keys(unreleasedChanges)) {
            if (releaseChanges[category]) {
                releaseChanges[category] = [
                    ...unreleasedChanges[category],
                    ...releaseChanges[category],
                ];
            }
            else {
                releaseChanges[category] = unreleasedChanges[category];
            }
        }
        this._changes[constants_1.unreleased] = {};
    }
/**
     * Migrate all unreleased changes to a release section.
     *
     * Changes are migrated in their existing categories, and placed above any
     * pre-existing changes in that category.
     *
     * @param version - The release version to migrate unreleased changes to.
     */
Migrate all unreleased changes to a release section.
Changes are migrated in their existing categories, and placed above any
pre-existing changes in that category.

@param version - The release version to migrate unreleased changes to.
Migrate all unreleased changes to a release section . Changes are migrated in their existing categories and placed above any pre - existing changes in that category . @param version - The release version to migrate unreleased changes to .
migrateUnreleasedChangesToRelease(version) {
        const releaseChanges = this._changes[version];
        if (!releaseChanges) {
            throw new Error(`Specified release version does not exist: '${version}'`);
        }
        const unreleasedChanges = this._changes[constants_1.unreleased];
        for (const category of Object.keys(unreleasedChanges)) {
            if (releaseChanges[category]) {
                releaseChanges[category] = [
                    ...unreleasedChanges[category],
                    ...releaseChanges[category],
                ];
            }
            else {
                releaseChanges[category] = unreleasedChanges[category];
            }
        }
        this._changes[constants_1.unreleased] = {};
    }
migrateUnreleasedChangesToRelease ( version ) { const releaseChanges = this . _changes [ version ] ; if ( ! releaseChanges ) { throw new Error ( ` ${ version } ` ) ; } const unreleasedChanges = this . _changes [ constants_1 . unreleased ] ; for ( const category of Object . keys ( unreleasedChanges ) ) { if ( releaseChanges [ category ] ) { releaseChanges [ category ] = [ ... unreleasedChanges [ category ] , ... releaseChanges [ category ] , ] ; } else { releaseChanges [ category ] = unreleasedChanges [ category ] ; } } this . _changes [ constants_1 . unreleased ] = { } ; }
Migrate all unreleased changes to a release section.
Migrate all unreleased changes to a release section .