Skip to content

chore(computedEager): mark for deprecation #4748

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 3 commits into
base: main
Choose a base branch
from

Conversation

ferferga
Copy link
Member

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.
⚠️ Slowing down new functions

Warning: Slowing down new functions

As the VueUse audience continues to grow, we have been inundated with an overwhelming number of feature requests and pull requests. As a result, maintaining the project has become increasingly challenging and has stretched our capacity to its limits. As such, in the near future, we may need to slow down our acceptance of new features and prioritize the stability and quality of existing functions. Please note that new features for VueUse may not be accepted at this time. If you have any new ideas, we suggest that you first incorporate them into your own codebase, iterate on them to suit your needs, and assess their generalizability. If you strongly believe that your ideas are beneficial to the community, you may submit a pull request along with your use cases, and we would be happy to review and discuss them. Thank you for your understanding.


Description

Marks this composable as deprecated so it can be removed in a future major version.

Additional context

In my opinion, there is no reason users can't always track latest minor Vue releases. It's been a while since Vue 3.4 has been released and Vue 3.6 is around the corner, so there have been plenty of time for every person to test their computedEager usages (plus the introduction in Vue in normal computed has hardly been breaking).
Users that stil want to lag behind Vue updates won't also have a problem staying behind in VueUse's

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 13, 2025
@ferferga ferferga changed the title chore(computedEager): mark for deprecation chore(computedEager)!: mark for deprecation May 13, 2025
@OrbisK
Copy link
Collaborator

OrbisK commented May 13, 2025

LGTM. Maybe we can just alias it too 🤔


I think chore(computedEager)! should be chore(computedEager) until we remove it

@ferferga ferferga changed the title chore(computedEager)!: mark for deprecation chore(computedEager): mark for deprecation May 13, 2025
@ferferga
Copy link
Member Author

@OrbisK You mean to remove the code (alongside the deprecation marking) and then in next major remove the aliasing as well? Or keep the aliasing indifinitely?

@OrbisK
Copy link
Collaborator

OrbisK commented May 13, 2025

@OrbisK You mean to remove the code (alongside the deprecation marking) and then in next major remove the aliasing as well? Or keep the aliasing indifinitely?

Mark deprecated, and alias (if possible). Remove at some major.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 13, 2025
@ferferga ferferga requested a review from OrbisK May 13, 2025 16:05
@antfu
Copy link
Member

antfu commented May 14, 2025

Why did we remove the tests?

And if we deprecate a function, we should provide the reason and way to migrate in the docs and the jsdoc. "This function will be removed in future version" is confusing to have the next action even for me.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 14, 2025
@ferferga
Copy link
Member Author

@antfu I removed the tests because I assume that functionality is now tested on Vue core, so it doesn't make sense to maintain our own suite of tests (specially if we are going to remove the entire source code of this function in a future major). Reintroduced the tests for now (they can always be removed later, when the composable is effectively removed from our source code).

I also thought the JSDoc message above explaining that Vue 3.4's computed worked exactly the same as computedEager was enough, but added it explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants