https://github.com/Coekjan/typst-upgrade
Hey! I have implemented the in-place upgradation, so typst-upgrade v1.x is now released 🎉.
Although the code shall only modify your import "@preview/package:version" syntax node, the project is still young and not strictly tested yet (which is in plan). To protect your file, you can first run typst-upgrade /path/to/project --dry-run to check the diff:
$ typst-upgrade /path/to/project --dry-run
Checking ...
- #import "@preview/package:0.1.0"
+ #import "@preview/package:0.2.0"
The diff message is generated by https://crates.io/crates/diff
After confirming the behavior, run typst-upgrade without --dry-run to allow the tool editing your files.
If you find any bugs/vulnerabilities, please report them in the repo issue. And I am very happy to discuss the future works of the tool with YOU 😺!