From cbf55dd0dbb3a6e3a033f7080e68f98e69684748 Mon Sep 17 00:00:00 2001 From: Wojciech Kozyra Date: Thu, 19 Dec 2024 15:52:40 +0100 Subject: [PATCH] Add step by step process for updating API --- DEVELOPMENT.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 54b83fadb..0d9b6210b 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -186,3 +186,18 @@ pnpm run dev Open `localhost:5173` in the browser If Rust code changes you need to rebuild WASM with `pnpm run build-wasm`. + +## Process for introducing API changes + +Everything in the same PR. + +- Update Rust code. +- Run `cargo run --bin generate_from_types` in **`./generate`** that will generate **`./schemas/scene.schema.json`**. +- Run `pnpm run generate-types` in **`./ts`** that will generate **`./ts/live-compositor/src/api.generated.ts`**. +- Update TypeScript code to support new changes. +- Update CHANGELOG + +> To avoid problems with forgetting about adding some changes to TS, everything that shows up in PR diff for + `./ts/live-compositor/src/api.generated.ts` should be addressed in the PR that regenerated those types. + +