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

Missing files after update from 2.x.x to 25.x.x #2876

Open
Lars-jnk opened this issue Oct 28, 2024 · 4 comments
Open

Missing files after update from 2.x.x to 25.x.x #2876

Lars-jnk opened this issue Oct 28, 2024 · 4 comments
Labels
bug Something isn't working hilla Issues related to Hilla

Comments

@Lars-jnk
Copy link

Describe the bug

BeforeEnterObserver, Context and ActionFn All of them were in @vaadin/router and are now gone. In doc I can find BeforeEnterObserver with the reference to vaadin/router...

I need a fast answer. I would like to continue work. Thx

Expected-behavior

No response

Reproduction

update

System Info

it's about the update from 2.5.6 to 24.5.2

@Lars-jnk Lars-jnk added bug Something isn't working hilla Issues related to Hilla labels Oct 28, 2024
@Lars-jnk
Copy link
Author

The classes are still there in 24.4.10.
But why you removed them in 24.5.0? Why are there still in the doc? And why you make every few months such major changes? It's really annoying and the next time, I will remove vaadin from my project!

@platosha
Copy link
Contributor

Hello, thank you for the feedback and apologies for the hassle. That was done as part of a major refactoring in the @vaadin/router in the 2.0.0 release, which we had to do in order to keep the codebase maintainable in the long run and ship security-related updates sooner.

Regarding the TypeScript interfaces you mention, we have introduced improved alternatives in the version 2.0.0. Namely:

  • BeforeEnterObserver and other observer interfaces were replaced with a single generic WebComponentInterface,
  • Context has been replaced with a RouteContext generic type,
  • ActionFn has no direct alternative, however, it still exists as a key of the Route generic type.

We will add old types back as deprecated for compatibility reasons in a coming maintenance release. Also, currently we're working on the new router documentation site. This is taking a while, unfortunately, as relying on the old toolset from the Polymer days is not a good option anymore.

Meanwhile, if you need a really quick solution, please try marking errors with // @ts-ignore for now. This should hopefully make TypeScript errors silent, the JS runtime should still support the same API.

I understand your frustration with breaking changes that occasionally happen in minor Vaadin releases. Here is the explanation of our versioning model.

@platosha
Copy link
Contributor

By the way, regarding parts of the Route type, such as Context and ActionFn, removing the old types from the code to let TypeScript infer them could be enough.

@Lars-jnk
Copy link
Author

Thx for the replay. But, it's unacceptable that you remove these classes without any hint how to fix this. Adding them later again as deprecated doesn't make it better. Next time, make them deprecated, add a hint there how to replace it, also in the doc. Then remove them in the next major release (in this case v25). And yes, the doc should be updated with the release and not weeks later.

I use hilla since it started with polymer 3 (at least I guess) and I had several such situations that costs me to much time.
You have a good framework. But such kind of behavior disqualifies your whole team and one day I will leave vaadin and will never look back! I'm glad that I develop in ddd, so this step wouldn't take to much time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla
Projects
None yet
Development

No branches or pull requests

2 participants