deluan / contentful-migrate

🐎 Schema migration tooling for Contentful, with state management
https://www.contentful.com/blog/2018/09/13/content-model-changes-scale-telus-cms-as-code/
MIT License
60 stars 37 forks source link

Typescript compatible template #262

Open bgschiller opened 2 years ago

bgschiller commented 2 years ago

This PR tries to be a happy middle-ground between https://github.com/deluan/contentful-migrate/issues/53 and https://github.com/deluan/contentful-migrate/pull/131. It's minimally invasive, but it's been working for me locally.

I also ran npm audit fix --force and verified that all the tests still pass.

luisrudge commented 2 years ago

@bgschiller with this change, does that mean that migrations will still be javascript files, but the TS compiled will type-check it? Meaning: it will still be a .js file and I can't use types inside the migration.

bgschiller commented 2 years ago

With this change:

I find this is a pretty good balance of convenience and safety