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

V2 Goals, Deprecations, etc

オープン
#146 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
38
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。