Skip to content

Commit 6b19af2

Browse files
authored
Merge pull request #3 from maxmorozoff/changeset-release/main
Version Packages
2 parents f7507b2 + b47472a commit 6b19af2

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

.changeset/warm-eggs-show.md

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

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# @maxmorozoff/try-catch-tuple
22

3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- 23d5176: feat: enhance error handling and improve TypeScript support
8+
9+
#### Added
10+
11+
- Introduced `.errors<E>()` method to allow specifying expected error types.
12+
- Ensured non-Error thrown values are wrapped properly in an `Error` instance with `cause`.
13+
- Added more tests to cover edge cases and ensure robustness.
14+
15+
#### Improved
16+
17+
- Refactored `tryCatch`, `tryCatch.sync`, and `tryCatch.async` to support generic error types.
18+
- Introduced `TryCatchFunc` and `TryCatchResult` for improved type safety.
19+
- Updated `typescript` version range in `peerDependencies` to `^5.0.0`, supporting all 5.x versions.
20+
- Added `peerDependenciesMeta` to mark `typescript` as an optional dependency. This allows consumers of the package to choose not to install `typescript` while still ensuring compatibility with TypeScript 5.x.
21+
22+
#### Fixed
23+
24+
- `handleError` now correctly preserves the original thrown value under `cause`.
25+
326
## 0.0.2
427

528
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@maxmorozoff/try-catch-tuple",
33
"description": "A TypeScript utility function for structured error handling in both synchronous and asynchronous operations.",
4-
"version": "0.0.2",
4+
"version": "0.1.0",
55
"license": "MIT",
66
"author": "Max Morozov <[email protected]",
77
"homepage": "https://github.com/maxmorozoff/try-catch-tuple#readme",

0 commit comments

Comments
 (0)