|
| 1 | +# Compas convert |
| 2 | + |
| 3 | +Convert Compas code-bases to TypeScript and beyond. |
| 4 | + |
| 5 | +## Context |
| 6 | + |
| 7 | +We want to migrate all active projects to TypeScript. Allowing us to use migrate to |
| 8 | +TypeScript powered libraries like Zod and Drizzle ORM to replace Compas. |
| 9 | + |
| 10 | +## Goals |
| 11 | + |
| 12 | +- Backwards compatibility; everything runs in production. We should be able to push the |
| 13 | + output of this tool, feature-freeze for a week to execute manual testing and then use |
| 14 | + our normal processes like nothing happened. |
| 15 | +- Completeness; we would rather spend a few extra weeks polishing the output of this tool, |
| 16 | + than to have to do that work later across all projects manually. |
| 17 | +- DX; the developer experience on the converted projects should be better or the same. For |
| 18 | + example, including the migration to Vitest in this tool will enable us to finally have |
| 19 | + IDE support for tests in our projects. |
| 20 | +- Source-to-source; we will only change things in the project structure if it makes sense |
| 21 | + for the new tools. |
| 22 | + |
| 23 | +## TODO |
| 24 | + |
| 25 | +- [ ] Fully implement the 'compas-compat' target in |
| 26 | + [open-api-code-gen](../open-api-code-gen). |
| 27 | +- [ ] Pre-condition: verify project uses '@lightbase/eslint-config' |
| 28 | +- [ ] Pre-condition: verify project uses Compas |
| 29 | +- [ ] Initial: remove jsconfig + setup tsconfig |
| 30 | +- [ ] Initial: copy (almost) all files, renaming them to `.ts` |
| 31 | +- [ ] Pass: function doc blocks to inline types |
| 32 | +- [ ] Pass: @compas/test to Vitest |
| 33 | +- [ ] Pass: inline JSDoc blocks to inline types |
| 34 | +- [ ] Pass: common issues |
| 35 | + - Run TypeScript and find common errors |
| 36 | +- [ ] Pass: build step. Fixup CI, Dockerfile, docs, etc |
| 37 | +- [ ] Pass: Generator compatibility. Create / improve Compas Typescript targets for |
| 38 | + tighter integrations. |
0 commit comments