Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
180de79462 |
No files matched your search
@@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Something behaves differently from what the docs or the types promise
|
|
||||||
labels: bug
|
|
||||||
---
|
|
||||||
|
|
||||||
## What happened
|
|
||||||
|
|
||||||
## What you expected
|
|
||||||
|
|
||||||
## Minimal reproduction
|
|
||||||
|
|
||||||
The smallest module and route that shows it:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Environment
|
|
||||||
|
|
||||||
- green-tea version:
|
|
||||||
- Runtime and version: <!-- Node 20.11 / Deno 2.1 / Bun 1.1 / Cloudflare Workers -->
|
|
||||||
- OS:
|
|
||||||
|
|
||||||
<!--
|
|
||||||
If it works on one runtime and not another, say which. That difference is
|
|
||||||
usually the bug rather than a detail of it.
|
|
||||||
-->
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Design questions, scope decisions and "should this live in core?" threads don't fit a
|
|
||||||
# bug form, and they are most of what gets filed here. Keep the blank option available.
|
|
||||||
blank_issues_enabled: true
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!--
|
|
||||||
Opening this from a fork on GitHub? The base branch must be `contrib`, not `main`.
|
|
||||||
See CONTRIBUTING.md for why, and for the worked example.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## What this changes
|
|
||||||
|
|
||||||
<!-- A sentence or two, on the why rather than the what. -->
|
|
||||||
|
|
||||||
Closes #
|
|
||||||
|
|
||||||
## Checklist
|
|
||||||
|
|
||||||
- [ ] Commits are signed off (`git commit -s`)
|
|
||||||
- [ ] `npm run lint`, `npm run format:check`, `npm run typecheck` and `npm test` pass locally
|
|
||||||
- [ ] New behavior has a test
|
|
||||||
- [ ] A new public option or method is also declared in `src/app/types.ts`, and noted in `README.md`
|
|
||||||
- [ ] Behavior is the same on Node, Deno and Bun — or the difference is deliberate, and said out loud here
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [develop, main, contrib]
|
branches: [develop, main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [develop, main, contrib]
|
branches: [develop, main]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -13,23 +13,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- run: npm audit
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm run format:check
|
- run: npm run format:check
|
||||||
- run: npm run complexity:check
|
- run: npm run complexity:check
|
||||||
- run: npm run typecheck
|
- run: npm run typecheck
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
# Supply chain, deliberately after the code gates: an advisory published by a third party
|
|
||||||
# must never decide whether a contributor gets to see their own lint and typecheck output.
|
|
||||||
# Only what we ship blocks — with `reflect-metadata` as the sole runtime dependency, a
|
|
||||||
# production advisory is rare and genuinely reaches users. Build tooling only reports.
|
|
||||||
- run: npm audit --omit=dev
|
|
||||||
- run: npm audit
|
|
||||||
continue-on-error: true
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22.12'
|
node-version: '22.12'
|
||||||
- run: npm ci --prefix website
|
- run: npm ci --prefix website
|
||||||
- run: npm audit --prefix website
|
- run: npm audit --prefix website
|
||||||
continue-on-error: true
|
|
||||||
- run: npm run docs:build
|
- run: npm run docs:build
|
||||||
+3
-49
@@ -2,36 +2,6 @@
|
|||||||
|
|
||||||
Thanks for your interest. green-tea is open source, but not anyone can push directly — contributions land through reviewed pull/merge requests with a **DCO sign-off**.
|
Thanks for your interest. green-tea is open source, but not anyone can push directly — contributions land through reviewed pull/merge requests with a **DCO sign-off**.
|
||||||
|
|
||||||
## Where to send your changes
|
|
||||||
|
|
||||||
Development happens on a private Gitea instance. The GitHub repository is a downstream mirror: it receives `main` and release tags, and nothing else. Which branch you target depends on where you are.
|
|
||||||
|
|
||||||
**From GitHub, if you are an outside contributor:** open your pull request against **`contrib`**. Not `main`. `main` on GitHub is a mirror of released code, and merging into it puts the two forges out of sync and breaks the next release push. A maintainer reviews on `contrib` and then carries your commits upstream into Gitea's `develop`, with your authorship and your sign-off intact.
|
|
||||||
|
|
||||||
**From Gitea, if you have access:** follow the branch model below.
|
|
||||||
|
|
||||||
### Worked example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# fork Expressive-Tea/green-tea on GitHub, then
|
|
||||||
git clone git@github.com:<you>/green-tea.git
|
|
||||||
cd green-tea
|
|
||||||
git remote add upstream https://github.com/Expressive-Tea/green-tea.git
|
|
||||||
git fetch upstream
|
|
||||||
|
|
||||||
# branch from contrib, not from main
|
|
||||||
git checkout -b fix/close-timeout upstream/contrib
|
|
||||||
|
|
||||||
# ... make the change, add a test ...
|
|
||||||
|
|
||||||
git commit -s -m "fix: add a timeout to app.close()"
|
|
||||||
git push origin fix/close-timeout
|
|
||||||
```
|
|
||||||
|
|
||||||
Then open the pull request with **`contrib`** as the base branch.
|
|
||||||
|
|
||||||
`contrib` tracks released code, so it is reset to `main` after each release. If your branch has been open across one, rebase onto the new `contrib` before pushing again.
|
|
||||||
|
|
||||||
## Developer Certificate of Origin (DCO)
|
## Developer Certificate of Origin (DCO)
|
||||||
|
|
||||||
We use the [Developer Certificate of Origin](./DCO) instead of a CLA. It's a lightweight, per-commit affirmation that you have the right to submit your work under the project's license. No copyright assignment, no paperwork.
|
We use the [Developer Certificate of Origin](./DCO) instead of a CLA. It's a lightweight, per-commit affirmation that you have the right to submit your work under the project's license. No copyright assignment, no paperwork.
|
||||||
@@ -56,13 +26,6 @@ To sign off a range you forgot to sign:
|
|||||||
git rebase --signoff <base>
|
git rebase --signoff <base>
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, for the commit you just made:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git commit --amend -s
|
|
||||||
git push --force-with-lease
|
|
||||||
```
|
|
||||||
|
|
||||||
## Branch model (GitFlow)
|
## Branch model (GitFlow)
|
||||||
|
|
||||||
- `main` — production-ready, protected. No direct pushes.
|
- `main` — production-ready, protected. No direct pushes.
|
||||||
@@ -70,7 +33,6 @@ git push --force-with-lease
|
|||||||
- `feature/<name>` — branch from `develop`.
|
- `feature/<name>` — branch from `develop`.
|
||||||
- `hotfix/<name>` — branch from `main`.
|
- `hotfix/<name>` — branch from `main`.
|
||||||
- `release/<version>` — release stabilization.
|
- `release/<version>` — release stabilization.
|
||||||
- `contrib` — GitHub only. Where outside contributions land before a maintainer moves them to `develop`.
|
|
||||||
|
|
||||||
`main` and `develop` are protected: they require a reviewed MR and signed-off commits. (Branch protection is configured on the git server, not in this repo.)
|
`main` and `develop` are protected: they require a reviewed MR and signed-off commits. (Branch protection is configured on the git server, not in this repo.)
|
||||||
|
|
||||||
@@ -78,25 +40,17 @@ git push --force-with-lease
|
|||||||
|
|
||||||
Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `chore:`, `docs:`, `test:`, `refactor:`. Focus the message on the *why*. Do not add AI co-authoring attribution.
|
Follow [Conventional Commits](https://www.conventionalcommits.org/): `feat:`, `fix:`, `chore:`, `docs:`, `test:`, `refactor:`. Focus the message on the *why*. Do not add AI co-authoring attribution.
|
||||||
|
|
||||||
## Before you open a pull request
|
## Before you open an MR
|
||||||
|
|
||||||
Run what CI runs:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run lint
|
|
||||||
npm run format:check
|
|
||||||
npm run typecheck # must be clean — this includes the compile-time-guarantee type test
|
|
||||||
npm test # all tests must pass
|
npm test # all tests must pass
|
||||||
|
npm run typecheck # must be clean — this includes the compile-time-guarantee type test
|
||||||
```
|
```
|
||||||
|
|
||||||
- Write tests for new behavior (TDD welcome). We use Vitest.
|
- Write tests for new behavior (TDD welcome). We use Vitest.
|
||||||
- Keep runtime dependencies at zero beyond `reflect-metadata`.
|
- Keep runtime dependencies at zero beyond `reflect-metadata`.
|
||||||
- A new option or method on a public interface has to change that interface too. An implementation that grows a parameter without `src/app/types.ts` growing it as well is unreachable for anyone consuming the package.
|
|
||||||
- New public API needs a doc note in `README.md`.
|
- New public API needs a doc note in `README.md`.
|
||||||
- If your change only works on one runtime, say so in the pull request. green-tea runs on Node, Deno, Bun and the edge, and behavior that quietly differs between them is treated as a bug — an explicit "not available here" is fine, silence is not.
|
|
||||||
|
|
||||||
On GitHub, workflows do not run on pull requests from forks until a maintainer approves them, so your first push may sit without any checks for a while. That is not a rejection.
|
|
||||||
|
|
||||||
## Reporting issues
|
## Reporting issues
|
||||||
|
|
||||||
Open an issue with a minimal reproduction: green-tea version, runtime and version, and the smallest module/route that shows the problem.
|
Open an issue with a minimal reproduction: green-tea version, Node version, and the smallest module/route that shows the problem.
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@green-tea/core",
|
"name": "@green-tea/core",
|
||||||
"version": "26.8.0-beta.0",
|
"version": "26.8.0-beta.0",
|
||||||
"description": "A zen, opinionated, type-safe framework \u2014 your API is a graph, not a middleware chain.",
|
"description": "You declare what each step needs and provides; green-tea computes the execution order, fails at boot if something is missing, and prints the whole pipeline. HTTP, SSE and WebSocket on Node, Deno, Bun and the edge.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "green-tea contributors",
|
"author": "green-tea contributors",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in new issue
Block a user