Changed MessagePack library in @microsoft/signalr-protocol-msgpack javascript library #454
Labels
6.0.0
Announcement
Breaking change
Documented
The breaking change has been published to the .NET Core docs
Milestone
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 theMessagePackHubProtocol
also has a breaking change. The optionsdisableTimestampEncoding
andforceFloat64
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
In addition the
msgpack5
package was downloaded to yournode_modules
so you could use it in your app if you wanted.MessagePackOptions
haddisableTimestampEncoding
andforceFloat64
properties, but doesn't anymore.New behavior
To use the MessagePack hub protocol in the browser you now only need 2 script references
And you will have the
@msgpack/msgpack
package downloaded to yournode_modules
if you want to use the directly in your app.MessagePackOptions
has new properties and removed thedisableTimestampEncoding
andforceFloat64
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
The text was updated successfully, but these errors were encountered: