Skip to content

Commit ece4f19

Browse files
committed
Changelog for v2
1 parent 844a353 commit ece4f19

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ Headlines: Added, Changed, Deprecated, Removed, Fixed, Security
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.0.0-alpha.1] - 2024-01-10
8+
## [2.0.0] - 2024-02-11
99

1010
### Removed
1111

12-
- `superForm.fields`
13-
- `fields` options for setting tainted.
14-
- `message` parameter in `onError` event.
12+
- `superForm.fields` was a rarely used and lesser version of `formFieldProxy`, switch to that instead.
13+
- Removed `fields` options when setting tainted status.
14+
- Remvoed `message` parameter in `onError` event, use `$message` directly instead.
1515

1616
### Changed
1717

18-
- Adapters required, `superValidate(zod(schema))` instead of `superValidate(schema)`. If type parameters are used, it must now be wrapped with `z.infer` for Zod schemas.
19-
- Default `superForm` options now follow SvelteKit more closely: `resetForm: true` and `taintedMessage: false` is default now. Add `define: { SUPERFORMS_LEGACY: true }` in `vite.config.ts` to keep the old behavior.
18+
- Adapters required for validation! Import from `sveltekit-superforms/adapters` and use `superValidate(zod(schema))` instead of `superValidate(schema)`. If type parameters are used, it must now be wrapped with `Infer` for schemas.
19+
- Default `superForm` options now follow SvelteKit more closely: `resetForm: true` and `taintedMessage: false` are default now. Add `define: { SUPERFORMS_LEGACY: true }` in `vite.config.ts` to keep the old behavior.
2020
- `superValidateSync` is renamed to `defaults`. It returns [default values](https://superforms.rocks/default-values/) for the schema, and **does no validation anymore**. Use `+page.ts` if initial validation is required, as described on the [SPA page](https://superforms.rocks/concepts/spa#using-pagets-instead-of-pageserverts).
2121
- `arrayProxy`: `fieldErrors` renamed to `valueErrors`.
2222
- Enums must have an explicit default value in the schema.
2323
- Numeric enums cannot be parsed with their string values anymore.
2424
- Superform validator functions, previously just an object with functions, requires the `superformClient` adapter. The input for the validator functions can now be `undefined`.
25-
- If `superValidate` is called with just the schema, the default values aren't validated (i.e. no side-effects for default values).
25+
- If `superValidate` is called with just the schema, the default values aren't validated (i.e. no side-effects for default values) unless `errors` is set to `true`.
2626
- Properties with default values don't have `required` in their constraints anymore.
2727
- Form id cannot be `undefined` anymore, must be `string`. (Set automatically by default now).
2828
- `flashMessage.onError.message` option in `superForm` renamed to `flashMessage.onError.flashMessage`.
@@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333

3434
### Added
3535

36-
- Support for unions in schemas. Unions must have an explicit default value, and multi-type unions can only be used with `dataType: 'json'` set.
36+
- Support for unions in schemas. A union must have an explicit default value, and multi-type unions can only be used with `dataType: 'json'` set.
3737
- Added `superForm.isTainted(path?)` and `superForm.isTainted($tainted)` for better [tainted fields check](https://superforms.rocks/concepts/tainted/).
3838
- [File upload support](https://superforms.rocks/concepts/files/)! Use `withFiles` when returning in form actions: `return withFiles({ form })`.
3939
- [SuperDebug](https://superforms.rocks/super-debug/) now displays `File` and `FileList`.

0 commit comments

Comments
 (0)