@metamask/utils 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assert.js +7 -2
- package/dist/assert.js.map +1 -1
- package/dist/base64.d.ts +24 -0
- package/dist/base64.js +35 -0
- package/dist/base64.js.map +1 -0
- package/dist/bytes.js +13 -9
- package/dist/bytes.js.map +1 -1
- package/dist/checksum.d.ts +1 -0
- package/dist/checksum.js +7 -0
- package/dist/checksum.js.map +1 -0
- package/dist/coercers.js +4 -4
- package/dist/coercers.js.map +1 -1
- package/dist/hex.d.ts +4 -4
- package/dist/hex.js +12 -12
- package/dist/hex.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +12 -12
- package/dist/json.js +27 -10
- package/dist/json.js.map +1 -1
- package/dist/json.test-d.js +3 -3
- package/dist/json.test-d.js.map +1 -1
- package/dist/number.js +1 -1
- package/dist/number.js.map +1 -1
- package/dist/opaque.d.ts +5 -0
- package/dist/opaque.js +3 -0
- package/dist/opaque.js.map +1 -0
- package/dist/versions.d.ts +100 -0
- package/dist/versions.js +95 -0
- package/dist/versions.js.map +1 -0
- package/package.json +21 -21
- package/CHANGELOG.md +0 -102
package/CHANGELOG.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
All notable changes to this project will be documented in this file.
|
|
3
|
-
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
## [Unreleased]
|
|
8
|
-
|
|
9
|
-
## [3.3.0]
|
|
10
|
-
### Added
|
|
11
|
-
- Add more assertion utils ([#49](https://github.com/MetaMask/utils/pull/49))
|
|
12
|
-
- Add JSON-RPC error validation functions ([#46](https://github.com/MetaMask/utils/pull/46))
|
|
13
|
-
- Add convenience function for creating a `DataView` ([#45](https://github.com/MetaMask/utils/pull/45))
|
|
14
|
-
|
|
15
|
-
### Fixed
|
|
16
|
-
- Update JSON validation logic ([#47](https://github.com/MetaMask/utils/pull/47))
|
|
17
|
-
- Validation would previously allow for `undefined` values, which is not a standard JSON type
|
|
18
|
-
|
|
19
|
-
## [3.2.0]
|
|
20
|
-
### Added
|
|
21
|
-
- Add `PendingJsonRpcResponse` type ([#43](https://github.com/MetaMask/utils/pull/43))
|
|
22
|
-
- Add utils for converting between numbers and hex ([#41](https://github.com/MetaMask/utils/pull/41))
|
|
23
|
-
- Add coercion utils ([#38](https://github.com/MetaMask/utils/pull/38))
|
|
24
|
-
|
|
25
|
-
## [3.1.0]
|
|
26
|
-
### Added
|
|
27
|
-
- Add assertion utils ([#33](https://github.com/MetaMask/utils/pull/33))
|
|
28
|
-
- Add util functions for encoding and decoding bytes ([#34](https://github.com/MetaMask/utils/pull/34))
|
|
29
|
-
|
|
30
|
-
### Fixed
|
|
31
|
-
- Make JSON-RPC error `data` property optional ([#31](https://github.com/MetaMask/utils/pull/31))
|
|
32
|
-
- Don't include test files in dist folder ([#35](https://github.com/MetaMask/utils/pull/35))
|
|
33
|
-
- Fix typo in README ([#28](https://github.com/MetaMask/utils/pull/28))
|
|
34
|
-
|
|
35
|
-
## [3.0.3]
|
|
36
|
-
### Fixed
|
|
37
|
-
- Allow omitting JSON-RPC params when params can be undefined ([#29](https://github.com/MetaMask/utils/pull/29))
|
|
38
|
-
|
|
39
|
-
## [3.0.2]
|
|
40
|
-
### Fixed
|
|
41
|
-
- Bump `superstruct` to ^0.16.5 ([#26](https://github.com/MetaMask/utils/pull/26))
|
|
42
|
-
- `superstruct`s 0.16.1 through 0.16.4 were not compatible with Node 14; this restores that compatibility.
|
|
43
|
-
|
|
44
|
-
## [3.0.1]
|
|
45
|
-
### Fixed
|
|
46
|
-
- Promote `@types/debug` from development dependencies to production dependencies ([#23](https://github.com/MetaMask/utils/pull/23))
|
|
47
|
-
|
|
48
|
-
## [3.0.0]
|
|
49
|
-
### Added
|
|
50
|
-
- Add logging functions ([#20](https://github.com/MetaMask/utils/pull/20))
|
|
51
|
-
- Add frozen collections (implemented in [#5](https://github.com/MetaMask/utils/pull/5) but exported in [#19](https://github.com/MetaMask/utils/pull/19))
|
|
52
|
-
|
|
53
|
-
### Changed
|
|
54
|
-
- **BREAKING:** Improve types and type validation ([#19](https://github.com/MetaMask/utils/pull/19))
|
|
55
|
-
- Various type changes have been made that might be breaking:
|
|
56
|
-
- The `JsonRpcRequest` and `JsonRpcNotification` types now include a generic constraint requiring that the `Params` type extends the `JsonRpcParams` type.
|
|
57
|
-
- The `JsonRpcSuccess` and `JsonRpcResponse` types now include a generic contraint for the `Result` type, requiring that it extends the `Json` type.
|
|
58
|
-
- 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.
|
|
59
|
-
- New JSON-related functions have been added:
|
|
60
|
-
- `assertIsJsonRpcResponse`
|
|
61
|
-
- `isJsonRpcResponse`
|
|
62
|
-
- `InferWithParams`
|
|
63
|
-
- `JsonRpcParams`
|
|
64
|
-
- New JSON Struct types have been added:
|
|
65
|
-
- `JsonRpcErrorStruct`
|
|
66
|
-
- `JsonRpcFailureStruct`
|
|
67
|
-
- `JsonRpcIdStruct`
|
|
68
|
-
- `JsonRpcParamsStruct`
|
|
69
|
-
- `JsonRpcRequestStruct`
|
|
70
|
-
- `JsonRpcResponseStruct`
|
|
71
|
-
- `JsonRpcSuccessStruct`
|
|
72
|
-
- `JsonRpcVersionStruct`
|
|
73
|
-
- `JsonStruct`
|
|
74
|
-
|
|
75
|
-
## [2.1.0]
|
|
76
|
-
### Added
|
|
77
|
-
- Add JSON storage validation and limit utilities ([#14](https://github.com/MetaMask/utils/pull/14))
|
|
78
|
-
- Adds a new function `validateJsonAndGetSize`.
|
|
79
|
-
|
|
80
|
-
## [2.0.0]
|
|
81
|
-
### Added
|
|
82
|
-
- Add more JSON utils ([#8](https://github.com/MetaMask/utils/pull/8))
|
|
83
|
-
|
|
84
|
-
### Changed
|
|
85
|
-
- **BREAKING:** Refactor and expand time utils ([#9](https://github.com/MetaMask/utils/pull/9))
|
|
86
|
-
- Adds a new function, `inMilliseconds`, and moves the time constants into a TypeScript `enum`.
|
|
87
|
-
|
|
88
|
-
## [1.0.0]
|
|
89
|
-
### Added
|
|
90
|
-
- Initial release
|
|
91
|
-
|
|
92
|
-
[Unreleased]: https://github.com/MetaMask/utils/compare/v3.3.0...HEAD
|
|
93
|
-
[3.3.0]: https://github.com/MetaMask/utils/compare/v3.2.0...v3.3.0
|
|
94
|
-
[3.2.0]: https://github.com/MetaMask/utils/compare/v3.1.0...v3.2.0
|
|
95
|
-
[3.1.0]: https://github.com/MetaMask/utils/compare/v3.0.3...v3.1.0
|
|
96
|
-
[3.0.3]: https://github.com/MetaMask/utils/compare/v3.0.2...v3.0.3
|
|
97
|
-
[3.0.2]: https://github.com/MetaMask/utils/compare/v3.0.1...v3.0.2
|
|
98
|
-
[3.0.1]: https://github.com/MetaMask/utils/compare/v3.0.0...v3.0.1
|
|
99
|
-
[3.0.0]: https://github.com/MetaMask/utils/compare/v2.1.0...v3.0.0
|
|
100
|
-
[2.1.0]: https://github.com/MetaMask/utils/compare/v2.0.0...v2.1.0
|
|
101
|
-
[2.0.0]: https://github.com/MetaMask/utils/compare/v1.0.0...v2.0.0
|
|
102
|
-
[1.0.0]: https://github.com/MetaMask/utils/releases/tag/v1.0.0
|