From 9ec910113e5bb5e2dc3b4b0da02198e82deeb22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Veres?= Date: Sat, 23 Mar 2024 13:30:52 +0100 Subject: [PATCH] fix: remove history generic --- README.md | 9 ++++++--- packages/ogre/src/git2json.ts | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 951773f..f50c265 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,12 @@ keep the history around for a bit longer. The library uses json-patch RFC6902 fo - Diff - Status - Apply - > ⚠️ Setting a value for an undefined prop `{prop: undefined}` will result in the `compare` call as a `replace` - operation, but will be recorded by the observer as - an `add` operation. See https://github.com/Starcounter-Jack/JSON-Patch/issues/280 for details + > ⚠️ Currently with a workaround to adapt for setting a value for an undefined prop `{prop: undefined}` will result in + the `compare` call as a `replace` + operation, but will be recorded by the observer as an `add` operation. + > Applying a patch like that will result in internal retry with `add` instead of `replace`. + > + > See https://github.com/Starcounter-Jack/JSON-Patch/issues/280 for details - Visualization via `@dotinc/ogre-react` - Merge - fast-forward diff --git a/packages/ogre/src/git2json.ts b/packages/ogre/src/git2json.ts index 8388de3..faeedc5 100644 --- a/packages/ogre/src/git2json.ts +++ b/packages/ogre/src/git2json.ts @@ -31,7 +31,7 @@ const findRefs = (commit: Commit, refs: Map) => { * in the Repository history. The json representation is returned in `git2json` format based on: * https://github.com/fabien0102/git2json/blob/e067166d2468018b6f3982a8fb44a2e54110ce02/src/git2json.js#L5-L22 */ -export const formatGit2Json = (history: History) => { +export const formatGit2Json = (history: History) => { const { commits, refs } = history; return commits.reverse().map((c) => { const [name, email] = cleanAuthor(c.author);