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

Commit 2bc21b4

Browse files
authored
Update deps to latest, add browser build, fix readme es5 import, prepare release v1.0.2 (#157)
1 parent a04b5ca commit 2bc21b4

20 files changed

+14012
-289
lines changed

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
extends: '@ethereumjs/eslint-config-defaults',
3+
parserOptions: {
4+
project: ['./tsconfig.json'],
5+
},
6+
env: {
7+
mocha: true,
8+
},
9+
rules: {
10+
'no-constant-condition': 'off',
11+
'@typescript-eslint/no-use-before-define': 'off',
12+
'@typescript-eslint/no-unnecessary-condition': 'off',
13+
},
14+
overrides: [
15+
{
16+
files: ['test/index.spec.ts'],
17+
rules: {
18+
'no-invalid-this': 'off',
19+
'no-prototype-builtins': 'off',
20+
'@typescript-eslint/no-floating-promises': 'off',
21+
},
22+
},
23+
],
24+
}

.github/workflows/build.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,22 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [10.x, 12.x, 13.x, 14.x]
15+
node-version: [12.x, 13.x, 14.x, 16.x]
1616
steps:
17+
- uses: actions/checkout@v2
18+
1719
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v2
1921
with:
2022
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
2124

22-
- uses: actions/checkout@v1
23-
2425
- run: npm install
25-
- run: npm run test
26+
- run: npm run coverage
27+
- run: npm run test:browser
2628

2729
- name: Upload coverage to Coveralls
2830
uses: coverallsapp/github-action@master
2931
with:
3032
github-token: ${{ secrets.GITHUB_TOKEN }}
31-
32-
test-browser:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/setup-node@v1
36-
with:
37-
node-version: 12.x
38-
39-
- uses: actions/checkout@v1
40-
41-
- run: npm install
42-
- run: npm run test:browser
43-
33+

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ build/Release
2727
# Dependency directory
2828
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
2929
node_modules
30-
package-lock.json
3130

3231
# Optional npm cache directory
3332
.npm
@@ -42,3 +41,4 @@ package-lock.json
4241

4342
# build output
4443
dist
44+
dist.browser

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.nycrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
.vscode
33
package.json
44
dist
5+
dist.browser
56
.nyc_output

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ 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+
## [1.0.2] - 2021-10-08
10+
11+
- Updated dependencies to latest, added browser build, PR [#157](https://github.com/ethereumjs/ethereumjs-wallet/pull/157)
12+
13+
#### Included Source Files
14+
15+
Source files from the `src` folder are now included in the distribution build. This allows for a better debugging experience in debug tools like Chrome DevTools by having working source map references to the original sources available for inspection.
16+
17+
[1.0.2]: https://github.com/ethereumjs/ethereumjs-wallet/compare/v1.0.1...v1.0.2
18+
919
## [1.0.1] - 2020-09-25
1020

1121
- Fixed a browser issue in `Wallet.fromV3()` and `Wallet.toV3()` triggered when using web bundlers using Buffer v4 shim (Webpack 4),
@@ -46,7 +56,7 @@ This leads to cases where some input - while not having been the intended way to
4656
One example for this is the `Wallet.fromPublicKey()` function, here is the old code of the function:
4757

4858
```js
49-
Wallet.fromPublicKey = function(pub, nonStrict) {
59+
Wallet.fromPublicKey = function (pub, nonStrict) {
5060
if (nonStrict) {
5161
pub = ethUtil.importPublic(pub)
5262
}

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# ethereumjs-wallet
22

3-
[![NPM Package](https://img.shields.io/npm/v/ethereumjs-wallet.svg)](https://www.npmjs.org/package/ethereumjs-wallet)
4-
[![Actions Status](https://github.com/ethereumjs/ethereumjs-wallet/workflows/Build/badge.svg)](https://github.com/ethereumjs/ethereumjs-wallet/actions)
5-
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-wallet.svg)](https://coveralls.io/r/ethereumjs/ethereumjs-wallet)
3+
[![NPM Package][npm-badge]][npm-link]
4+
[![Actions Status][actions-badge]][actions-link]
5+
[![Coverage Status][coverage-badge]][coverage-link]
66
[![Discord][discord-badge]][discord-link]
77

88
A lightweight wallet implementation. At the moment it supports key creation and conversion between various formats.
99

1010
It is complemented by the following packages:
1111

12-
- [ethereumjs-tx](https://github.com/ethereumjs/ethereumjs-tx) to sign transactions
12+
- [@ethereumjs/tx](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx) to sign transactions
1313
- [ethereumjs-icap](https://github.com/ethereumjs/ethereumjs-icap) to manipulate ICAP addresses
1414
- [store.js](https://github.com/marcuswestin/store.js) to use browser storage
1515

1616
Motivations are:
1717

1818
- be lightweight
1919
- work in a browser
20-
- use a single, maintained version of crypto library (and that should be in line with `ethereumjs-util` and `ethereumjs-tx`)
20+
- use a single, maintained version of crypto library (and that should be in line with [`ethereumjs-util`](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) and `@ethereumjs/tx`)
2121
- support import/export between various wallet formats
2222
- support BIP32 HD keys
2323

@@ -35,7 +35,7 @@ You can import the `Wallet` class like this
3535
Node.js / ES5:
3636

3737
```js
38-
const { Wallet } = require('ethereumjs-wallet').default
38+
const Wallet = require('ethereumjs-wallet').default
3939
```
4040

4141
ESM / TypeScript:
@@ -135,5 +135,11 @@ MIT License
135135

136136
Copyright (C) 2016 Alex Beregszaszi
137137

138+
[actions-badge]: https://github.com/ethereumjs/ethereumjs-wallet/workflows/Build/badge.svg
139+
[actions-link]: https://github.com/ethereumjs/ethereumjs-wallet/actions
140+
[coverage-badge]: https://img.shields.io/coveralls/ethereumjs/ethereumjs-wallet.svg
141+
[coverage-link]: https://coveralls.io/r/ethereumjs/ethereumjs-wallet
138142
[discord-badge]: https://img.shields.io/static/v1?logo=discord&label=discord&message=Join&color=blue
139143
[discord-link]: https://discord.gg/TNwARpR
144+
[npm-badge]: https://img.shields.io/npm/v/ethereumjs-wallet.svg
145+
[npm-link]: https://www.npmjs.org/package/ethereumjs-wallet

karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = function(config) {
77
},
88
plugins: ['karma-mocha', 'karma-typescript', 'karma-chrome-launcher', 'karma-firefox-launcher'],
99
karmaTypescriptConfig: {
10+
tsconfig: './tsconfig.json',
1011
bundlerOptions: {
1112
entrypoints: /\.spec\.ts$/,
1213
},
@@ -15,7 +16,7 @@ module.exports = function(config) {
1516
reporters: ['progress', 'karma-typescript'],
1617
browsers: ['FirefoxHeadless', 'ChromeHeadless'],
1718
singleRun: true,
18-
concurrency: Infinity,
19+
concurrency: 1,
1920
// Extend timeouts for long tests
2021
browserDisconnectTimeout: 1000000,
2122
browserNoActivityTimeout: 1000000,

0 commit comments

Comments
 (0)