Skip to content

Commit 995773d

Browse files
committed
chore: contribution and security guidelines
1 parent 82ebf7d commit 995773d

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to @avensio/graph
2+
3+
Thanks for helping improve the graph data-structure! This document explains how to get started, what quality gates we expect, and how releases are coordinated.
4+
5+
## Project layout
6+
7+
- **Source** lives under `src/` (lists, queues, heaps, etc.)
8+
- **Tests** live under `test/` (Vitest) with micro-benchmarks under `test/benchmarks/`
9+
- **Docs** live under `docs/` and are rendered via VitePress
10+
- **Tooling** scripts live in `scripts/` (including git hooks)
11+
12+
## Prerequisites
13+
14+
- Node.js 20+ and pnpm 10.20+
15+
- Run `pnpm install` from the repo root (monorepo) so shared tooling is linked
16+
17+
## Workflow
18+
19+
1. **Create a branch** from `main`.
20+
2. **Develop with safety nets**:
21+
- `pnpm dev` for watch mode with coverage
22+
- `pnpm test` for the full Vitest suite
23+
- `pnpm bench` for micro-benchmarks when touching performance-sensitive paths
24+
3. **Update docs** alongside code:
25+
- Page content in `docs/*.md`
26+
- API reference via `pnpm docs:api`
27+
4. **Validate the docs site**: `pnpm docs:dev` and `pnpm docs:build && pnpm docs:preview`
28+
5. **Commit and create PR**; `scripts/hooks/commit-msg.mjs` enforces commitlint with tags given in `changelog.config.ts`
29+
30+
Before pushing, run:
31+
32+
```bash
33+
pnpm lint
34+
pnpm test
35+
```
36+
37+
## Pull requests
38+
39+
- Keep changes focused; separate refactors from features/fixes.
40+
- Add tests for regressions or new behavior.
41+
- Update docs and changelog entries when user-facing changes occur.
42+
- Reference related issues (e.g., `Fixes #123`).
43+
44+
## Release process
45+
46+
Releases are handled via the `pnpm release` script, which runs tests, builds, generates docs, and updates the changelog. The [mono-repo](https://github.com/Avensio/avensio) contains CI workflows that publish documentation and packages once changes land on `main`.
47+
48+
If you need to cut a release manually:
49+
50+
```bash
51+
pnpm release
52+
# follow the prompts and push the resulting tag
53+
```
54+
55+
## Reporting bugs & requesting features
56+
57+
Use the GitHub issue templates (`Bug report` / `Feature request`). Provide reproducible steps, environment details, and failing tests where possible.
58+
59+
## Security
60+
61+
Please follow the steps in [SECURITY.md](./SECURITY.md) for reporting vulnerabilities privately.
62+
63+
## License
64+
65+
By contributing, you agree that your contributions are licensed under the MIT License.

SECURITY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Security Policy
2+
3+
## Supported versions
4+
5+
| Version | Supported |
6+
| ------- | --------- |
7+
| Latest release (`main`) ||
8+
| Older releases ||
9+
10+
We focus fixes on the latest published version of `@avensio/graph`. If you depend on an older release, please upgrade before reporting issues when possible.
11+
12+
## Reporting a vulnerability
13+
14+
1. **Do not** open a public issue.
15+
2. Email `security@avensio.de` (or use the contact form on [https://www.avensio.de](https://www.avensio.de)) with:
16+
- A detailed description of the vulnerability.
17+
- Steps or proof-of-concept to reproduce it.
18+
- The environment (Node.js version, browser, OS).
19+
3. You will receive acknowledgement within 3 business days.
20+
4. We will work with you on a fix timeline and publish a disclosure once a patched version is available.
21+
22+
Thank you for helping keep the Avensio ecosystem safe.

0 commit comments

Comments
 (0)