Skip to content

Commit

Permalink
feat: add migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed Oct 9, 2023
1 parent a6c9b33 commit 926b9fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ const setDefaultPluginOptions = (store: Conf<Record<string, unknown>>, plugin: k
};

const migrations = {
'>=2.0.3'(store: Conf<Record<string, unknown>>) {
if (store.get('plugins.discord.hideGitHubButton') === undefined) {
store.set('plugins.discord.hideGitHubButton', false);
}
},
'>=2.0.0'(store: Conf<Record<string, unknown>>) {
if (store.get('plugins.disable-autoplay.applyOnce') === undefined) {
store.set('plugins.disable-autoplay.applyOnce', false);
}
},
'>=1.20.0'(store: Conf<Record<string, unknown>>) {
setDefaultPluginOptions(store, 'visualizer');

Expand Down

0 comments on commit 926b9fb

Please sign in to comment.