Skip to content

feat!: rename isPromise to isPromiseLike - #364

Open
aleclarson wants to merge 1 commit into
nextfrom
feat/rename-isPromise
Open

feat!: rename isPromise to isPromiseLike#364
aleclarson wants to merge 1 commit into
nextfrom
feat/rename-isPromise

Conversation

@aleclarson

@aleclarson aleclarson commented Feb 16, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown

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
Copy Markdown
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