All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
PendingJsonRpcResponse
type (#43) - Add utils for converting between numbers and hex (#41)
- Add coercion utils (#38)
- Make JSON-RPC error
data
property optional (#31) - Don't include test files in dist folder (#35)
- Fix typo in README (#28)
- Allow omitting JSON-RPC params when params can be undefined (#29)
- Bump
superstruct
to ^0.16.5 (#26)superstruct
s 0.16.1 through 0.16.4 were not compatible with Node 14; this restores that compatibility.
- Promote
@types/debug
from development dependencies to production dependencies (#23)
- BREAKING: Improve types and type validation (#19)
- Various type changes have been made that might be breaking:
- The
JsonRpcRequest
andJsonRpcNotification
types now include a generic constraint requiring that theParams
type extends theJsonRpcParams
type. - The
JsonRpcSuccess
andJsonRpcResponse
types now include a generic contraint for theResult
type, requiring that it extends theJson
type. - Various validation functions now accept
unknown
parameters rather than specific types. This should not be breaking except that it may affect type inference for the parameters passed in.
- The
- New JSON-related functions have been added:
assertIsJsonRpcResponse
isJsonRpcResponse
InferWithParams
JsonRpcParams
- New JSON Struct types have been added:
JsonRpcErrorStruct
JsonRpcFailureStruct
JsonRpcIdStruct
JsonRpcParamsStruct
JsonRpcRequestStruct
JsonRpcResponseStruct
JsonRpcSuccessStruct
JsonRpcVersionStruct
JsonStruct
- Various type changes have been made that might be breaking:
- Add JSON storage validation and limit utilities (#14)
- Adds a new function
validateJsonAndGetSize
.
- Adds a new function
- Add more JSON utils (#8)
- BREAKING: Refactor and expand time utils (#9)
- Adds a new function,
inMilliseconds
, and moves the time constants into a TypeScriptenum
.
- Adds a new function,
- Initial release