You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to make migrating to newer versions of this project as easy as possible, and to do that we have a migration script so that users can just run a command and have their projects automatically migrated to the most recent version.
Currently, the migration script (implemented in bin.cjs) is deceptively simple, and does the following:
Checks whether the current folder is actually a promises-training repo
Copies new files
Reinstalls dependencies
The "copies new files" step is the most sensitive one, as we want to update all "internal" files, like the ones inside src/lib, src/tests, but we want to leave existing files under src/execises untouched, as we don't want to erase users's solutions.
This migration script works in a very naive way as it doesn't consider that different versions might need different migration strategies.
Moving forward we want to use a migration approach that's similar to how database migrations work, where every time we have a new version we'll also have a migration that takes care of the specific migration between the previous and the current version, this way we only need to apply migrations in sequence and each migration can be independent of previous ones.
To do that we need:
A set of helpers to address common migration tasks, like copying specific files, merging old and new dependencies (because users might have installed their own dependencies so we can't just overwrite them), etc
An "orchestrator" that will be responsible for identifying which migrations need to be run according to the current version of the user's repo and the existing migrations
The text was updated successfully, but these errors were encountered:
We want to make migrating to newer versions of this project as easy as possible, and to do that we have a migration script so that users can just run a command and have their projects automatically migrated to the most recent version.
Currently, the migration script (implemented in
bin.cjs
) is deceptively simple, and does the following:promises-training
repoThe "copies new files" step is the most sensitive one, as we want to update all "internal" files, like the ones inside
src/lib
,src/tests
, but we want to leave existing files undersrc/execises
untouched, as we don't want to erase users's solutions.This migration script works in a very naive way as it doesn't consider that different versions might need different migration strategies.
Moving forward we want to use a migration approach that's similar to how database migrations work, where every time we have a new version we'll also have a migration that takes care of the specific migration between the previous and the current version, this way we only need to apply migrations in sequence and each migration can be independent of previous ones.
To do that we need:
The text was updated successfully, but these errors were encountered: