flitbit / json-ptr

A complete implementation of JSON Pointer (RFC 6901) for nodejs and modern browsers.
MIT License
91 stars 28 forks source link

Many functions are missing in 1.3.1, despite this not being a major version #24

Closed jwalton closed 4 years ago

jwalton commented 4 years ago

My library relies on json-ptr 1.1.1, but now that 1.3.1 is out, it's unfortunately broken my library. It seems a number of exported function have been removed, even though this is not a semver major release (create, has, decode to name a few). Could we add these back in and/or republish the last version that had these as 1.3.2, and then republish 1.3.1 as 2.0.0?

Alan-Cha commented 4 years ago

Hi! Thank you very much for this library! Unfortunately, I experienced similar problems and it has broken my library (example 1 and example 2). I'm not sure what's the best path moving forward but I do think this should have been a major version. Just wanted to give you some feedback. Hope this will be resolved soon!

flitbit commented 4 years ago

I spent some time getting the docs tree built but clearly neglected to note that the global functions are now static functions of JsonPointer class... so JsonPointer.create, JsonPointer.get, JsonPointer.has, etc. etc. They have identical signatures and work the same as the once global functions.

I also reviewed the Semver site and you are correct, major black eye not rolling the major version... but that ship has sailed.

flitbit commented 4 years ago

When I get done with the relative pointers (soon) I'll roll the major version. I've since noticed that some of my examples don't work due to this API change; I'll fix those too. Major tunnel vision getting 100% test coverage and the docs generated. Thanks for the feedback.

flitbit commented 4 years ago

I documented in master branch where these functions went, please let me know if you have problems importing/using them from their new location.

Sorry about the inconvenience.

svedbg commented 4 years ago

You can just unpublish v1.3.2, v1.3.1 and v1.3.0 and just publish as v2.0.0. It's better than leaving the breaking change