Skip to content
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

Document breaking changes in v4 and fix the readme #217

Closed
Mister-Hope opened this issue Feb 13, 2024 · 6 comments
Closed

Document breaking changes in v4 and fix the readme #217

Mister-Hope opened this issue Feb 13, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@Mister-Hope
Copy link

Mister-Hope commented Feb 13, 2024

v4 introduces a lot of ** breaking changes, and there is no migration guide.

For now, I feel pissed off when migrating to v4, just listing some of the issues here:

  1. The advanced part in readme is not updated at all

image

  1. The ReplStore class to useStore composable is ABSOLUTELY not a small refactor, a lot of option now requires ref proxies, and I don't think dropping support of constants can improve most users experience. Why should people being enforced to pass refs if they never want something change? VueUse always allow people to provide a MaybeRef if possible

  2. A lot of APIs has been removed, like a ref vueVersion should be passed if users want to change vue version instead of calling any API called setVueVersion. These changes should be listed clearly in release page or changelog instead of letting the user read through all codes and guess how to migrate themselves.

image

The related refactor is too huge to let people understand what's changing at a glance in web page.

  1. The behavior of import map seems to have undocumented breaking changes or bugs. When including a import map in an serializedState before, a empty import map works as expected. Now, I am getting errors like these:

image

image

There was an option called defaultVueRuntimeURL and it seems to be removed in v4, and I doubt why the builtinImportMap should have a empty default value instead of a importmap containing vue. I don't think why is there any need to let users force declare vue import. Please fix it or document the breaking change in release.


I hope @sxzz can done maintenance work nicely in the future without spoiling users' experience as this is a official package published under @vue scope.

@sxzz sxzz added the documentation Improvements or additions to documentation label Feb 14, 2024
@sxzz
Copy link
Member

sxzz commented Feb 14, 2024

While the v4 release has already occurred, there is a need for further refinement and improvement. As I am presently on vacation with limited time for documentation publication, I kindly request that you refrain from upgrading to v4 until this issue is closed.

Additionally, please be mindful that emotional comments, while understandable, can be counterproductive and detrimental to the collaborative spirit of the open-source community. Let us maintain a constructive and supportive environment.

@sxzz
Copy link
Member

sxzz commented Feb 14, 2024

The Migration Guide is published at https://github.com/vuejs/repl/releases/tag/v4.0.0

If there's anything that makes you confused, see the migrated PR. Hope it can help you.

@sxzz
Copy link
Member

sxzz commented Feb 14, 2024

v4.1.1 is released including fixing default import maps problem. https://github.com/vuejs/repl/releases/tag/v4.1.1

@sxzz
Copy link
Member

sxzz commented Feb 14, 2024

I'd like to say v4 was released about a few days ago. While a substantial amount of work has been put into it, so there are inevitably some missing elements that require attention. v4 is specifically designed for Vue Vapor and aims to facilitate future maintenance. If the feedback from the community can be more gentle and kind, I'll appreciate it.

@sxzz sxzz closed this as completed Feb 14, 2024
@Mister-Hope
Copy link
Author

That makes things much more clearly.

  1. Just want to make sure that no plan to support a MaybeRef form input in useStore?

  2. The new useVueImportMap is a little bit confusing, because it seems to be a composable to get some temp state used by another composable (not sure if I understand this api correctly).

@sxzz
Copy link
Member

sxzz commented Feb 14, 2024

  • useStore no longer concerns itself with Vue's import map (and production mode); this functionality has been moved to useVueImportMap. The Vue version in the Store refers to the version of the Vue SFC compiler, which is actually separate from the runtime. We simply pass the version of the runtime to the store as the version for the SFC.
  • Consider supporting MaybeRef; pull requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants