benjamine / jsondiffpatch

Diff & patch JavaScript objects
MIT License
4.86k stars 472 forks source link

feat(types): add JSONPatchFormatter #316

Closed marcolink closed 1 year ago

marcolink commented 2 years ago

Add type definition for JSON Patch formatter matching official Operation definition from http://jsonpatch.com

marcolink commented 2 years ago

@benjamine what do you think? are we good?

Vinz93 commented 2 years ago

Any updates here? :)

sghoweri commented 1 year ago

BUMP - any updates on this?

marcolink commented 1 year ago

@sghoweri we eventually created a fork with more typescript support: https://github.com/contentful/jsondiffpatch

I also started an independent project to create patches:

https://github.com/marcolink/generate-json-patch

sghoweri commented 1 year ago

@marcolink oh my gosh you're a lifesaver (was just dealing with the Typescript typing issues with this package) 🙏🏼

sghoweri commented 1 year ago

Elegant array diffing by providing an objectHash to match array elements

Oh snap. This is precisely why we started digging into this library to begin with (array diffing combined with JSON patches). 👀

marcolink commented 1 year ago

@Methuselah96 for now we found our way around - looking forward to see the migration happening :) ... Not fully typed but we also started the migration to TS here