Releases: MetaMask/utils
Releases · MetaMask/utils
10.0.0
9.3.0
9.2.1
9.2.0
9.1.0
9.0.0
Changed
- BREAKING: The return types of functions
getChecksumAddress
,numberToHex
,bigIntToHex
are narrowed fromstring
toHex
(#193)
Fixed
- Bump
@metamask/superstruct
from^3.0.0
to^3.1.0
(#194)- If
@metamask/utils
<=8.5.0
is used with@metamask/superstruct
>=3.1.0
the following error may be encountered:
This can be resolved by updatingerror TS2742: The inferred type of 'ExampleType' cannot be named without a reference to '@metamask/utils/node_modules/@metamask/superstruct'. This is likely not portable. A type annotation is necessary.
@metamask/utils
to>=9.0.0
. - If
8.5.0
Changed
- Bump dependency
semver
from^5.7.1
to^7.6.0
(#181).
Fixed
- Replace dependency
superstruct
^1.0.3
with ESM-compatible@metamask/superstruct
^3.0.0
(#185).- This fixes the issue of this package being unusable by any TypeScript project that uses
Node16
orNodeNext
as itsmoduleResolution
option.
- This fixes the issue of this package being unusable by any TypeScript project that uses
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#182)
- Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the
exports
field inpackage.json
linked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#182).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.