@metamask/eth-hd-keyring 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -1,17 +1,36 @@
1
1
  module.exports = {
2
2
  root: true,
3
3
 
4
- extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'],
4
+ extends: ['@metamask/eslint-config'],
5
5
 
6
6
  overrides: [
7
7
  {
8
- files: ['test/**/*.js'],
9
- extends: ['@metamask/eslint-config-jest'],
10
- rules: {
11
- 'node/no-unpublished-require': 0,
8
+ files: ['*.ts'],
9
+ extends: ['@metamask/eslint-config-typescript'],
10
+ },
11
+
12
+ {
13
+ files: ['*.js'],
14
+ parserOptions: {
15
+ sourceType: 'script',
12
16
  },
17
+ extends: ['@metamask/eslint-config-nodejs'],
18
+ },
19
+
20
+ {
21
+ files: ['*.test.ts', '*.test.js'],
22
+ extends: [
23
+ '@metamask/eslint-config-jest',
24
+ '@metamask/eslint-config-nodejs',
25
+ ],
13
26
  },
14
27
  ],
15
28
 
16
- ignorePatterns: ['!.eslintrc.js', '!.prettierrc.js'],
29
+ ignorePatterns: [
30
+ '!.eslintrc.js',
31
+ '!.prettierrc.js',
32
+ 'dist/',
33
+ 'docs/',
34
+ '.yarn/',
35
+ ],
17
36
  };
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v12
1
+ v18
package/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [7.0.0]
10
+ ### Changed
11
+ - **BREAKING:** Update minimum Node.js version from v14 to v16 ([#98](https://github.com/MetaMask/eth-hd-keyring/pull/98))
12
+ - Bump dependencies ([#99](https://github.com/MetaMask/eth-hd-keyring/pull/99))
13
+ * **BREAKING:** `@metamask/eth-sig-util` from `^6.0.0` to `^7.0.0`
14
+ * **BREAKING:** `@metamask/utils` from `^5.0.2` to `^8.1.0`
15
+ * `@ethereumjs/tx` from `^4.1.1` to `^4.2.0`
16
+ * `@ethereumjs/util` from `8.0.5` to `^8.1.0`
17
+ * `ethereum-cryptography` from `^1.2.0` to `^2.1.2`
18
+
19
+ ## [6.0.1]
20
+ ### Added
21
+ - Export Typescript definitions ([#90](https://github.com/MetaMask/eth-hd-keyring/pull/90))
22
+
23
+ ### Fixed
24
+ - Bump dependencies ([#94](https://github.com/MetaMask/eth-hd-keyring/pull/94))
25
+ * `@ethereumjs/util` from `^8.0.2` to `^8.1.0`
26
+ * `@metamask/eth-sig-util` from `^5.0.2` to `^6.0.0`
27
+ * `@metamask/scure-bip39` from `^2.0.3` to `^2.1.0`
28
+ * `@metamask/utils` from `^5.0.0` to `^5.0.2`
29
+ * `ethereum-cryptography` from `^1.1.2` to `^1.2.0`
30
+
9
31
  ## [6.0.0]
10
32
  ### Changed
11
33
  - Revert mnemonic serialization format from `Record<number, number>` (i.e. a stringified `Uint8Array`) which was introduced in v5.0.0 back to an untyped array of utf8 encoded bytes, which was the format prior to v5.0.0 ([#81](https://github.com/MetaMask/eth-hd-keyring/pull/81))
@@ -58,7 +80,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
80
  - Deserialize method (and `HdKeyring` constructor by extension) can no longer be passed an options object containing a value for `numberOfAccounts` if it is not also containing a value for `mnemonic`.
59
81
  - Package name changed from `eth-hd-keyring` to `@metamask/eth-hd-keyring`.
60
82
 
61
- [Unreleased]: https://github.com/MetaMask/eth-hd-keyring/compare/v6.0.0...HEAD
83
+ [Unreleased]: https://github.com/MetaMask/eth-hd-keyring/compare/v7.0.0...HEAD
84
+ [7.0.0]: https://github.com/MetaMask/eth-hd-keyring/compare/v6.0.1...v7.0.0
85
+ [6.0.1]: https://github.com/MetaMask/eth-hd-keyring/compare/v6.0.0...v6.0.1
62
86
  [6.0.0]: https://github.com/MetaMask/eth-hd-keyring/compare/v5.0.1...v6.0.0
63
87
  [5.0.1]: https://github.com/MetaMask/eth-hd-keyring/compare/v5.0.0...v5.0.1
64
88
  [5.0.0]: https://github.com/MetaMask/eth-hd-keyring/compare/v4.0.2...v5.0.0
package/README.md CHANGED
@@ -77,7 +77,7 @@ Exports the specified account as a private key hex string.
77
77
 
78
78
  ### Setup
79
79
 
80
- - Install [Node.js](https://nodejs.org) version 12
80
+ - Install [Node.js](https://nodejs.org) version 18
81
81
  - If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you.
82
82
  - Install [Yarn v3](https://yarnpkg.com/getting-started/install)
83
83
  - Run `yarn install` to install dependencies and run any required post-install scripts
package/jest.config.js CHANGED
@@ -3,10 +3,10 @@ module.exports = {
3
3
  coverageReporters: ['text', 'html'],
4
4
  coverageThreshold: {
5
5
  global: {
6
- branches: 84,
6
+ branches: 73.91,
7
7
  functions: 100,
8
- lines: 95,
9
- statements: 95,
8
+ lines: 91.81,
9
+ statements: 91.95,
10
10
  },
11
11
  },
12
12
  moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
@@ -18,6 +18,9 @@ module.exports = {
18
18
  // modules.
19
19
  restoreMocks: true,
20
20
  testEnvironment: 'node',
21
- testMatch: ['**/test/**/*.js'],
21
+ testMatch: ['./**/*.test.ts'],
22
22
  testTimeout: 2500,
23
+ transform: {
24
+ '^.+\\.tsx?$': 'ts-jest',
25
+ },
23
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/eth-hd-keyring",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "A simple standard interface for a seed phrase generated set of Ethereum accounts.",
5
5
  "keywords": [
6
6
  "ethereum",
@@ -18,6 +18,7 @@
18
18
  "author": "Dan Finlay",
19
19
  "main": "index.js",
20
20
  "scripts": {
21
+ "build": "tsc --project tsconfig.build.json",
21
22
  "lint": "yarn lint:eslint && yarn lint:misc --check",
22
23
  "lint:eslint": "eslint . --cache --ext js,ts",
23
24
  "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
@@ -25,34 +26,45 @@
25
26
  "test": "jest"
26
27
  },
27
28
  "dependencies": {
28
- "@ethereumjs/util": "^8.0.2",
29
- "@metamask/eth-sig-util": "^5.0.2",
30
- "@metamask/scure-bip39": "^2.0.3",
31
- "ethereum-cryptography": "^1.1.2"
29
+ "@ethereumjs/tx": "^4.2.0",
30
+ "@ethereumjs/util": "^8.1.0",
31
+ "@metamask/bip39": "^4.0.0",
32
+ "@metamask/eth-sig-util": "^7.0.0",
33
+ "@metamask/scure-bip39": "^2.1.0",
34
+ "@metamask/utils": "^8.1.0",
35
+ "ethereum-cryptography": "^2.1.2"
32
36
  },
33
37
  "devDependencies": {
34
- "@ethereumjs/tx": "^4.0.1",
35
- "@lavamoat/allow-scripts": "^2.1.0",
38
+ "@lavamoat/allow-scripts": "^2.3.1",
39
+ "@lavamoat/preinstall-always-fail": "^1.0.0",
36
40
  "@metamask/auto-changelog": "^2.5.0",
37
- "@metamask/bip39": "^4.0.0",
38
41
  "@metamask/eslint-config": "^8.0.0",
39
42
  "@metamask/eslint-config-jest": "^9.0.0",
40
43
  "@metamask/eslint-config-nodejs": "^8.0.0",
44
+ "@metamask/eslint-config-typescript": "^11.1.0",
41
45
  "@metamask/eth-hd-keyring": "4.0.1",
42
- "@types/jest": "^27.4.1",
46
+ "@types/jest": "^29.4.0",
47
+ "@types/node": "^18.14.6",
48
+ "@typescript-eslint/eslint-plugin": "latest",
49
+ "@typescript-eslint/parser": "^5.54.1",
43
50
  "eslint": "^7.32.0",
44
51
  "eslint-config-prettier": "^8.3.0",
45
52
  "eslint-plugin-import": "^2.24.2",
46
53
  "eslint-plugin-jest": "^24.3.6",
54
+ "eslint-plugin-jsdoc": "latest",
47
55
  "eslint-plugin-node": "^11.1.0",
48
56
  "eslint-plugin-prettier": "^3.3.1",
49
- "jest": "^27.5.1",
57
+ "jest": "^29.4.3",
50
58
  "prettier": "^2.4.1",
51
- "prettier-plugin-packagejson": "^2.2.12"
59
+ "prettier-plugin-packagejson": "^2.2.12",
60
+ "ts-jest": "^29.0.5",
61
+ "ts-node": "^10.9.1",
62
+ "typedoc": "^0.23.26",
63
+ "typescript": "^4.9.5"
52
64
  },
53
65
  "packageManager": "yarn@3.3.0",
54
66
  "engines": {
55
- "node": ">= 14.0.0"
67
+ "node": "^16.20 || ^18.16 || >=20"
56
68
  },
57
69
  "publishConfig": {
58
70
  "access": "public",