Skip to content

feat!: rename isPromise to isPromiseLike #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Feb 16, 2025

Summary

The name isPromise was misleading. We might add a new isPromise implementation in the future; one that checks if a value is a native Promise object.

Related issue, if any:

https://github.com/orgs/radashi-org/discussions/73

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed
  • Related benchmarks have been added or updated, if needed
  • Release notes in next-minor.md or next-major.md have been added, if needed

Does this PR introduce a breaking change?

Yes

Bundle impact

Status File Size 1 Difference
A src/typed/isPromiseLike.ts 105 +105

Footnotes

  1. Function size includes the import dependencies of the function.

@aleclarson aleclarson added this to the v13.0.0 milestone Feb 16, 2025
@radashi-bot
Copy link

Benchmark Results

Name Current
isPromiseLike: with Promise 2,256,509.23 ops/sec ±0.25%
isPromiseLike: with Promise-like 4,196,660.17 ops/sec ±0.1%
isPromiseLike: with non-Promise 4,222,187.51 ops/sec ±0.12%

Performance regressions of 30% or more should be investigated, unless they were anticipated. Smaller regressions may be due to normal variability, as we don't use dedicated CI infrastructure.

@aleclarson aleclarson added the BREAKING CHANGE Not backwards compatible label Mar 14, 2025
@aleclarson aleclarson modified the milestones: v13.0.0, v14.0.0 Mar 19, 2025
@aleclarson
Copy link
Member Author

Postponing this to v14, where all the renaming will occur, with a codemod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE Not backwards compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants