Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor migrate util into persistOptions util #1523

Merged
merged 4 commits into from Apr 29, 2024
Merged

Conversation

greg-schrammel
Copy link
Contributor

@greg-schrammel greg-schrammel commented Apr 26, 2024

Fixes BX-####
Figma link (if any):

What changed (plus any additional context for devs)

replaces the util migrate with a persistOptions so we have more control over the persist options and can make sure it matches the current version with the number of migrations

this could probably be integrated into createStore but I couldn't make the types work right rn

Screen recordings / screenshots

What to test

Comment on lines +110 to +115
if (migrations && migrations.length !== storeVersion) {
throw new Error(`
!! Review the migrations !!
(store name: ${persistOptions.name})
`);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the cool part

Copy link

Here's the packed extension for this build:
rainbowbx-50151fd5573fe6ec5a6e0f011b02c51703174051.zip

@estebanmino
Copy link
Member

we also need this change #1520 (comment) to remove the "degen" label here
image

Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool idea 👌

@greg-schrammel greg-schrammel added this pull request to the merge queue Apr 29, 2024
@greg-schrammel greg-schrammel removed this pull request from the merge queue due to a manual request Apr 29, 2024
@greg-schrammel greg-schrammel added this pull request to the merge queue Apr 29, 2024
Copy link

Here's the packed extension for this build:
rainbowbx-91e5b22bb097f871c98ae9dda487716f4303510d.zip

Merged via the queue into master with commit ead05e9 Apr 29, 2024
17 checks passed
@greg-schrammel greg-schrammel deleted the persist-options branch April 29, 2024 20:36
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-ead05e9e178bcd13afebe9d7f7119709d5316734.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants