pantry/README.md

102 lines
3 KiB
Markdown
Raw Normal View History

2022-08-01 22:43:40 +03:00
![tea](https://tea.xyz/banner.png)
2022-10-31 18:08:38 +03:00
This pantry† represents the most essential open source packages in the world.
We promise to prioritize fixes, updates and robustness for these packages.
We will not lightly accept additions, and thus suggest submitting your pull
request against [pantry.extra] first.
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
> † see [pantry.zero] for “what is a pantry”
2022-10-31 18:08:38 +03:00
# Use with tea/cli
2022-10-31 18:08:38 +03:00
tea/cli clones/updates this pantry and [pantry.extra] when installed with the
installer or when you run `tea --sync`.
2022-10-31 18:08:38 +03:00
At this time pantries are not versioned.
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
# Contributing
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
Create new `package.yml` files namespaced as per our current patterns under
the [`./projects/`] folder.
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
The `package.yml` format is not documented, but it is not complex, pick an
existing entry for tips.
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
You should verify that your package builds before submitting it. At this time
we require that we build all packages ourselves†. `tea` requires that
packages are built to `/opt` to minimize potential build problems. You do not
need to install `tea` to opt first, but you may need to make `/opt` writable
first (`sudo chmod g+w /opt`).
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
```sh
export GITHUB_TOKEN=… # you need a (zero permissions) [PAT]
export TEA_PREFIX=/opt
export TEA_PANTRY_PATH="$PWD"
./scripts/build.ts pkg.com
# ^^ you will need to have installed all dependencies *manually* first
```
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
Packages require a `test` YAML node. This script should thoroughly verify all
the functionality of the package is working. You can run the test with:
2022-10-31 18:08:38 +03:00
```sh
./scripts/test.ts pkg.com
```
2022-10-31 18:08:38 +03:00
tea requires all packages be relocatable. Our CI will verify this for you.
You can check locally by moving the installation from `/opt` to `~/.tea` and
running the test again.
2022-10-31 18:08:38 +03:00
> † we intend to relax this and accept pre-built binaries from third parties
> however we will require third party verification for security reasons.
2022-10-31 18:08:38 +03:00
Now make a pull request! Well test on all platforms we support in the PR. If
it passes both CI and review well merge.
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
## Packaging Guide
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
Our [wiki] is our packaging knowledge base.
For other assistance, start a [discussion].
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
## After Your Contribution
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
We build “bottles” (tard binaries) and upload them to both our centralized
bottle storage and decentralized [IPFS].
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
tea automatically builds new releases of packages *as soon as they are
released* (usually starting the builds within seconds). There is no need to
submit PRs for updates.
 
2022-08-01 22:43:40 +03:00
2022-10-31 18:08:38 +03:00
# Meta
## Dependencies
2022-08-01 22:43:40 +03:00
| Project | Version |
|-------------|---------|
2022-10-30 17:40:37 +03:00
| deno.land | ^1.27 |
2022-08-01 22:43:40 +03:00
| tea.xyz | ^0 |
2022-08-17 15:22:22 +03:00
## Build All
```sh
2022-10-31 18:08:38 +03:00
scripts/ls.ts | scripts/sort.ts | scripts/build.ts
2022-08-17 15:22:22 +03:00
```
2022-09-08 23:40:35 +03:00
## Typecheck
```sh
for x in scripts/*.ts src/app.ts; do
deno check --unstable --import-map=$SRCROOT/import-map.json $x
2022-09-08 23:40:35 +03:00
done
```
2022-10-31 18:08:38 +03:00
[pantry.zero]: ../../../pantry.zero
[pantry.extra]: ../../../pantry.extra
[`./projects/`]: ./projects
[IPFS]: https://ipfs.tech
[PAT]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
[wiki]: ../../../pantry.zero/wiki
[discussion]: https://github.com/orgs/teaxyz/discussions