v2.0.0
Release notes
Improve overall error handling. #39
Allow client and server to send/receive batch requests. #22
Add methods to client and server to stop listening for updates. #42. Note that this introduces a new syntax for listening for notifications as detailed in the README
Allow clients to omit params
from requests. #51
Fix issue where clients would not receive notification message if received in a batch. #46
Remove serverDisconnected()
method from websocket browser client. #44
Resolve host
, port
and path
for websocket server. #41
Fix issue where the library would throw an error if a server method returned an undefined
result. #45
Commits
- Use '127.0.0.1' instead of 'localhost' for default server port fe2d9f2
- Add batch notifications to README 60138ab
- Allow for undefined params in client request. Dont error server if params is undefined in message. Refs #51. 3457fd3
- Fix readme TOC d938e75
- Merge pull request #49 from isaacgr/improvement/#39/improve_error_handling b1a37a0
- Dont add delimiter to error response. Refs #39. 6bee35d
- Add promise method tests to ws server. dbde8ed
- Check if response in array contains properties for expected object before sending notification. Refs #22. Refs #39. 9f35c25
- Do not respond to client if batch request full of notifications is received. Refs #39. Refs #22. 337c3af
- Check if batchRequests array contains null values and filter them. Return indication that batchRequest was empty/all notifications. Refs #22. Refs #39. 043f142
- Breakout notifications into own section. a8d17ba
- Reject server.close() with error message. Check if notifications is an array. Return details of client if it is unknown on client disconnect. Refs #39. c106816
- Handle unknown error if error message cant be parsed. Refs #39. 6b9183a
- Respond with unknown error and stack trace if error message cant be parsed. Refs #39. d1ac7c0
- Add test to server for notifications. ed8b59a
- Update readme with onNotify methods. Refs #22. Refs #42. Refs #39. 59e2115
- Throw errors if client/server try to listen or remove notifications for reserved event names. Refs #39. 424bef5
- Add support to server for receiving batch notifications. Update some comments. Refs #22. 8c3184d
- Add error handling to server.notify(). Refs #39. Refs #46. 726eb63
- Add tests for server.notify(). Refs #39. Refs #46. d59eba3
- Change description. Add keywords. 28012f7
- Update doc for server.notify(). e2d6fc1
- Add newline c557467
- Update readme. 43d0431
- Send notifications when received in a batch. Change API for websocket subscriptions. Add tests for receiving notifications in a batch. Refs #42. 108b357
- Fix subscription methods in all clients. Changes how ws browser client listens for subs. Add tests for subscribe, unsubscribe and unsubscribeAll. Add method to ws browser client to get event listeners. Refs #42. 5a2d44e
- Add test to make sure getResult() handles undefined result. Refs #45 9470f6a
- Remove outstanding message printout. Refs #39. d2f82d8
- Replace process.stdout with console.log. Refs #39. b982fb8
- Remove unknownId error, just print outstanding message log. Add tests for unknown error. Fix ws node client tests. Refs #39. 1aa8aef
- Remove serverDisconnected() method. Refs #44. 59f691f
- Resolve host, port and path for WS server. Add tests. Refs #41. b7d6008
- Check if result is null before trying to read .then. Refs #45. Return 0 instead of empty dict on success if no result. c6e6aa1
- Fix onNotify method. Refs #42. 3ce3aa4
- Use client.send instead of client.write. Refs #39. 011b743
- Emit message method if notification received. Refs #42. 4c65ff4
- Send notification if its in a batch. Refs #46. 82ce3ad
- Send notification if received in batch request. Refs #46. 13f154b
- Replace if statement with ternary operator. 8e61e56
- Add error handling to server.notify(). Refs #39. b1ec43e
- Throw errors in formatResponse if types dont match. Refs #39. 627df75
- Add component tests for formatting functions. Refs #39. 3c00aab
- Use updated generic methods for data and error handling. Refs #39. Refs #42. 9afa764
- Add methods to remove a single lisener for subscriptions. Add methods to remove all listeners for a subscription method. Refs #42. f8d6308
- Remove overwritten functions in node ws client and use generic index.js functions. Refs #39. b106290
- Emit the message method as notification. Clients listen for message method as opposed to 'notify' method. Refs #42. a2e57ed
- Resolve options object for Websocket server. Refs #41. 8bae27e
- Move formatResponse to its own function. Remove delimiters from ServerProtocol error responses. Some http server tests still failing. Refs #39. b100673
- Fix issues causing messageBuffer test failures. Improve notification error handling. Refs #39. 5de406a
- Fix formatResponse function. Fix notification responses. MessageBuffer tests are now failing. Refs #39. 5d1bbad
- Better error handling for clients. Refs #39. 74908f8
- Handle timeout errors better. Reject if error is thrown even if its not a TypeError. Refs #39. be90b07
- Add unknown error to codes and messages. Refs #39. b2feef3
- Fix linting errors a3e1d07
- Change port since this failed on my windows machine. 339c508
- Better internal error handling support. Throw custom BatchRequest error for batches to allow for promise handling outside validateMessaage. Refs #39. de655b8
- Remove unecessary promise wrapping. Throw errors instead of rejecting. Refs #39. 363db3c
- Notification response should work with jsonrpc 1.0. Refs #39. f4fa3cf
- Rename sendError to formatError. Refs #39. 4c5d3b9
- Clean up messageBuffer code. 607a539
- Update handleValidation to return a single promise. Refs #39. Return resolve/reject from validateMessage. Refs #39. 4120d4f
- Pass factory instance to protocol class. eb490f6
- Pass factory instance into contructor. handleValidation no longer reuturns a promise list. Refs #39. Use sendError method for HTTPServer/ Refs #39. 8b620a5
- Merge pull request #38 from isaacgr/dependabot/npm_and_yarn/eslint-utils-1.4.3 fd89249
- Bump eslint-utils from 1.3.1 to 1.4.3 e667a5f