This document describes how to participate in @hamdymohamedak/openfetch through GitHub: issues, discussions, and pull requests.
These rules keep reviews predictable and the library safe across runtimes:
- Stay on
fetch. Do not add XMLHttpRequest, alternate fetch shims as required dependencies, or polyfills that assume a browser. - Avoid browser-only globals. Do not reference
window,document,localStorage,sessionStorage,WebSocket, orEventSourcein library code. - Keep the public API small. Prefer new behavior as optional middleware or clearly documented config rather than breaking existing callers.
- TypeScript source of truth. Implementation lives under
src/;dist/is build output fromnpm run build.
Open an issue on this repository with:
- Runtime and version (Node, Bun, Deno, worker, browser).
- Minimal code sample and expected vs actual behavior.
- If relevant, the target URL shape (without secrets).
Open an issue first. Describe the use case and whether it can live in userland (middleware) vs core. Large features should be agreed in an issue before a large pull request.
Use one branch per concern: one feature or one bug fix, not unrelated changes together.
- Features:
features/<short-description>— e.g.features/add-retry,features/cache-key-override. - Bug fixes:
bugs/<short-description>— e.g.bugs/timeout-signal,bugs/cache-key-collision.
Use kebab-case after the prefix. Keep the slug short but specific enough that reviewers can tell what the branch is for.
- Fork this repository and create a branch from
mainusing the branch naming rules above. - Implement in
src/. Match existing formatting and naming. - Build locally:
npm run build(no TypeScript errors). - Document user-visible behavior in
README.mdand, if structural, indocs/PROJECT_FLOW.md. - Open a pull request into
mainwith:- A clear title and description.
- What changed and why.
- Any breaking changes called out explicitly.
From a clone of your fork:
npm install
npm run build
npm run test:securitynpm run test:security runs security-tests/. The TypeScript compile step is the gate for every change.
Use short, imperative subjects (e.g. Add cache key override option). Add a body when extra context helps reviewers reading the PR on GitHub.
Maintainers may ask for tests, naming tweaks, or doc updates on the PR. Smaller, single-concern PRs are easier to review and merge.
Be respectful and professional in issues and pull requests. Focus feedback on the work, not the person.