Skip to content

Commit 2c6f433

Browse files
committed
Release version 4.0.0
1 parent 4bfcb65 commit 2c6f433

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [4.0.0]
4+
### Changed
5+
- `Promise:finally` no longer observes a rejection from a Promise. Calling `Promise:finally` is mostly transparent now.
6+
- The Promise returned by `Promise:finally` resolves or rejects with whatever the parent Promise resolved or rejected with. It will be cancelled if the parent Promise is cancelled.
7+
- The value returned from the `finally` handler is discarded now.
8+
- If the value returned from the `finally` handler is a Promise, we wait for it to resolve, but we do not use its value.
9+
- If the value returned from the `finally` handler is a Promise and it rejects, `finally` returns the new rejected value.
10+
- `Promise:finally` no longer counts as a consumer of the parent Promise for cancellation purposes. If all consumers are cancelled and the only remaining callbacks are finally handlers, the Promise is now cancelled.
11+
- The Promise executor thread is now closed with `coroutine.close` when the Promise is cancelled.
12+
- The Promise executor thread is now closed after the Promise settles (calling `resolve` or `reject`).
13+
- Callbacks enqueued with `andThen` and `catch` are now dequeued if the Promise returned by `andThen`/`catch` is cancelled.
14+
- Calling `andThen` or `catch` on an already-cancelled Promise now returns a cancelled Promise instead of returning a rejected Promise
15+
- `:await`, `:expect`, and `:awaitStatus` are no longer backed by BindableEvents, and now use the task library directly, so performance should be better.
16+
317
## [4.0.0-rc.3]
418
### Fixed
519
- Fix unhandled rejection warning appearing when using :awaitStatus

rotriever.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "evaera/roblox-lua-promise"
3-
version = "4.0.0-rc.3"
3+
version = "4.0.0"
44
author = "evaera"
55
content_root = "lib"
66
license = "MIT"

wally.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "evaera/promise"
33
description = "Promise implementation for Roblox"
4-
version = "4.0.0-rc.3"
4+
version = "4.0.0"
55
license = "MIT"
66
registry = "https://github.com/UpliftGames/wally-index"
77
realm = "shared"

0 commit comments

Comments
 (0)