Skip to content

Commit 754b31a

Browse files
authored
Update min size (#1851)
1 parent 30fc7f9 commit 754b31a

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

docs/openapi-fetch/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: openapi-fetch
44

55
<img src="/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />
66

7-
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **5 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
7+
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **6 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
88

99
| Library | Size (min) | “GET” request\* |
1010
| :------------------------- | ---------: | :------------------------- |
@@ -17,7 +17,7 @@ openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Wei
1717

1818
_\* [Benchmarks are approximate](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._
1919

20-
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 5 kb package.
20+
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 6 kb package.
2121

2222
::: code-group
2323

@@ -56,7 +56,7 @@ Notice there are no generics, and no manual typing. Your endpoint’s request an
5656
- ✅ No manual typing of your API
5757
- ✅ Eliminates `any` types that hide bugs
5858
- ✅ Also eliminates `as` type overrides that can also hide bugs
59-
- ✅ All of this in a **5 kb** client package 🎉
59+
- ✅ All of this in a **6 kb** client package 🎉
6060

6161
## Setup
6262

docs/zh/openapi-fetch/index.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ title: openapi-fetch
44

55
<img src="/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />
66

7-
`openapi-fetch`是一个类型安全的`fetch`客户端,用于拉取您的OpenAPI模式。大小为**5 kb**,几乎没有运行时。适用于React、Vue、Svelte或纯JS。
7+
`openapi-fetch`是一个类型安全的`fetch`客户端,用于拉取您的OpenAPI模式。大小为**6 kb**,几乎没有运行时。适用于React、Vue、Svelte或纯JS。
88

99
|| 大小(最小) | “GET” 请求 |
1010
| :------------------------- | -----------: | :-------------------------- |
11-
| openapi-fetch | `5 kB` | `278k` 操作/秒(最快) |
12-
| openapi-typescript-fetch | `4 kB` | `130k` 操作/秒(2.1× 较慢) |
13-
| axios | `32 kB` | `217k` 操作/秒(1.3× 较慢) |
14-
| superagent | `55 kB` | `63k` 操作/秒(4.4× 较慢) |
15-
| openapi-typescript-codegen | `367 kB` | `106k` 操作/秒(2.6× 较慢) |
11+
| openapi-fetch | `6 kB` | `300k` 操作/秒(最快) |
12+
| openapi-typescript-fetch | `3 kB` | `300k` 操作/秒(最快) |
13+
| feature-fetch | `15 kB` | `300k` ops/s (fastest) |
14+
| axios | `32 kB` | `225k` 操作/秒(1.3× 较慢) |
15+
| superagent | `55 kB` | `50k` 操作/秒(6× 较慢) |
16+
| openapi-typescript-codegen | `367 kB` | `100k` 操作/秒(3× 较慢) |
1617

1718
语法灵感来自流行的库,如`react-query``Apollo client`,但没有所有这些功能,并且包大小仅为5 kb。
1819

@@ -53,7 +54,7 @@ await client.PUT("/blogposts", {
5354
- ✅ 无需手动输入API
5455
- ✅ 消除隐藏错误的 `any` 类型
5556
- ✅ 还消除了可能隐藏错误的 `as` 类型覆盖
56-
- ✅ 所有这些都在一个 **5 kb** 的客户端包中 🎉
57+
- ✅ 所有这些都在一个 **6 kb** 的客户端包中 🎉
5758

5859
## 安装
5960

packages/openapi-fetch/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img src="../../docs/public/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />
22

3-
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **5 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
3+
openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **6 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
44

55
| Library | Size (min) | “GET” request\* |
66
| :------------------------- | ---------: | :------------------------- |
@@ -13,7 +13,7 @@ openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Wei
1313

1414
_\* [Benchmarks are approximate](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._
1515

16-
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 5 kb package.
16+
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 6 kb package.
1717

1818
```ts
1919
import createClient from "openapi-fetch";
@@ -48,7 +48,7 @@ Notice there are no generics, and no manual typing. Your endpoint’s request an
4848
- ✅ No manual typing of your API
4949
- ✅ Eliminates `any` types that hide bugs
5050
- ✅ Also eliminates `as` type overrides that can also hide bugs
51-
- ✅ All of this in a **5 kb** client package 🎉
51+
- ✅ All of this in a **6 kb** client package 🎉
5252

5353
## Setup
5454

packages/openapi-fetch/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-fetch",
3-
"description": "Fast, type-safe fetch client for your OpenAPI schema. Only 5 kb (min). Works with React, Vue, Svelte, or vanilla JS.",
3+
"description": "Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.",
44
"version": "0.11.1",
55
"author": {
66
"name": "Drew Powers",

0 commit comments

Comments
 (0)