Commit 87a661d
authored
BREAKING: Build packages with
## Explanation
This changes the build system to build all packages with `tsup`, instead
of `tsc`. `tsc` is still used for generating the declaration files and
type checking, and `tsup` is used for building the `.js` and (new)
`.mjs` files. The benefit of this is that we now have a ESM build as
well as a CJS build.
## References
See MetaMask/utils#144.
## Changelog
<!--
If you're making any consumer-facing changes, list those changes here as
if you were updating a changelog, using the template below as a guide.
(CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or
FIXED. For security-related issues, follow the Security Advisory
process.)
Please take care to name the exact pieces of the API you've added or
changed (e.g. types, interfaces, functions, or methods).
If there are any breaking changes, make sure to offer a solution for
consumers to follow once they upgrade to the changes.
Finally, if you're only making changes to development scripts or tests,
you may replace the template below with "None".
-->
### `@metamask/accounts-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/address-book-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/announcement-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/approval-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/assets-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/base-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/build-utils`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/composable-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/controller-utils`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/ens-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/eth-json-rpc-provider`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/gas-fee-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/json-rpc-engine`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/json-rpc-middleware-stream`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/keyring-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/logging-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/message-manager`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/name-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/network-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/notification-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/permission-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/permission-log-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/phishing-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/polling-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/preferences-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/queued-request-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/rate-limit-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/selected-network-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/signature-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/transaction-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
### `@metamask/user-operation-controller`
- **BREAKING**: Add ESM build.
- It's no longer possible to import files from `./dist` directly.
## Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriatetsup (#3998)1 parent 964e389 commit 87a661d
File tree
74 files changed
+1156
-70
lines changed- .yarn/patches
- packages
- accounts-controller
- address-book-controller
- announcement-controller
- approval-controller
- assets-controllers
- base-controller
- build-utils
- composable-controller
- controller-utils
- ens-controller
- eth-json-rpc-provider
- gas-fee-controller
- json-rpc-engine
- json-rpc-middleware-stream
- keyring-controller
- logging-controller
- message-manager
- name-controller
- network-controller
- notification-controller
- permission-controller
- permission-log-controller
- phishing-controller
- polling-controller
- preferences-controller
- queued-request-controller
- rate-limit-controller
- selected-network-controller
- signature-controller
- transaction-controller
- user-operation-controller
- scripts/create-package/package-template
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+1156
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
247 | 268 | | |
248 | 269 | | |
249 | 270 | | |
| |||
254 | 275 | | |
255 | 276 | | |
256 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
257 | 282 | | |
258 | 283 | | |
259 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | | - | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
95 | | - | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
0 commit comments