Skip to content

Commit f2e4cac

Browse files
github-actions[bot]hckhanh
authored andcommitted
chore(release): bump version package
1 parent 87dba82 commit f2e4cac

File tree

3 files changed

+42
-37
lines changed

3 files changed

+42
-37
lines changed

.changeset/sad-ends-fold.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# afetch
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 5687b56: Initial release of afetch - a type-safe API client with schema validation using Standard Schema.
8+
9+
**Breaking Changes:**
10+
11+
- First major release, establishing the public API
12+
13+
**Features:**
14+
15+
- Type-safe API client with full TypeScript inference
16+
- Schema validation using Standard Schema (compatible with Zod, Valibot, ArkType, etc.)
17+
- Support for path parameters, query parameters, and request body
18+
- Automatic response validation
19+
- Integration with fast-url for URL building
20+
- Comprehensive JSDoc documentation for JSR compliance
21+
22+
**API:**
23+
24+
- `createFetch(schema, baseUrl)`: Creates a typed fetch function
25+
- Exported types: `ApiSchema`, `ApiPath`, `FetchOptions`, `ApiResponse`
26+
27+
**Example:**
28+
29+
```typescript
30+
import { createFetch } from "afetch";
31+
import { z } from "zod";
32+
33+
const api = {
34+
"/users/:id": {
35+
params: z.object({ id: z.number() }),
36+
response: z.object({ id: z.number(), name: z.string() }),
37+
},
38+
};
39+
40+
const apiFetch = createFetch(api, "https://api.example.com");
41+
const user = await apiFetch("/users/:id", { params: { id: 123 } });
42+
```
43+
344
## 0.0.0
445

546
### Initial Release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "afetch",
33
"description": "Type-safe API client with schema validation using Standard Schema",
4-
"version": "0.0.0",
4+
"version": "1.0.0",
55
"author": {
66
"name": "Khánh Hoàng",
77
"email": "[email protected]",

0 commit comments

Comments
 (0)