Release a v1.0.0
It seems that this is quite stable. As such, it would be really nice with a proper 1.0.0 release, so for future releases, it will be possible to discern from the versioning whether it contains new features (minor version bump), or any breaking changes (major version bump). In the 0.x.x range, the minor part can signal either of these.
A while back I did a revamp of papi (the HTTP client this library uses) to use a more modern javascript style (await, const, classes, etc...) and I've been meaning to update this library to follow those same conventions. I was hoping to get that in before a 1.x release (it should be almost completely backwards compatible for the vast majority of users).
I just haven't prioritized it. If I don't get to it before the end of the year I'll just release a 1.x branch.
I know it doesn't help with tooling, but you can assume all 0.x releases will be backwards compatible until I release 1.0.0.
A side note, I was considering removing some of the client side validation so people wouldn't need to wait on this library to explicitly support new arguments (maybe with some typescript definitions for documentation).
Hi, I have a deployment where consul is available through a unix socket. It seems that the latest version of this library doesn't support unix sockets yet, but it seems that papi v1.x.x does (socketPath opts variable). I would really love to see this 1.x branch release with the papi 1.x.x dependency, which will allow to make requests against unix sockets.
Are there still any plans of doing this?
I don't think there is a good reason not to just release a 1.x version of what's in main. I'll try to get that done this weekend.
Fantastic! Just for you to know, I was able to use a unix socket connection with your main branch code by passing the socketPath and baseUrl parameters in the options object at the consul constructor (I saw that consul extends papi and the opts were passed to the super() of papi directly, which is able to interpret the socketPath opt). Maybe adding the socketPath parameter in the consul constructor options object documentation is enough and could help others looking for the same.
I released 1.0.0 to npm: https://www.npmjs.com/package/consul/v/1.0.0
Note that the initialization of consul now requires the new operator and now only supports the await/promise interface.
There are various other backwards incompatible changes including changes to the acl interface, lock being removed (for now), and probably others.
Thoroughly test your usage before upgrading.
@gabisrm I added a note to the readme with some of the additional supported parameters and a link to the papi readme.
@silas does this new version come with typescript types? If not @types/consul should be updated.
It doesn't, but it's something I'd like to get included at some point.