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

Add a more ergonomic structure to represent the changes structure

Open
#144 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Reference: https://runkit.com/nullvoxpopuli/how-to-use-changeset-data-and-changes

instead of .changes being:
```
[ {key: "foo", value: 1}, Object {key: "bar", value: "there"}, …]
```
it should be something easier to understand in isolation, like:
```js
{
"foo": {
original: 0,
current: 1,
},
"property.path.0.deep": {
original: 'hello',
current: 'there'
}
}
```
now, this can easily be computed from the existing .changes, but I think because it is a common desire to build this structure, it should be provided out of the box. maybe via:
```js
changeset.changedValues;
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.