-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new msgpack spec compatibility #6
Conversation
I'm fine with breaking backwards compat. We just need to bump the major version in npm. |
Thanks Tim, I've updated |
I don't think the package manager component.js was written for is used much these days. We can bump the version the same though, it won't hurt. |
Thanks for taking the time to review; much appreciated. |
new msgpack spec compatibility
Oh I forgot, the README needs updating. We are no longer extending the format and are instead using the latest version of the spec right? |
And if you're feeling really adventurous, you can help me with creationix/msgpack-js#8 |
The new spec (https://github.com/msgpack/msgpack/blob/master/spec.md) allows for "application specific extension types". There's no registry of typecodes so there's not too much hope of extension types being cross-platform. In light of that, I opted to use Other than that, binary types are now part of the spec so the rest is vanilla and complete as far as I know. On a different note, I hadn't yet given much thought to allowing the user to decode extension types via a callback, but that would probably be useful. I was going to wait and use this version for a week or so to see if I found any obvious problems before proposing a change to |
No rush, let me know when you're ready. |
Hi Tim,
The msgpack spec added a Bin type and got an updated spec back in August 2013. I'd like to update the msgpack.js encoder and decoder to support the new spec.
Unfortunately, some of the existing extensions used reserved data type which are part of the new spec:
0xc4
(previously encodedundefined
) is now specced asbin 8
0xd8
(previously a buffer type) is now specced asfixext 16
0xd9
(previously a buffer type) is now specced asstr 8
I've had to change the encoding/decoding which breaks backwards-compatibility with previous msgpack-js encoded data if they used the reserved types.
Do you think we can merge this change to be compatible with the updated spec? Any suggestions on how to handle backwards compatibility with the js-specific extensions?
~Ambrus