adopted-ember-addons / adopted-ember-addons/validated-changeset

V2 Goals, Deprecations, etc

Aperta
#146 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
38
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I think we should plan out what a V2 would look like.
There are some APIs that we could probably get rid of -- drop support for some legacy things that we don't need to care about (like super old Ember (maybe more for ember-changeset))

What _I'd_ like to propose:
- drop support entirely for the validation APIs, in favor of something more composition friendly, like Yup. Colloquially at work, changeset-validations has had huge resistence, and is generally not meeting people where their mental models are. So, I'd like to propose that changests be _just_ changesets, and we handle validation externally
- remove the following methods / properties:
- cast - name is unintuitive
- merge - how often is this used? why?
- rollbackProperty - how often is rolling back a single property used? why?
- changes or rename to valueOfChanges or something, as there is no change information here without context of original values

- add the following methods / properties:
- changes (or changedValues): https://github.com/validated-changeset/validated-changeset/issues/144
- transactions: https://github.com/validated-changeset/validated-changeset/issues/145

- be immutable by default
- calling execute doesn't deeply write the values to the source object unless that source object is passed to execute

thoughts?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.