Skip to content

Releases: ciscoheat/sveltekit-superforms

v2.20.1

15 Nov 14:46
Compare
Choose a tag to compare

Changed

  • Valibot updated to require 1.0.0-beta.3 (hoping for a stable release soon).
  • Arktype updated to require 2.0.0-rc.23 (hoping for a stable release soon).

Added

  • Support for Vine 2.0.
  • New validation library: Effect!

Fixed

  • customRequest didn't cancel when client-side validation failed.

v2.19.1

05 Oct 13:36
Compare
Choose a tag to compare

Added

  • Exported ClientValidationAdapter from sveltekit-superforms/adapters.

Fixed

  • Result can now be modified in onError, for setting a status code for example.
  • Status codes above 400 but below 500 were not applied to the page status when the result was modified in onUpdate.

v2.19.0

18 Sep 11:36
Compare
Choose a tag to compare

Changed

  • Arktype updated to require 2.0.0-rc.8, fixing some types (last update before 2.0).

Deprecated

Added

  • Exceptions thrown in the onSubmit, onResult and onUpdate events will now be caught and sent to onError, if it exists.

Fixed

  • Updating the same variable to the same value prevented the onChange event from being triggered.
  • Factorized SuperDebug clipboard script.

v2.18.1

13 Sep 14:40
Compare
Choose a tag to compare

Added

  • New validation library: class-validator!
  • Exported SuperFormData and SuperFormErrors types for superForm.
  • Exported ZodObjectType, ZodObjectTypes and ZodValidation types for the Zod adapter.
  • customRequest can now handle an ActionResult as well, for better error handling.

Fixed

  • Using setError in the load function and navigating to the same page client-side removed the errors.

v2.17.0

13 Aug 18:04
Compare
Choose a tag to compare

Deprecated

  • posted is deprecated, due to inconsistencies between server and client validation, and SPA mode. It will be removed in v3. Use a status message or return your own data in the form action to handle form post status.

Added

  • descriptionAsErrors option for the JSON Schema validator, so you can specify error messages directly in the schema with the description field.

Fixed

  • File uploads required extra configuration for the valibot adapter, now it works directly.
  • Events added in enhance weren't cleaned up when the form was destroyed. Note that this could be deprecated in a future version. It's advised to use events only when calling superForm, not with enhance.

v2.16.1

18 Jul 06:45
Compare
Choose a tag to compare

Changed

  • Arktype updated to require 2.0.0-beta.0, which should fix some typing issues with the adapter.

Side note: If you haven't already, take a look at Arktype, as it's a feat of type programming.

v2.16.0

09 Jul 22:53
Compare
Choose a tag to compare

Added

  • New validation library: Superstruct!
  • customRequest added to the onSubmit options, that lets you use a custom fetch or XMLHttpRequest when submitting the form. Very useful for progress bars when uploading large files.

Fixed

  • Type inference for validation errors didn't include _errors for all objects, only for arrays.

v2.15.2

26 Jun 05:50
Compare
Choose a tag to compare

Changed

  • Valibot minimum dependency is now >=0.33.0 to fix a type issue. Please follow the migration guide to update your Valibot schemas if your version is below v0.31.0.

v2.15.1

10 Jun 10:36
Compare
Choose a tag to compare

Changed

  • Valibot updated to v0.31, which ends support for any version below that. Please follow the migration guide to update your Valibot schemas.

Fixed

  • Inlined the SuperDebug css, to prevent it from being automatically bundled due to it being a default import.
  • The customValidity option now handles object errors, and can refer to any part of the schema.
  • Arktype code wasn't excluded from bundle due to not being dynamically loaded.

v2.14.0

25 May 22:46
Compare
Choose a tag to compare

Added

  • errorMap option for the Zod adapter, for simplified error handling in localization. (Zod docs)

Fixed

  • isTainted now works with undefined values in the $tainted store.
  • Fixed default properties for Record in schemas.