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

Extract cache migration code out of store.ts #1324

Open
samayer12 opened this issue Oct 23, 2024 · 0 comments
Open

Extract cache migration code out of store.ts #1324

samayer12 opened this issue Oct 23, 2024 · 0 comments

Comments

@samayer12
Copy link
Collaborator

samayer12 commented Oct 23, 2024

Describe what should be investigated or refactored

Related to #959 and #1323. store.ts has some hard-to-test code for migrating values when updating the store cache. Find a way to extract the migration logic that's part of PeprControllerStore.#migrateAndSetupWatch() into an isolated function that can be maintained independently.

Start this issue after #1259 is merged.

Links to any relevant code

Reference branch 1324-migration-refactor-reference for a starting point. Examine storeCache.ts and storeCache.test.ts to start out.

Additional context

You'll need to examine the type definitions and manage differences between cache entries of type Record<string, Operation> and DataStore entries which are defined as Record<string, string>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant