Zipper-Inc / zipper-functions

The code for zipper.dev and zipper.run. Write and run typescript functions in your browser without having to write any auth, FE, API code.
https://zipper.dev
MIT License
6 stars 2 forks source link

Blog post: Running a migration in Zipper using Zipper #696

Open miguel-nascimento opened 10 months ago

miguel-nascimento commented 10 months ago

Internal: we don't need to explicitly say that the migration code itself was in zipper.dev codebase. It's way more cool hiding this fact :P

The below is just an outline.

How we used Zipper to migrate Zipper

Problem: all Typescript files were .ts but being treated as .tsx, we the user to control if they want .ts or .tsx Solution: move all filenames to .tsx, update imports using a codemod tool

Of course, the solution looks a lot like a script. And Zipper provide an excellent set of tooling to play around with scripts.

We did a pair programming session on Zipper to create the script to run the migration, ran it, and saw in real time our own migration script being updated to .tsx with all the imports fixed

We're happy to say that you can do this if you want too. Zipper has support for database connectors: bring your data, write the script, lets us handle the rest.