Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 84f0088

Browse files
authored
docs: format CHANGELOG.md with prettier (#321)
This PR does the following: - bumps `action-create-release-pr` to `v3` (May fix https://github.com/MetaMask/create-release-branch/actions/runs/14524263811) - formats `CHANGELOG.md` using Prettier and updates the pipelines to use the correct parameters for changelog validation: both non-RC `yarn auto-changelog validate --prettier` and RC `yarn auto-changelog validate --rc --prettier` branches.
1 parent 3fe05d9 commit 84f0088

4 files changed

Lines changed: 74 additions & 4 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
- run: yarn test
3333
- name: Validate RC changelog
3434
if: ${{ startsWith(github.head_ref, 'release/') }}
35-
run: yarn auto-changelog validate --rc
35+
run: yarn auto-changelog validate --rc --prettier
3636
- name: Validate changelog
3737
if: ${{ !startsWith(github.head_ref, 'release/') }}
38-
run: yarn auto-changelog validate
38+
run: yarn auto-changelog validate --prettier
3939
- name: Require clean working directory
4040
shell: bash
4141
run: |

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-node@v4
3333
with:
3434
node-version-file: .nvmrc
35-
- uses: MetaMask/action-create-release-pr@v1
35+
- uses: MetaMask/action-create-release-pr@v3
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
with:

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,187 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

78
## [Unreleased]
9+
810
### Fixed
11+
912
- Fixed hanging `getLatestBlock()` promises when block tracker is stopped before request completion ([#320](https://github.com/MetaMask/eth-block-tracker/pull/320))
1013
- Pending `getLatestBlock()` requests are now properly rejected with "Block tracker destroyed" error when the tracker is stopped
1114

1215
## [12.0.0]
16+
1317
### Changed
18+
1419
- Errors that occur while polling are no longer wrapped ([#310](https://github.com/MetaMask/eth-block-tracker/pull/310))
1520

1621
### Removed
22+
1723
- **BREAKING:** Remove `SubscribeBlockTracker` ([#309](https://github.com/MetaMask/eth-block-tracker/pull/309))
1824
- Although we continue to maintain this, we have not used it internally for quite some time. In general we have found a polling-based approval to be reliable than a subscription-based approach. We recommend using `PollingBlockTracker` instead.
1925

2026
### Fixed
27+
2128
- Fix `PollingBlockTracker.getLatestBlock` so that it throws an error encountered while making the request instead of hanging, regardless of whether the request occurs inside or outside of a polling loop ([#313](https://github.com/MetaMask/eth-block-tracker/pull/313))
2229
- Fix `PollingBlockTracker.getLatestBlock` so that if invoked while a previous invocation is pending, it will throw if that invocation also throws ([#313](https://github.com/MetaMask/eth-block-tracker/pull/313))
2330

2431
## [11.0.4]
32+
2533
### Changed
34+
2635
- Bump `@metamask/utils` from `^9.1.0` to `^11.0.1` ([#297](https://github.com/MetaMask/eth-block-tracker/pull/297))
2736

2837
## [11.0.3]
38+
2939
### Fixed
40+
3041
- Avoid risk of infinite retry loops when fetching new blocks ([#284](https://github.com/MetaMask/eth-block-tracker/pull/284))
3142
- When the provider returns an error and `PollingBlockTracker` or `SubscribeBlockTracker` is destroyed, the promise returned by the `getLatestBlock` method will be rejected.
3243

3344
## [11.0.2]
45+
3446
### Fixed
47+
3548
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.1` to `^4.1.5` ([#273](https://github.com/MetaMask/eth-block-tracker/pull/273))
3649

3750
## [11.0.1]
51+
3852
### Changed
53+
3954
- Bump `@metamask/eth-json-rpc-provider` from `^4.1.0` to `^4.1.1` ([#261](https://github.com/MetaMask/eth-block-tracker/pull/261))
4055
- Bump `@metamask/safe-event-emitter` from `^3.0.0` to `^3.1.1` ([#261](https://github.com/MetaMask/eth-block-tracker/pull/261))
4156
- Bump `@metamask/utils` from `^8.1.0` to `^9.1.0` ([#261](https://github.com/MetaMask/eth-block-tracker/pull/261))
4257

4358
## [11.0.0]
59+
4460
### Changed
61+
4562
- **BREAKING**: Adapt to EIP-1193 provider changes by using `request` method of provider instead of `sendAsync` ([#252](https://github.com/MetaMask/eth-block-tracker/pull/252))
4663
- This change included in `10.1.0` was mistakenly categorised as a non-breaking change.
4764
- This requires provider object to have the `request` method. You need to upgrade to minimum `4.1.0` of `@metamask/eth-json-rpc-provider` so that the `request` method is available.
4865

4966
## [10.1.0] [DEPRECATED]
67+
5068
### Changed
69+
5170
- Adapt to EIP-1193 provider changes ([#252](https://github.com/MetaMask/eth-block-tracker/pull/252))
5271
- Deprecated `sendAsync` method is replaced with `request` method
5372
- Bump `@metamask/eth-json-rpc-provider` from `^4.0.0` to `^4.1.0` ([#252](https://github.com/MetaMask/eth-block-tracker/pull/252))
5473

5574
## [10.0.0]
75+
5676
### Changed
77+
5778
- BREAKING: Drop support for Node.js v16; add support for Node.js v20, v22 ([#245](https://github.com/MetaMask/eth-block-tracker/pull/245))
5879
- Update `@metamask/eth-json-rpc-provider` from `^3.0.2` to `^4.0.0` ([#247](https://github.com/MetaMask/eth-block-tracker/pull/247))
5980

6081
## [9.0.3]
82+
6183
### Fixed
84+
6285
- Update dependency `@metamask/eth-json-rpc-engine` from `^7.1.1` to `^8.0.2` ([#235](https://github.com/MetaMask/eth-block-tracker/pull/235))
6386
- Update dependency `@metamask/eth-json-rpc-provider` from `^2.3.1` to `^3.0.2` ([#235](https://github.com/MetaMask/eth-block-tracker/pull/235))
6487

6588
## [9.0.2]
89+
6690
### Fixed
91+
6792
- Put back missing empty `params` to `eth_blockNumber` call removed in 9.0.1 ([#198](https://github.com/MetaMask/eth-block-tracker/pull/198))
6893

6994
## [9.0.1]
95+
7096
### Fixed
97+
7198
- Concurrency fix: Prevent multiple simultaneous polling loops ([#208](https://github.com/MetaMask/eth-block-tracker/pull/208))
7299
- Bump `@metamask/eth-json-rpc-provider` from `^2.1.0` to `^2.3.1` ([#198](https://github.com/MetaMask/eth-block-tracker/pull/198)) ([#217](https://github.com/MetaMask/eth-block-tracker/pull/217))
73100

74101
## [9.0.0]
102+
75103
### Changed
104+
76105
- Rename package from `eth-block-tracker` to `@metamask/eth-block-tracker` ([#183](https://github.com/MetaMask/eth-block-tracker/pull/183))
77106

78107
## [8.1.0]
108+
79109
### Changed
110+
80111
- Typescript: Add `checkForLatestBlock` function to `BlockTracker` interface ([#184](https://github.com/MetaMask/eth-block-tracker/pull/184))
81112

82113
## [8.0.0]
114+
83115
### Changed
116+
84117
- Bump @metamask/utils from ^5.0.2 to ^8.1.0 ([#178](https://github.com/MetaMask/eth-block-tracker/pull/178))
85118
- **BREAKING**: Bump @metamask/eth-json-rpc-provider from ^1.0.0 to ^2.1.0 ([#174](https://github.com/MetaMask/eth-block-tracker/pull/174))
86119
- **BREAKING**: Increase minimum Node.js version to 16 ([#173](https://github.com/MetaMask/eth-block-tracker/pull/173))
87120

88121
## [7.2.0]
122+
89123
### Added
124+
90125
- Typescript: Export `BlockTracker` interface ([#168](https://github.com/MetaMask/eth-block-tracker/pull/168))
91126

92127
### Changed
128+
93129
- Dependency Updates: ([#165](https://github.com/MetaMask/eth-block-tracker/pull/165))
94130
- Bump pify from ^3.0.0 to ^5.0.0
95131
- Bump @metamask/utils from ^5.0.1 to ^5.0.2
96132

97133
## [7.1.0]
134+
98135
### Added
136+
99137
- Add `usePastBlocks` to constructor ([#151](https://github.com/MetaMask/eth-block-tracker/pull/151))
100138
- Optional flag. When set to true, it allows blocks less than the current block number to be cached and returned.
101139

102140
## [7.0.1]
141+
103142
### Changed
143+
104144
- Dependency updates:
105145
- Bump @metamask/utils from 5.0.1 to 5.0.2
106146
- [#141](https://github.com/MetaMask/eth-block-tracker/pull/141)
107147
- [#144](https://github.com/MetaMask/eth-block-tracker/pull/144)
108148
- Bump @metamask/safe-event-emitter from 2.0.0 to 3.0.0 ([#143](https://github.com/MetaMask/eth-block-tracker/pull/143))
109149

110150
## [7.0.0]
151+
111152
### Changed
153+
112154
- **BREAKING:** The type of the `provider` option for `PollingBlockTracker` and `SubscribeBlockTracker` has changed ([#130](https://github.com/MetaMask/eth-block-tracker/pull/130))
113155
- The `provider` option must be compatible with the `SafeEventEmitterProvider` type from `@metamask/eth-json-rpc-middleware`.
114156
- The new provider type should be mostly equivalent, except that it's now expected to have a `send` method. We don't use that `send` method in this package though.
115157

116158
### Removed
159+
117160
- **BREAKING:** Remove the `Provider` exported type ([#130](https://github.com/MetaMask/eth-block-tracker/pull/130))
118161
- We now use `@metamask/eth-json-rpc-provider` for this instead, so there was no need to re-export it.
119162

120163
## [6.1.0]
164+
121165
### Added
166+
122167
- Add back Provider type that was accidentally removed in 6.0.0 ([#117](https://github.com/MetaMask/eth-block-tracker/pull/117))
123168

124169
### Fixed
170+
125171
- Align Provider type with `eth-json-rpc-middleware` to prevent typecasting ([#117](https://github.com/MetaMask/eth-block-tracker/pull/117))
126172

127173
## [6.0.0]
174+
128175
### Added
176+
129177
- Add logging ([#112](https://github.com/MetaMask/eth-block-tracker/pull/112))
130178
- You will not be able to see log messages by default, but you can turn them on for this library by setting the `DEBUG` environment variable to `metamask:eth-block-tracker:*` or `metamask:*`.
131179
- Add `destroy` method to block tracker classes ([#106](https://github.com/MetaMask/eth-block-tracker/pull/106))
132180
- Update PollingBlockTracker to support new `blockResetDuration` option ([#103](https://github.com/MetaMask/eth-block-tracker/pull/103))
133181
- Expose types that represent options to PollingBlockTracker and SubscribeBlockTracker constructors ([#103](https://github.com/MetaMask/eth-block-tracker/pull/103))
134182

135183
### Changed
184+
136185
- **BREAKING:** Require Node >= 14 ([#113](https://github.com/MetaMask/eth-block-tracker/pull/113))
137186
- **BREAKING:** Make BaseBlockTracker abstract ([#103](https://github.com/MetaMask/eth-block-tracker/pull/103))
138187
- If you are using this class directly, you must only use PollingBlockTracker or SubscribeBlockTracker.
@@ -146,45 +195,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146195
- This change was made because OpenEthereum does not support this parameter. While we've done our best to confirm that this will not be a breaking change for other Ethereum implementations, you will want to confirm no breakages for yours.
147196

148197
### Security
198+
149199
- Add `@lavamoat/allow-scripts` to ensure that install scripts are opt-in for dependencies ([#97](https://github.com/MetaMask/eth-block-tracker/pull/97))
150200

151201
## [5.0.1] - 2021-03-25
202+
152203
### Fixed
204+
153205
- Add missing `types` field to `package.json` ([#75](https://github.com/MetaMask/eth-block-tracker/pull/75))
154206

155207
## [5.0.0] - 2021-03-25
208+
156209
### Changed
210+
157211
- **(BREAKING)** Refactor exports ([#71](https://github.com/MetaMask/eth-block-tracker/pull/71))
158212
- **(BREAKING)** Target ES2017, remove ES5 builds ([#71](https://github.com/MetaMask/eth-block-tracker/pull/71))
159213
- Migrate to TypeScript ([#71](https://github.com/MetaMask/eth-block-tracker/pull/71))
160214
- Update various dependencies ([#44](https://github.com/MetaMask/eth-block-tracker/pull/44), [#49](https://github.com/MetaMask/eth-block-tracker/pull/49), [#54](https://github.com/MetaMask/eth-block-tracker/pull/54), [#59](https://github.com/MetaMask/eth-block-tracker/pull/59), [#61](https://github.com/MetaMask/eth-block-tracker/pull/61), [#62](https://github.com/MetaMask/eth-block-tracker/pull/62), [#63](https://github.com/MetaMask/eth-block-tracker/pull/63), [#70](https://github.com/MetaMask/eth-block-tracker/pull/70), [#72](https://github.com/MetaMask/eth-block-tracker/pull/72))
161215

162216
### Removed
217+
163218
- Remove unused production dependencies ([#60](https://github.com/MetaMask/eth-block-tracker/pull/60), [#68](https://github.com/MetaMask/eth-block-tracker/pull/68))
164219

165220
## [4.4.3] - 2019-08-30
221+
166222
### Added
223+
167224
- Add SubscribeBlockTracker
168225

169226
### Changed
227+
170228
- Change events so that they now only return the block number (internal polling is done via `eth_blockNumber`)
171229
- Add `retryTimeout` and `keepEventLoopActive` to constructor
172230
- Update block trackers to inherit from `safe-event-emitter` rather than EventEmitter
173231

174232
### Removed
233+
175234
- Remove `block` event
176235
- Please use `latest` or `sync`.
177236

178237
## [4.0.0] - 2018-04-26
238+
179239
### Added
240+
180241
- Add isRunning method
181242
- Add `error` event
182243

183244
### Changed
245+
184246
- Significantly rewrite `eth-block-tracker` (primarily due to optimizing network IO)
185247
- Rename `awaitCurrentBlock` to `getLatestBlock`
186248

187249
### Removed
250+
188251
- Remove `stop`/`start` methods from BlockTrackers
189252
- BlockTrackers now automatically start and stop based on listener count for the `latest` and `sync` events. You can force a stop by calling the `EventEmitter` method `removeAllListeners`.
190253
- Remove tx body from block
@@ -193,7 +256,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
193256
- Remove test/util/testBlockMiddleware
194257

195258
## [3.0.0] - 2018-04-16
259+
196260
### Changed
261+
197262
- Update published version so main module now exports unprocessed source
198263
- Module includes dist:
199264
- Bundle: `dist/EthBlockTracker.js`
@@ -203,16 +268,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
203268
- It no longer provides a callback to event handlers.
204269

205270
### Fixed
271+
206272
- Fix `awaitCurrentBlock` return value
207273

208274
## [2.0.0] - 2017-06-14
275+
209276
### Added
277+
210278
- Expose EventEmitter interface (via `async-eventemitter`)
211279
- Add `getTrackingBlock`, `getCurrentBlock`, `start`, and `stop`
212280
- Add events: `block`, `latest`, `sync`
213281

214282
## [1.0.0] - 2017-02-03
283+
215284
### Added
285+
216286
- Add RpcBlockTracker
217287

218288
[Unreleased]: https://github.com/MetaMask/eth-block-tracker/compare/v12.0.0...HEAD

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The project follows the same release process as the other libraries in the MetaM
123123
- Generally any changes that don't affect consumers of the package (e.g. lockfile changes or development environment changes) are omitted. Exceptions may be made for changes that might be of interest despite not having an effect upon the published package (e.g. major test improvements, security improvements, improved documentation, etc.).
124124
- Try to explain each change in terms that users of the package would understand (e.g. avoid referencing internal variables/concepts).
125125
- Consolidate related changes into one change entry if it makes it easier to explain.
126-
- Run `yarn auto-changelog validate --rc` to check that the changelog is correctly formatted.
126+
- Run `yarn auto-changelog validate --rc --prettier` to check that the changelog is correctly formatted.
127127

128128
5. Review and QA the release.
129129

0 commit comments

Comments
 (0)