diff --git a/.changeset/wise-hairs-happen.md b/.changeset/wise-hairs-happen.md deleted file mode 100644 index a085a9aee..000000000 --- a/.changeset/wise-hairs-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@httpx/exception': minor ---- - -Minimum node version is 18.12. Move to es2022. diff --git a/.changeset/young-yaks-tease.md b/.changeset/young-yaks-tease.md deleted file mode 100644 index b662c30bc..000000000 --- a/.changeset/young-yaks-tease.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -'@httpx/exception': minor ---- - -Reduce drastically bundle size (use es2022) - -Importing a single exception starts at 377 bytes, subsequent ones will add less than 50 bytes in average. -Importing all exceptions (excluding typeguards...) will top at 1400 bytes. - -Code should be faster too. - -> PS: if you use exceptions outside of nodejs and need to support legacy browsers -> a lot of frameworks allows to transpile modules (ie nextjs). - -``` -✔ Adding to empty webpack project - - ESM (import everything *) - Package size is 395 B less than limit - Size limit: 2.46 kB - Size: 2.06 kB with all dependencies, minified and gzipped - - ESM (only HttpNotFound exception) - Package size is 965 B less than limit - Size limit: 1.42 kB - Size: 450 B with all dependencies, minified and gzipped - - ESM (two exceptions: HttpNotFound + HttpInternalServerError) - Package size is 935 B less than limit - Size limit: 1.44 kB - Size: 505 B with all dependencies, minified and gzipped - - ESM (only isHttpException) - Package size is 1.03 kB less than limit - Size limit: 1.41 kB - Size: 377 B with all dependencies, minified and gzipped - - ESM (only createHttpException) - Package size is 571 B less than limit - Size limit: 2 kB - Size: 1.43 kB with all dependencies, minified and gzipped - - ESM ({ toJson }) - Package size is 1.11 kB less than limit - Size limit: 1.89 kB - Size: 779 B with all dependencies, minified and gzipped - - ESM ({ fromJson }) - Package size is 607 B less than limit - Size limit: 2.5 kB - Size: 1.89 kB with all dependencies, minified and gzipped - - CJS (require everything *) - Package size is 416 B less than limit - Size limit: 3.05 kB - Size: 2.63 kB with all dependencies, minified and gzipped - - CJS (only isHttpException) - Package size is 598 B less than limit - Size limit: 2.5 kB - Size: 1.9 kB with all dependencies, minified and gzipped - -``` \ No newline at end of file diff --git a/examples/nextjs-app/CHANGELOG.md b/examples/nextjs-app/CHANGELOG.md index 13d6dbc6f..0ea133a1b 100644 --- a/examples/nextjs-app/CHANGELOG.md +++ b/examples/nextjs-app/CHANGELOG.md @@ -1,5 +1,12 @@ # @examples/nextjs-app +## 0.1.36 + +### Patch Changes + +- Updated dependencies [[`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d), [`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d)]: + - @httpx/exception@2.3.0 + ## 0.1.35 ### Patch Changes diff --git a/examples/nextjs-app/package.json b/examples/nextjs-app/package.json index e8f7bfb97..250b63a5d 100644 --- a/examples/nextjs-app/package.json +++ b/examples/nextjs-app/package.json @@ -1,6 +1,6 @@ { "name": "@examples/nextjs-app", - "version": "0.1.35", + "version": "0.1.36", "private": true, "scripts": { "dev": "next dev", diff --git a/packages/exception/CHANGELOG.md b/packages/exception/CHANGELOG.md index 330f88e88..e9d9f9c94 100644 --- a/packages/exception/CHANGELOG.md +++ b/packages/exception/CHANGELOG.md @@ -1,5 +1,71 @@ # @httpx/exception +## 2.3.0 + +### Minor Changes + +- [#667](https://github.com/belgattitude/httpx/pull/667) [`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d) Thanks [@belgattitude](https://github.com/belgattitude)! - Minimum node version is 18.12. Move to es2022. + +- [#667](https://github.com/belgattitude/httpx/pull/667) [`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d) Thanks [@belgattitude](https://github.com/belgattitude)! - Reduce drastically bundle size (use es2022) + + Importing a single exception starts at 377 bytes, subsequent ones will add less than 50 bytes in average. + Importing all exceptions (excluding typeguards...) will top at 1400 bytes. + + Code should be faster too. + + > PS: if you use exceptions outside of nodejs and need to support legacy browsers + > a lot of frameworks allows to transpile modules (ie nextjs). + + ``` + ✔ Adding to empty webpack project + + ESM (import everything *) + Package size is 395 B less than limit + Size limit: 2.46 kB + Size: 2.06 kB with all dependencies, minified and gzipped + + ESM (only HttpNotFound exception) + Package size is 965 B less than limit + Size limit: 1.42 kB + Size: 450 B with all dependencies, minified and gzipped + + ESM (two exceptions: HttpNotFound + HttpInternalServerError) + Package size is 935 B less than limit + Size limit: 1.44 kB + Size: 505 B with all dependencies, minified and gzipped + + ESM (only isHttpException) + Package size is 1.03 kB less than limit + Size limit: 1.41 kB + Size: 377 B with all dependencies, minified and gzipped + + ESM (only createHttpException) + Package size is 571 B less than limit + Size limit: 2 kB + Size: 1.43 kB with all dependencies, minified and gzipped + + ESM ({ toJson }) + Package size is 1.11 kB less than limit + Size limit: 1.89 kB + Size: 779 B with all dependencies, minified and gzipped + + ESM ({ fromJson }) + Package size is 607 B less than limit + Size limit: 2.5 kB + Size: 1.89 kB with all dependencies, minified and gzipped + + CJS (require everything *) + Package size is 416 B less than limit + Size limit: 3.05 kB + Size: 2.63 kB with all dependencies, minified and gzipped + + CJS (only isHttpException) + Package size is 598 B less than limit + Size limit: 2.5 kB + Size: 1.9 kB with all dependencies, minified and gzipped + + ``` + ## 2.2.0 ### Minor Changes diff --git a/packages/exception/package.json b/packages/exception/package.json index 48b0105d7..db3bc7db5 100644 --- a/packages/exception/package.json +++ b/packages/exception/package.json @@ -1,7 +1,7 @@ { "name": "@httpx/exception", "description": "Plain http exception in typescript.", - "version": "2.2.0", + "version": "2.3.0", "license": "MIT", "author": { "name": "Vanvelthem Sébastien", diff --git a/packages/json-api/CHANGELOG.md b/packages/json-api/CHANGELOG.md index 6bd417373..039b2d600 100644 --- a/packages/json-api/CHANGELOG.md +++ b/packages/json-api/CHANGELOG.md @@ -1,5 +1,12 @@ # @httpx/json-api +## 0.4.3 + +### Patch Changes + +- Updated dependencies [[`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d), [`6872abb`](https://github.com/belgattitude/httpx/commit/6872abbc7d51eca4eae85e66fadef334ef16763d)]: + - @httpx/exception@2.3.0 + ## 0.4.2 ### Patch Changes diff --git a/packages/json-api/package.json b/packages/json-api/package.json index b39f86c36..36831b532 100644 --- a/packages/json-api/package.json +++ b/packages/json-api/package.json @@ -1,7 +1,7 @@ { "name": "@httpx/json-api", "description": "Basic typescript helpers to work with json-api", - "version": "0.4.2", + "version": "0.4.3", "license": "MIT", "author": { "name": "Vanvelthem Sébastien",