vuejs / repl

Vue SFC REPL as a Vue 3 component
https://repl-vuejs.vercel.app
MIT License
904 stars 159 forks source link

Document breaking changes in v4 and fix the readme #217

Closed Mister-Hope closed 6 months ago

Mister-Hope commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

sxzz commented 6 months ago

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.

Mister-Hope commented 6 months ago

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 commented 6 months ago