You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a jsondiffpatch plugin arrays-by-hash a few years ago that tracks changes to items in arrays using their objectHash instead of their index. When I wrote it I was naively importing a few things from the /src directory of jsondiffpatch:
var DiffContext = require('jsondiffpatch/src/contexts/diff').DiffContext;
var PatchContext = require('jsondiffpatch/src/contexts/patch').PatchContext;
var ReverseContext = require('jsondiffpatch/src/contexts/reverse').ReverseContext;
var lcs = require('jsondiffpatch/src/filters/lcs');
When the build process changed after version v0.2.5, the src directory is no longer present – this makes sense but also means that developers cannot get access these *Context objects when writing their plugins. The default array filters use these objects, so any developer who hopes to override this behavior is out of luck – someone in #254 also ran into this issue.
Can we export some of these modules as a part of the public API? Happy to submit a PR.
Alternatively the project could add arrays-by-hash like functionality natively, I see numerous users running into this #269, #254, #154, #167, and it's pretty much essential if you want reliable merge-like functionality where you apply multiple distinct patches to an object.
The text was updated successfully, but these errors were encountered:
I wrote a jsondiffpatch plugin arrays-by-hash a few years ago that tracks changes to items in arrays using their objectHash instead of their index. When I wrote it I was naively importing a few things from the
/src
directory of jsondiffpatch:When the build process changed after version v0.2.5, the src directory is no longer present – this makes sense but also means that developers cannot get access these *Context objects when writing their plugins. The default array filters use these objects, so any developer who hopes to override this behavior is out of luck – someone in #254 also ran into this issue.
Can we export some of these modules as a part of the public API? Happy to submit a PR.
Alternatively the project could add arrays-by-hash like functionality natively, I see numerous users running into this #269, #254, #154, #167, and it's pretty much essential if you want reliable merge-like functionality where you apply multiple distinct patches to an object.
The text was updated successfully, but these errors were encountered: