How to update packages on universe?

You can reduce the size of the repo further with a sparse-checkout.

Something like

git clone --depth 1 --no-checkout --filter="tree:0" git@github.com:typst/packages
... // cd into the folder
git sparse-checkout init
git sparse-checkout set packages/preview/[your-package-name]
git checkout main

Then you have something like (this is for glossarium), all in all the repo is 7MB on disk.

❯ git count-objects -v
count: 0
size: 0
in-pack: 3638
packs: 4
size-pack: 1745
prune-packable: 0
garbage: 0
size-garbage: 0

To answer the original question:

  1. I have a repository for the package, e.g., GitHub - typst-community/glossarium: Glossarium is a simple typst glossary.
  2. I publish a release on GitHub on the package’s repository
  3. I archive every file that is needed for the package, removing examples and docs, etc. (glossarium/package.sh at master · typst-community/glossarium · GitHub)
  4. I extract the archive on my fork of typst/packages (up-to-date if possible) and commit the new version.
  5. Open a PR for the new release
6 Likes