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

Typescript error when using VineJS as the adapter #545

Open
1 task done
lubiah opened this issue Jan 2, 2025 · 6 comments
Open
1 task done

Typescript error when using VineJS as the adapter #545

lubiah opened this issue Jan 2, 2025 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@lubiah
Copy link

lubiah commented Jan 2, 2025

  • Before posting an issue, read the FAQ and search the previous issues.

Description
When using VineJS, it gives, typescript errors. When using the version 2 of VineJS, the error is not shown unless when using the V3.

If applicable, a MRE
Clone the Sveltelab code for vine and use the latest version.
https://www.sveltelab.dev/?provider=github&owner=ciscoheat&repo=superforms-examples&branch=vine

@lubiah lubiah added the bug Something isn't working label Jan 2, 2025
@ciscoheat
Copy link
Owner

Version 3 is not supported, it should give a peer dependency warning. I'm not sure how to handle breaking changes between major versions for adapters.

@ciscoheat ciscoheat added help wanted Extra attention is needed and removed bug Something isn't working labels Jan 2, 2025
@lubiah
Copy link
Author

lubiah commented Jan 3, 2025

@ciscoheat , any idea on how to fix it?

@ciscoheat
Copy link
Owner

I'm not sure, as it will mean a breaking change for all v2 users.

@lubiah
Copy link
Author

lubiah commented Jan 3, 2025

I took a look at the breaking changes for the v3. They didn't change the APIs. Besides the v3 works with VineJS without any configuration. Only the typescript errors is the problem. Will this still be a breaking change???

@ciscoheat
Copy link
Owner

They only changed the types, that's the breaking change? In that case it should be ok to update it. Can you point me to what schema types should be used for v3?

@lubiah
Copy link
Author

lubiah commented Jan 4, 2025

I'm really not sure what's causing the type errors. Validation and everything works perfectly and when you downgrade to v2. the type errors go away. Here's a list of the breaking changes for the v3. I'm finding it difficult to locate the source of the typescript errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants