mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-10-30 10:09:16 +00:00
1.6 KiB
1.6 KiB
Next
- Add Promise.tap
- Fix bug with C functions not working when passed to andThen
- Fix issue with Promise.race/all always cancelling instead of only cancelling if the Promise has no other consumers
- Make error checking more robust across many methods.
- Promise.Status members are now strings instead of symbols, and indexing a non-existent value will error.
- Improve stack traces
- Promise.promisify will now turn errors into rejections even if they occur after a yield.
- Add Promise.try
2.4.0
Promise.isnow only checks if the object is "andThennable" (has anandThenmethod).
2.3.1
- Make unhandled rejection warning trigger on next Heartbeat
2.3.0
- Remove
Promise.spawnfrom the public API. Promise.asyncstill inherits the behavior fromPromise.spawn.Promise.asyncnow wraps the callback inpcalland rejects if an error occurred.Promise.newhas now has an explicit error message when attempting to yield inside of it.
2.2.0
Promise.promisifynow usescoroutine.wrapinstead ofPromise.spawn
2.1.0
- Add
finallyCall,andThenCall - Add
awaitValue
2.0.0
- Add Promise.race
- Add Promise.async
- Add Promise.spawn
- Add Promise.promisify
finallynow silences the unhandled rejection warningonCancelnow returns if the Promise was cancelled at call time.- Cancellation now propagates downstream.
- Add
Promise:awaitStatus - Calling
resolvewith a Promise while the resolving Promise is cancelled instantly cancels the passed Promise as an optimization. finallynow passes the Promise status as a parameter.