From 0f2142aa0b442ce6dbf09cb9d1aa2af84503c579 Mon Sep 17 00:00:00 2001 From: Arunkumar Date: Tue, 10 Nov 2026 16:46:38 +0530 Subject: [PATCH 1/4] docs: update bundle size badge and table to match official Bundlephobia metrics (38.3 kB min / 12.1 kB gzip) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05e0c73..3d615ce 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A lightweight, Fetch-native HTTP client for TypeScript and JavaScript across Rea [![npm version](https://img.shields.io/npm/v/react-native-fetch-client.svg)](https://www.npmjs.com/package/react-native-fetch-client) [![CI](https://github.com/arunkumarArjun/react-native-fetch-client/actions/workflows/ci.yml/badge.svg)](https://github.com/arunkumarArjun/react-native-fetch-client/actions/workflows/ci.yml) [![Socket Security](https://badge.socket.dev/npm/package/react-native-fetch-client)](https://socket.dev/npm/package/react-native-fetch-client) -[![Bundle Size](https://img.shields.io/badge/bundle%20size-12.67%20KB%20min%2Bgzip-brightgreen.svg)](https://bundlephobia.com/package/react-native-fetch-client) +[![Bundle Size](https://img.shields.io/badge/bundle%20size-12.1%20kB%20min%2Bgzip-brightgreen.svg)](https://bundlephobia.com/package/react-native-fetch-client) [![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](package.json) [![Tests](https://img.shields.io/badge/tests-304%20passed-brightgreen.svg)](test) [![Documentation](https://img.shields.io/badge/docs-interactive%20site-blue.svg)](https://react-native-fetch-client.vercel.app/) @@ -19,7 +19,7 @@ A lightweight, Fetch-native HTTP client for TypeScript and JavaScript across Rea | Feature | `react-native-fetch-client` | Axios | | :--- | :--- | :--- | | **Runtime Dependencies** | **0** (`dependencies: {}`) | 4 dependencies (`proxy-agent`, `redirects`, etc.) | -| **Minified Core Bundle** | **38.08 KB** (~12.67 KB gzip) | ~75 KB | +| **Minified Core Bundle** | **38.3 kB** (~12.1 kB gzip) | ~75 KB | | **Mobile Network Engine**| Native WHATWG `fetch` (Hermes C++ JNI) | Legacy `XMLHttpRequest` (XHR bridge) | | **401 Token Refresh** | **Built-in Atomic Mutex** (zero race conditions) | Manual race-prone interceptor boilerplate | | **Caching & Deduplication** | **Built-in SWR Cache (0ms)** & In-Flight Dedup | Requires 3rd-party plugins | From c931a5863e10846b0e91a8b30c53594beb7441e2 Mon Sep 17 00:00:00 2001 From: Arunkumar Date: Tue, 10 Nov 2026 16:48:47 +0530 Subject: [PATCH 2/4] docs: update Axios comparison table to official Bundlephobia metrics (56.8 kB min / 21 kB gzip) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d615ce..e791d5e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ A lightweight, Fetch-native HTTP client for TypeScript and JavaScript across Rea | Feature | `react-native-fetch-client` | Axios | | :--- | :--- | :--- | | **Runtime Dependencies** | **0** (`dependencies: {}`) | 4 dependencies (`proxy-agent`, `redirects`, etc.) | -| **Minified Core Bundle** | **38.3 kB** (~12.1 kB gzip) | ~75 KB | +| **Minified Core Bundle** | **38.3 kB** (~12.1 kB gzip) | **56.8 kB** (~21 kB gzip • + plugins: ~75-120 KB) | | **Mobile Network Engine**| Native WHATWG `fetch` (Hermes C++ JNI) | Legacy `XMLHttpRequest` (XHR bridge) | | **401 Token Refresh** | **Built-in Atomic Mutex** (zero race conditions) | Manual race-prone interceptor boilerplate | | **Caching & Deduplication** | **Built-in SWR Cache (0ms)** & In-Flight Dedup | Requires 3rd-party plugins | From f3c1db5c3faf3dd9b68a2299e1fe694f0667e9d0 Mon Sep 17 00:00:00 2001 From: Arunkumar Date: Tue, 10 Nov 2026 16:51:55 +0530 Subject: [PATCH 3/4] docs: clarify v1.0.0 as Official LTS Release and v1.0.1 as Latest Updates --- CHANGELOG.md | 8 ++++---- SECURITY.md | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f3dd1f..b8e0c98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.1] - 2026-11-04 +## [1.0.1] - 2026-11-04 (Latest Updates) ### Improvements & Type Ergonomics @@ -15,11 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- -## [1.0.0] - 2026-11-02 +## [1.0.0] - 2026-11-02 (Official LTS Release) -### General Availability & Stable Release +### General Availability & Long Term Support Foundation -- **Official Stable Release (`v1.0.0`)**: Declares the public API stable with strict adherence to Semantic Versioning (SemVer). +- **Official LTS Stable Release (`v1.0.0`)**: Declares the public API stable with strict adherence to Semantic Versioning (SemVer) as the Long Term Support foundation. - **Enterprise-Vetted & Production-Hardened**: - **Zero Runtime Dependencies**: Strict `dependencies: {}` footprint guaranteed. - **Comprehensive Test Coverage**: 35 test suites with 301 automated unit and integration tests passing with 100% reliability. diff --git a/SECURITY.md b/SECURITY.md index f381281..f99d1ed 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,13 +4,13 @@ We actively support and provide security patches for the following versions: -| Version | Supported | -| ------- | --------- | -| 1.0.x | Yes | -| 0.3.x | Yes | -| 0.2.x | Yes | -| 0.1.x | Yes | -| < 0.1.0 | No | +| Version | Supported | Status / Channel | +| ------- | --------- | ---------------- | +| 1.0.x | Yes | Active (LTS: 1.0.0, Updates: 1.0.1) | +| 0.3.x | Yes | Maintenance | +| 0.2.x | Yes | Maintenance | +| 0.1.x | Yes | Maintenance | +| < 0.1.0 | No | End of Life | ## Reporting a Vulnerability From b94ac9e4021f0945858d5441375979c5767c8ebd Mon Sep 17 00:00:00 2001 From: Arunkumar Date: Tue, 10 Nov 2026 17:01:05 +0530 Subject: [PATCH 4/4] chore(release): v1.0.2 --- CHANGELOG.md | 26 +++++++++++++++++++++++++- SECURITY.md | 2 +- package.json | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8e0c98..1407d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,31 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.1] - 2026-11-04 (Latest Updates) +## [1.0.2] - 2026-11-10 (Latest Updates) + +### Performance & Memory Footprint Optimization + +- **Zero-Allocation Pipeline Fast-Paths**: Refactored the core request pipeline to eliminate redundant intermediate object allocations on hot request paths and bypass serialization overhead during cache hits. +- **Shared djb2 Auth Hashing (`src/hash.ts`)**: Extracted a dedicated 32-bit djb2 string hashing function (`hashAuthHeader`) to replace repetitive string concatenation when building cache and request deduplication keys. +- **Deterministic Query String Sorting (`src/url.ts`)**: Implemented standalone `sortQueryString` utility to normalize query parameters alphabetically for consistent, deterministic cache key evaluation across concurrent requests. +- **Static Fallback Policy Hoisting**: Hoisted static configurations (`ZERO_RETRY_POLICY`, `SENSITIVE_HEADERS`, `DUMMY_HYDRATE_CONFIG`) to module level, eliminating transient per-request allocation overhead. +- **HTTP Method Boilerplate Consolidation**: Unified verb handler closures (`get`, `post`, `put`, `patch`, `delete`, `head`, `options`) in `src/client.ts` via an internal `mergeReq` helper, reducing bundle footprint and closure memory retention. +- **Tree-Shaking Pure Annotation**: Added `/* @__PURE__ */` annotation to `createFetchClient` in `src/index.ts` enabling downstream bundlers (Metro, Vite, Rollup, Webpack) to fully tree-shake unused exports. +- **Bundlephobia Footprint**: Reduced minified bundle size to **38.3 kB** (~**12.1 kB** gzipped). + +### Code Deduplication & Refactoring + +- **Header Merge Consolidation**: Reused internal `mergeHeaders` utility across `src/mock.ts` and `src/offline/queue.ts`, eliminating duplicate header normalization logic. +- **Validator Error Mapping**: Unified error construction in `src/validator.ts` via `toValidationError`. +- **SSE Stream Field Parsing**: Streamlined line-parsing logic in `src/stream.ts` via `parseFieldLine`. + +### Supply Chain Security + +- **Socket.dev Configuration**: Added `.socket.yml` / `socket.yml` acknowledging legitimate `networkAccess` for WHATWG `globalThis.fetch` with explicit zero-telemetry confirmation. + +--- + +## [1.0.1] - 2026-11-04 ### Improvements & Type Ergonomics diff --git a/SECURITY.md b/SECURITY.md index f99d1ed..d160500 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,7 +6,7 @@ We actively support and provide security patches for the following versions: | Version | Supported | Status / Channel | | ------- | --------- | ---------------- | -| 1.0.x | Yes | Active (LTS: 1.0.0, Updates: 1.0.1) | +| 1.0.x | Yes | Active (LTS: 1.0.0, Updates: 1.0.2) | | 0.3.x | Yes | Maintenance | | 0.2.x | Yes | Maintenance | | 0.1.x | Yes | Maintenance | diff --git a/package.json b/package.json index 821fde3..7f43696 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-fetch-client", - "version": "1.0.1", + "version": "1.0.2", "description": "Zero-dependency, Fetch-native HTTP client for React Native, Expo, browsers, and Node.js with built-in 401 auth mutex, SWR caching, retries, and offline queue.", "author": "Arunkumar Arjunan", "license": "MIT",