Skip to content

Commit b985910

Browse files
committed
Add EventEmitter3 Node.js event emitter replacement CHANGELOG notes
1 parent f611942 commit b985910

File tree

5 files changed

+126
-2
lines changed

5 files changed

+126
-2
lines changed

packages/blockchain/CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@ This breaking release round will come with a new versioning scheme (thanks to @p
1616

1717
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
1818

19-
### Other Changes
19+
### Native Node.js EventEmitter Replacement
20+
21+
We removed the last remaining internal Node.js utility dependency to make the packages more browser friendly and replace the native Node.js `EventEmitter` by using the [eventemitter3](https://github.com/primus/eventemitter3) package as a replacement.
22+
23+
The new package is meant to be performant and mostly compatible regarding usage and API.
24+
25+
If you directly import the Node.js event emitter, you need to switch your imports to:
26+
27+
```ts
28+
import { EventEmitter } from 'events' // old
29+
import { EventEmitter } from 'eventemitter3' // new
30+
```
2031
21-
- Integration of `debug` logging functionality for easier internal debugging, PR [#3676](https://github.com/ethereumjs/ethereumjs-monorepo/pull/3676)
32+
All this might affect you if you listen to events emitted by the `blockchain.events` `EventEmitter` instance.
2233
2334
## 8.0.0-alpha.1 - 2024-10-17
2435

packages/common/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## 10.0.0-rc.1 - [ UNPUBLISHED ]
10+
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
12+
13+
### New Versioning Scheme
14+
15+
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
16+
17+
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
18+
19+
### Native Node.js EventEmitter Replacement
20+
21+
We removed the last remaining internal Node.js utility dependency to make the packages more browser friendly and replace the native Node.js `EventEmitter` by using the [eventemitter3](https://github.com/primus/eventemitter3) package as a replacement.
22+
23+
The new package is meant to be performant and mostly compatible regarding usage and API.
24+
25+
If you directly import the Node.js event emitter, you need to switch your imports to:
26+
27+
```ts
28+
import { EventEmitter } from 'events' // old
29+
import { EventEmitter } from 'eventemitter3' // new
30+
```
31+
32+
All this might affect you if you listen to events emitted by the `common.events` `EventEmitter` instance, e.g. to detect hardfork changes.
33+
934
## 5.0.0-alpha.1 - 2024-10-17
1035
1136
This is a first round of `alpha` releases for our upcoming breaking release round with a focus on bundle size (tree shaking) and security (dependencies down + no WASM (by default)). Note that `alpha` releases are not meant to be fully API-stable yet and are for early testing only. This release series will be then followed by a `beta` release round where APIs are expected to be mostly stable. Final releases can then be expected for late October/early November 2024.

packages/evm/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## 10.0.0-rc.1 - [ UNPUBLISHED ]
10+
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
12+
13+
### New Versioning Scheme
14+
15+
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
16+
17+
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
18+
19+
### Native Node.js EventEmitter Replacement
20+
21+
We removed the last remaining internal Node.js utility dependency to make the packages more browser friendly and replace the native Node.js `EventEmitter` by using the [eventemitter3](https://github.com/primus/eventemitter3) package as a replacement.
22+
23+
The new package is meant to be performant and mostly compatible regarding usage and API.
24+
25+
If you directly import the Node.js event emitter, you need to switch your imports to:
26+
27+
```ts
28+
import { EventEmitter } from 'events' // old
29+
import { EventEmitter } from 'eventemitter3' // new
30+
```
31+
32+
The new event emitter package also made it possible to remove/replace the separate async event emitter custom integration and use the new package here as well.
33+
34+
For listening to async EVM events like `step` or VM events like `newContract` or `afterTx` API slightly changed and it is now needed to take the `resolve` parameter in on listening and explicitly call at the end of the event handling:
35+
36+
```ts
37+
evm.events.on('beforeMessage', (event) => {
38+
console.log('synchronous listener to beforeMessage', event)
39+
})
40+
evm.events.on('afterMessage', (event, resolve) => {
41+
console.log('asynchronous listener to beforeMessage', event)
42+
// we need to call resolve() to avoid the event listener hanging
43+
resolve?.()
44+
})
45+
```
46+
947
## 4.0.0-alpha.1 - 2024-10-17
1048

1149
This is a first round of `alpha` releases for our upcoming breaking release round with a focus on bundle size (tree shaking) and security (dependencies down + no WASM (by default)). Note that `alpha` releases are not meant to be fully API-stable yet and are for early testing only. This release series will be then followed by a `beta` release round where APIs are expected to be mostly stable. Final releases can then be expected for late October/early November 2024.

packages/mpt/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## 10.0.0-rc.1 - [ UNPUBLISHED ]
10+
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
12+
13+
### New Versioning Scheme
14+
15+
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
16+
17+
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
18+
19+
### Other Changes
20+
921
## 7.0.0-alpha.1 - 2024-10-17
1022

1123
This is a first round of `alpha` releases for our upcoming breaking release round with a focus on bundle size (tree shaking) and security (dependencies down + no WASM (by default)). Note that `alpha` releases are not meant to be fully API-stable yet and are for early testing only. This release series will be then followed by a `beta` release round where APIs are expected to be mostly stable. Final releases can then be expected for late October/early November 2024.

packages/vm/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## 10.0.0-rc.1 - [ UNPUBLISHED ]
10+
11+
This is the first (and likely the last) round of `RC` releases for the upcoming breaking releases, following the `alpha` releases from October 2024. The releases are somewhat delayed (sorry for that), but final releases can now be expected very very soon, to be released once the Ethereum [Pectra](https://eips.ethereum.org/EIPS/eip-7600) hardfork is scheduled for mainnet and all EIPs are fully finalized. Pectra will then also be the default hardfork setting for all EthereumJS libraries.
12+
13+
### New Versioning Scheme
14+
15+
This breaking release round will come with a new versioning scheme (thanks to @paulmillr for the [suggestion](https://github.com/ethereumjs/ethereumjs-monorepo/issues/3748)), aligning the package numbers on breaking releases for all EthereumJS packages. This will make it easier to report bugs ("bug happened on EthereumJS version 10 releases"), reason about release series and make library compatibility more transparent and easier to grasp.
16+
17+
As a start we bump all major release versions to version 10, these `RC` releases are the first to be released with the new versioning scheme.
18+
19+
### Native Node.js EventEmitter Replacement
20+
21+
We removed the last remaining internal Node.js utility dependency to make the packages more browser friendly and replace the native Node.js `EventEmitter` by using the [eventemitter3](https://github.com/primus/eventemitter3) package as a replacement.
22+
23+
The new package is meant to be performant and mostly compatible regarding usage and API.
24+
25+
If you directly import the Node.js event emitter, you need to switch your imports to:
26+
27+
```ts
28+
import { EventEmitter } from 'events' // old
29+
import { EventEmitter } from 'eventemitter3' // new
30+
```
31+
32+
The new event emitter package also made it possible to remove/replace the separate async event emitter custom integration and use the new package here as well.
33+
34+
For listening to async EVM events like `step` or VM events like `newContract` or `afterTx` API slightly changed and it is now needed to take the `resolve` parameter in on listening and explicitly call at the end of the event handling:
35+
36+
```ts
37+
evm.events.on('beforeMessage', (event) => {
38+
console.log('synchronous listener to beforeMessage', event)
39+
})
40+
evm.events.on('afterMessage', (event, resolve) => {
41+
console.log('asynchronous listener to beforeMessage', event)
42+
// we need to call resolve() to avoid the event listener hanging
43+
resolve?.()
44+
})
45+
```
46+
947
## 9.0.0-alpha.1 - 2024-10-17
1048

1149
This is a first round of `alpha` releases for our upcoming breaking release round with a focus on bundle size (tree shaking) and security (dependencies down + no WASM (by default)). Note that `alpha` releases are not meant to be fully API-stable yet and are for early testing only. This release series will be then followed by a `beta` release round where APIs are expected to be mostly stable. Final releases can then be expected for late October/early November 2024.

0 commit comments

Comments
 (0)