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

Provide tools for Datasworn migration #51

Open
rsek opened this issue Jun 16, 2024 · 0 comments
Open

Provide tools for Datasworn migration #51

rsek opened this issue Jun 16, 2024 · 0 comments
Labels
epic A big task that's broken down into constituent tasks.

Comments

@rsek
Copy link
Owner

rsek commented Jun 16, 2024

  • keep a history of generated types/schemata, each in their own folder. simplest way: make it part of e.g. build:schema, with the output path being src/migration/history/{semver}
    • put this in place now to lay groundwork for later
  • programmatically check for relevant schema changes (change name, type, or properties, not description), throw during package build if theres no migration available.
    • should happen for even trivial renames. sometimes thatll mean an empty function, but it needs to be a conscious choice
  • id migrations should include a regex pattern + a replacement template string using the regex capture groups
  • consider ways to make this useful for non-js platforms.
    • id regexes could be presented as a JSON dictionary object (with its own schema). key is the regex string, value is the replacement string. (validation for this: check capture groups by running the replacer function, and seeing if theres any unfilled ones by matching \$\d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic A big task that's broken down into constituent tasks.
Projects
None yet
Development

No branches or pull requests

1 participant