Skip to content
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

Changed MessagePack library in @microsoft/signalr-protocol-msgpack javascript library #454

Open
BrennanConroy opened this issue Feb 25, 2021 · 0 comments
Labels
6.0.0 Announcement Breaking change Documented The breaking change has been published to the .NET Core docs
Milestone

Comments

@BrennanConroy
Copy link
Member

BrennanConroy commented Feb 25, 2021

Changed MessagePack library in @microsoft/signalr-protocol-msgpack npm package

@microsoft/signalr-protocol-msgpack used to reference msgpack5 now it references @msgpack/msgpack.

The MessagePackOptions that could optionally be passed into the MessagePackHubProtocol also has a breaking change. The options disableTimestampEncoding and forceFloat64 no longer exist, and some additional options now exist.

Version introduced

ASP.NET Core 6.0

Old behavior

Previously to use the MessagePack hub protocol in the browser you needed to include 3 script references

<script src="~/lib/signalr/signalr.js"></script>
<script src="~/lib/msgpack5/msgpack5.js"></script>
<script src="~/lib/signalr/signalr-protocol-msgpack.js"></script>

In addition the msgpack5 package was downloaded to your node_modules so you could use it in your app if you wanted.

MessagePackOptions had disableTimestampEncoding and forceFloat64 properties, but doesn't anymore.

New behavior

To use the MessagePack hub protocol in the browser you now only need 2 script references

<script src="~/lib/signalr/signalr.js"></script>
<script src="~/lib/signalr/signalr-protocol-msgpack.js"></script>

And you will have the @msgpack/msgpack package downloaded to your node_modules if you want to use the directly in your app.

MessagePackOptions has new properties and removed the disableTimestampEncoding and forceFloat64 properties.

Reason for change

Reduced asset size, reduced complexity to consume the package, and more customizability.

Recommended action

If you were previously using msgpack5 in your app, you will need to add a direct reference to the library in your package.json.

Category

ASP.NET

Affected APIs

Removed MessagePackOptions.disableTimestampEncoding
Removed MessagePackOptions.forceFloat64

Discussion issue

dotnet/aspnetcore#30471


Issue metadata

  • Issue type: breaking-change
@BrennanConroy BrennanConroy added this to the 6.0.0 milestone Feb 25, 2021
@aspnet aspnet locked and limited conversation to collaborators Feb 25, 2021
@Rick-Anderson Rick-Anderson added the Documented The breaking change has been published to the .NET Core docs label Apr 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
6.0.0 Announcement Breaking change Documented The breaking change has been published to the .NET Core docs
Projects
None yet
Development

No branches or pull requests

2 participants