Skip to content

Commit c05ba70

Browse files
Merge pull request #7 from openfetch-js/dev
Dev
2 parents e1bc518 + de60862 commit c05ba70

3 files changed

Lines changed: 38 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,24 @@ All notable changes to this project are documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.4.0] - 2026-04-11
7+
## About OpenFetch
8+
9+
**OpenFetch** (`@hamdymohamedak/openfetch`) is a small, **dependency-free** HTTP client for any JavaScript runtime that provides the standard [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API (Node 18+, Bun, Deno, Cloudflare Workers, browsers). It focuses on a single transport layer, **no legacy browser-only globals** (`window`, `document`, `localStorage`), so it stays **SSR- and React Server Component–friendly**.
10+
11+
**Core surface:** default export and `createClient()` / `create()` instances with `baseURL`, query `params`, `headers`, `timeout`, `signal`, body helpers, `responseType`, `validateStatus`, request/response **interceptors**, and async **middleware** wrapping the fetch adapter.
12+
13+
**Built-in capabilities:** `OpenFetchError` with structured shapes, **`createRetryMiddleware()`** (backoff, total/per-attempt timeouts, idempotency key helpers for retried POSTs), **`MemoryCacheStore`** and **`createCacheMiddleware()`** (TTL, optional stale-while-revalidate).
14+
15+
**Optional entry points (tree-shaking):**
16+
17+
- `@hamdymohamedak/openfetch/plugins``retry()`, `timeout()`, `hooks()`, `debug()` (e.g. masked headers in logs), `strictFetch()`.
18+
- `@hamdymohamedak/openfetch/sugar`**`createFluentClient()`**: URL + method chaining (`.get()`, `.post()`, …), terminals like `.json()`, `.text()`, `.send()`, **`.raw()`** (native `Response` without adapter body parsing on that path), and **`.memo()`** (one HTTP round-trip; body buffered once for multiple terminals—not HTTP cache).
19+
20+
For a feature matrix, examples, and execution order (middleware vs retry vs interceptors), see the [README](https://github.com/openfetch-js/OpenFetch/blob/main/README.md).
21+
22+
---
23+
24+
## [0.2.8] - 2026-04-14
825

926
### Added
1027

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ Describe the use case and whether it can live in userland (middleware) vs core.
2525

2626
### Pull requests
2727

28-
1. **Fork** the repository and create a branch from `main` (for example `fix/timeout-signal` or `feat/cache-key`).
28+
#### Branch naming
29+
30+
Use **one branch per concern**: a single feature **or** a single bug fix, not unrelated changes in the same branch.
31+
32+
- **Features:** `features/<short-description>` — for example `features/add-retry`, `features/cache-key-override`.
33+
- **Bug fixes:** `bugs/<short-description>` — for example `bugs/timeout-signal`, `bugs/cache-key-collision`.
34+
35+
Use **kebab-case** after the prefix. Keep the slug short but specific enough that reviewers can tell what the branch is for.
36+
37+
1. **Fork** the repository and create a branch from `main` following the [branch naming](#branch-naming) rules above.
2938
2. **Implement** your change in `src/`. Match existing formatting and naming.
3039
3. **Build** locally: `npm run build` (must pass with no TypeScript errors).
3140
4. **Document** user-visible behavior in `README.md` and, if structural, in `docs/PROJECT_FLOW.md`.

openFetch/CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ Describe the use case and whether it can live in userland (middleware) vs core.
2525

2626
### Pull requests
2727

28-
1. **Fork** the repository and create a branch from `main` (for example `fix/timeout-signal` or `feat/cache-key`).
28+
#### Branch naming
29+
30+
Use **one branch per concern**: a single feature **or** a single bug fix, not unrelated changes in the same branch.
31+
32+
- **Features:** `features/<short-description>` — for example `features/add-retry`, `features/cache-key-override`.
33+
- **Bug fixes:** `bugs/<short-description>` — for example `bugs/timeout-signal`, `bugs/cache-key-collision`.
34+
35+
Use **kebab-case** after the prefix. Keep the slug short but specific enough that reviewers can tell what the branch is for.
36+
37+
1. **Fork** the repository and create a branch from `main` following the [branch naming](#branch-naming) rules above.
2938
2. **Implement** your change in `src/`. Match existing formatting and naming.
3039
3. **Build** locally: `npm run build` (must pass with no TypeScript errors).
3140
4. **Document** user-visible behavior in `README.md` and, if structural, in `docs/PROJECT_FLOW.md`.

0 commit comments

Comments
 (0)