eclipsesource / eclipsesource/json-reconcile

not covered/not specified yet: diff incl. id update

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

id update creates a `delete` and `add` difference

The question is, should only the `add - add` be a conflict or also `delete - add` and `add - delete`?

2 unit tests in up-up.test.ts
- `smart city class property id update -> up-up conflict`
- `reference from smart city outgoing to Component/Project/Category with reference id update -> up-up conflict`

Example
Left:
```js
{
op: "delete",
path: "/package/classes/0/references/0",
value: {
id: "name1",
containment: true,
upperBound: -1,
lowerBound: 0,
type: {
$ref: "#/package/classes/3",
},
},
},
{
op: "add",
path: "/package/classes/0/references/0",
value: {
id: "name2",
containment: true,
upperBound: -1,
lowerBound: 0,
type: {
$ref: "#/package/classes/2",
},
},
}
```
Right:
```js
{
op: "delete",
path: "/package/classes/0/references/0",
value: {
id: "name1",
containment: true,
upperBound: -1,
lowerBound: 0,
type: {
$ref: "#/package/classes/3",
},
},
},
{
op: "add",
path: "/package/classes/0/references/0",
value: {
id: "name3",
containment: true,
upperBound: -1,
lowerBound: 0,
type: {
$ref: "#/package/classes/1",
},
},
}
```

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.