Skip to content

Commit

Permalink
feat(websocket): Add serializer/deserializer config settings (#3489)
Browse files Browse the repository at this point in the history
- Fixes the build for latest TypeScript
- Adds a `serializer` and `deserializer` config setting that defaults to JSON serialization both in and out of the socket
- deprecates the `resultSelector` (use `deserializer` instead)

BREAKING CHANGE: WebSocketSubject will now JSON serialize all messages sent over it by default, to return to the old behavior, pass a config setting of `serializer: x => x` like so: `websocket({ url, serializer: x => x })`
  • Loading branch information
benlesh authored Mar 29, 2018
1 parent 6f02a58 commit 8d44124
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 325 deletions.
14 changes: 11 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"prepublish": "shx rm -rf ./typings && npm run build_all",
"publish_docs": "./publish_docs.sh",
"test_browser": "npm-run-all build_spec_browser && opn spec/support/mocha-browser-runner.html",
"test": "cross-env TS_NODE_FAST=true mocha --require ts-node/register --opts spec-build/support/coverage.opts \"spec-build/**/*-spec.ts\"",
"test": "mocha --require ts-node/register --opts spec-build/support/coverage.opts \"spec-build/**/*-spec.ts\"",
"test:cover": "cross-env TS_NODE_FAST=true nyc npm test",
"test:circular": "dependency-cruise --validate .dependency-cruiser.json -x \"^node_modules\" src",
"test:systemjs": "node integration/systemjs/systemjs-compatibility-spec.js",
Expand Down
Loading

0 comments on commit 8d44124

Please sign in to comment.