<commit_before>import { SiteConfig, Config, SiteConfigLookup, SiteConfigIndex } from "./config";
import { defaultSiteConfig } from "./DefaultSiteConfig";

export class ConfigMigrations {
    public migrateToVersion7(current: Config) {
        if (current.notificationCountSavePassword > 6) {
            Object.assign(current, {
                notificationCountSavePassword: 6,
                version: 7
            } as Partial<Config>);
        }
    }

    public migrateToVersion6(current: Config) {
        Object.assign(current, {
            animateWhenOfferingSave: true,
            version: 6
        } as Partial<Config>);
    }

    public migrateToVersion5(current: Config) {
        Object.assign(current, {
            notifyPasswordAvailableForPaste: true,<commit_msg>Fix minor migration bug<commit_after>import { SiteConfig, Config, SiteConfigLookup, SiteConfigIndex } from "./config";
import { defaultSiteConfig } from "./DefaultSiteConfig";

export class ConfigMigrations {
    public migrateToVersion7(current: Config) {
        if (current.notificationCountSavePassword > 6) {
            Object.assign(current, {
                notificationCountSavePassword: 6,
                version: 7
            } as Partial<Config>);
        } else {
            Object.assign(current, { version: 7 } as Partial<Config>);
        }
    }

    public migrateToVersion6(current: Config) {
        Object.assign(current, {
            animateWhenOfferingSave: true,
            version: 6
        } as Partial<Config>);
    }

    public migrateToVersion5(current: Config) {
        Object.assign(current, {
            notifyPasswordAvailableForPaste: true,
{'fraction_non_alphanumeric': 0.09221556886227544, 'fraction_numerical': 0.008982035928143712, 'mean_word_length': 2.474012474012474, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3919193', 'n_tokens_mistral': 445, 'n_tokens_neox': 419, 'n_words': 94}