Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit d6235a7

Browse files
authored
Merge pull request #106 from ethereumjs/new-release-v400
New release v4.0.0
2 parents c9722da + b41a144 commit d6235a7

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,40 @@ 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+
## [4.0.0] - 2019-04-26
10+
11+
First **TypeScript** based release of the library. `TypeScript` handles `ES6` transpilation
12+
[a bit differently](https://github.com/Microsoft/TypeScript/issues/2719) (at the
13+
end: cleaner) than `babel` so `require` syntax of the library slightly changes to:
14+
15+
```javascript
16+
let Blockchain = require('ethereumjs-blockchain').default
17+
```
18+
19+
The library now also comes with a **type declaration file** distributed along
20+
with the package published.
21+
22+
This release drops support for Node versions `4` and `6` due to
23+
internal code updates requiring newer Node.js versions and removes the previously
24+
deprecated DB constructor options `opts.blockDb` and `opts.detailsDb`.
25+
26+
**Change Summary:**
27+
28+
- Migration of code base and internal toolchain to `TypeScript`,
29+
PR [#92](https://github.com/ethereumjs/ethereumjs-blockchain/pull/92)
30+
- Refactoring of `DB` operations introducing a separate `DBManager` class
31+
(comes along with dropped Node `6` support),
32+
PR [#91](https://github.com/ethereumjs/ethereumjs-blockchain/pull/91)
33+
- Auto-generated `TSDoc` documentation,
34+
PR [#98](https://github.com/ethereumjs/ethereumjs-blockchain/pull/98)
35+
- Replaced `safe-buffer` with native Node.js `Buffer` usage (this comes along
36+
with dropped support for Node `4`),
37+
PR [#92](https://github.com/ethereumjs/ethereumjs-blockchain/pull/92)
38+
- Dropped deprecated `DB` options,
39+
PR [#100](https://github.com/ethereumjs/ethereumjs-blockchain/pull/100)
40+
41+
[4.0.0]: https://github.com/ethereumjs/ethereumjs-blockchain/compare/v3.4.0...v4.0.0
42+
943
## [3.4.0] - 2019-02-06
1044

1145
**Petersburg** (aka `constantinopleFix`) as well as **Goerli**

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ A module to store and interact with blocks.
1515

1616
[./docs/](./docs/README.md)
1717

18-
# EXAMPLE USAGE
18+
# EXAMPLE
1919

2020
The following is an example to iterate through an existing Geth DB (needs `level` to be installed separately).
2121

2222
This module performs write operations. Making a backup of your data before trying it is recommended. Otherwise, you can end up with a compromised DB state.
2323

2424
```javascript
2525
const level = require('level')
26-
const Blockchain = require('ethereumjs-blockchain')
26+
const Blockchain = require('ethereumjs-blockchain').default
2727
const utils = require('ethereumjs-util')
2828

2929
const gethDbPath = './chaindata' // Add your own path here. It will get modified, see remarks.
@@ -40,3 +40,7 @@ new Blockchain({ db: db }).iterator(
4040
err => console.log(err || 'Done.'),
4141
)
4242
```
43+
44+
**WARNING**: Since `ethereumjs-blockchain` is also doing write operations
45+
on the DB for safety reasons only run this on a copy of your database, otherwise this might lead
46+
to a compromised DB state.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereumjs-blockchain",
3-
"version": "3.4.0",
3+
"version": "4.0.0",
44
"description": "A module to store and interact with blocks",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)