Skip to content

Releases: MetaMask/utils

3.0.2

23 Sep 16:14
4597dd9
Compare
Choose a tag to compare

Fixed

  • Bump superstruct to ^0.16.5 (#26)
    • superstructs 0.16.1 through 0.16.4 were not compatible with Node 14; this restores that compatibility.

3.0.1

19 Aug 23:15
3abe4ff
Compare
Choose a tag to compare

Fixed

  • Promote @types/debug from development dependencies to production dependencies (#23)

3.0.0

19 Aug 19:01
df2fa2e
Compare
Choose a tag to compare

Added

  • Add logging functions (#20)
  • Add frozen collections (implemented in #5 but exported in #19)

Changed

  • BREAKING: Improve types and type validation (#19)
    • Various type changes have been made that might be breaking:
      • The JsonRpcRequest and JsonRpcNotification types now include a generic constraint requiring that the Params type extends the JsonRpcParams type.
      • The JsonRpcSuccess and JsonRpcResponse types now include a generic contraint for the Result type, requiring that it extends the Json 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.
    • 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

2.1.0

13 Jul 13:28
6bd30bf
Compare
Choose a tag to compare

Added

  • Add JSON storage validation and limit utilities (#14)
    • Adds a new function validateJsonAndGetSize.

2.0.0

16 May 17:29
7c14f9e
Compare
Choose a tag to compare

Added

  • Add more JSON utils (#8)

Changed

  • BREAKING: Refactor and expand time utils (#9)
    • Adds a new function, inMilliseconds, and moves the time constants into a TypeScript enum.

1.0.0

15 May 23:08
a653900
Compare
Choose a tag to compare

Added

  • Initial release