Commit d43fa26
authored
Replace 'superstruct' imports with '@metamask/superstruct' (#613)
## Explanation
As part of the Wallet Framework Team's OKR (Q2 2024 O3KR4) for upgrading
TypeScript to v5.0+ in the core monorepo, we are updating dependencies
of the core repo so that they generate builds and type declarations for
both CJS and ESM.
This requirement applies to nested dependencies as well, so we are also
replacing `superstruct` with the ESM-compatible fork
`@metamask/superstruct` in all core dependency packages.
## Description
- [x] Replace `superstruct` dependency with `@metamask/superstruct`
`^3.0.0`.
- [x] Replace all `superstruct` import statements with
`@metamask/superstruct`
- [x] Bump `@metamask/utils` to `^8.5.0`.
- [x] If feasible without too much additional work:
- [ ] ~Bump `typescript` to `~5.0.4`~
- [x] Set tsconfig options `module` and `moduleResolution` to
`NodeNext`.
- [ ] Using the `create-release-pr` github action, publish a new release
containing these changes.
## References
- Closes #611
## Changelog
```md
## [3.1.1]
### Changed
- Bump `@metamask/utils` from `^8.3.0` to `^8.5.0` ([#613](#613))
### Fixed
- Replace `superstruct` with ESM-compatible `@metamask/superstruct` `^3.0.0` ([#613](#613))
- This fixes the issue of this package being unusable by any TypeScript project that uses `Node16` or `NodeNext` as its `moduleResolution` option.
```1 parent 8209318 commit d43fa26
File tree
7 files changed
+1801
-1490
lines changed- scripts
- src
7 files changed
+1801
-1490
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
7 | 2 | | |
8 | 3 | | |
9 | 4 | | |
| |||
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
19 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | | - | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
12 | | - | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments