Taking warpkit updates
Taking warpkit updates
Your app started as a copy of warpkit, so a fix in warpkit does not reach it by itself. make template.update copies the files warpkit owns into your app and leaves your own edits alone.
make template.update FROM=../warpkit # dry run: lists what would change
make template.update FROM=../warpkit WRITE=1 # applies it
make fix && make ci # then commit
FROM is a warpkit checkout on the version you want. Only its committed HEAD is read.
What it changes
Only the files listed in template-sync.json: tooling and checks such as biome.jsonc and scripts/check-*, never your features, routes, config.ts or styles. The versions of the packages listed there (packages) are set to warpkit's in your package.json, then bun install runs.
For each file:
| Result | Meaning |
|---|---|
update | You never changed it. Replaced with warpkit's version. |
merged | You changed it, and your change and warpkit's do not touch the same lines. Both kept. |
conflict | You changed it and no clean merge exists. Your file is untouched; warpkit's version is written beside it as <file>.template-new to merge by hand. |
missing | Not in your app. Pass ADD=1 to add it. |
The command exits with status 2 when any file conflicts.
.template-sync.json records the warpkit commit and the version of each file you last took. Commit it: the next update merges your edits against that version. On the first run there is no record yet, so a file you edited is reported as a conflict rather than merged.
A file your app does not use (a check for a feature you removed) is skipped once you list it under ignore in .template-sync.json:
{ "ignore": ["scripts/check-raw-colors.ts"] }
From the warpkit side
Maintainers of several apps can push from warpkit instead: make template.push TO=../my-app WRITE=1.
Porting one commit
A warpkit fix outside those files (a feature, a route, a server function) is applied as a patch:
make template.port SHA=abc1234 TO="../app-one ../app-two" # dry run
make template.port SHA=abc1234 TO="../app-one ../app-two" WRITE=1 # commit where it applies
It applies only where the lines the commit touches still match warpkit's, and commits there with the original message plus Ported-from: warpkit@<sha>. A repository it does not apply to is left untouched and listed with the files that differ, to port by hand. Files in template-sync.json are skipped, since template.push carries them. Each repository must have no uncommitted changes.
Adding a file to the list
Add a file to template-sync.json only when every app should run the same version of it. A file apps are expected to change belongs outside the list, as config.ts does.