diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8c563a659..788b0fa76 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.21.3" + ".": "0.22.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ca3997a..bac83bd80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.22.0 (2024-09-11) + +Full Changelog: [v0.21.3...v0.22.0](https://github.com/val-town/sdk/compare/v0.21.3...v0.22.0) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#434](https://github.com/val-town/sdk/issues/434)) ([c7394f6](https://github.com/val-town/sdk/commit/c7394f636c1e2742499b3560d6e5ee288532d387)) + + +### Chores + +* better object fallback behaviour for casting errors ([#435](https://github.com/val-town/sdk/issues/435)) ([587000e](https://github.com/val-town/sdk/commit/587000edef7d3864aa19c73ec547dd06b821dc47)) +* **internal:** codegen related update ([#429](https://github.com/val-town/sdk/issues/429)) ([283abcd](https://github.com/val-town/sdk/commit/283abcd21d6892bbdec6b934b0e5085406d94ae5)) +* **internal:** codegen related update ([#431](https://github.com/val-town/sdk/issues/431)) ([af64e62](https://github.com/val-town/sdk/commit/af64e62edcd2547ef67687512c1ab1cbd0e9caa0)) + ## 0.21.3 (2024-09-09) Full Changelog: [v0.21.2...v0.21.3](https://github.com/val-town/sdk/compare/v0.21.2...v0.21.3) diff --git a/package.json b/package.json index 825482b91..990cfd539 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@valtown/sdk", - "version": "0.21.3", + "version": "0.22.0", "description": "The official TypeScript library for the Val Town API", "author": "Val Town ", "types": "dist/index.d.ts", diff --git a/src/core.ts b/src/core.ts index 592f76bfa..56d3d1e1e 100644 --- a/src/core.ts +++ b/src/core.ts @@ -978,6 +978,11 @@ const validatePositiveInteger = (name: string, n: unknown): number => { export const castToError = (err: any): Error => { if (err instanceof Error) return err; + if (typeof err === 'object' && err !== null) { + try { + return new Error(JSON.stringify(err)); + } catch {} + } return new Error(err); }; diff --git a/src/version.ts b/src/version.ts index bf00281d7..db66d3329 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.21.3'; // x-release-please-version +export const VERSION = '0.22.0'; // x-release-please-version