Skip to content

Commit c434a5f

Browse files
authored
Merge pull request #50 from ethereum/secp-163
Bump noble-secp to 1.6.3, update all devDependencies
2 parents a34687d + 6275a0b commit c434a5f

File tree

8 files changed

+73
-56
lines changed

8 files changed

+73
-56
lines changed

.eslintrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": [
5+
"@typescript-eslint",
6+
"prettier"
7+
],
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/eslint-recommended",
11+
"plugin:@typescript-eslint/recommended"
12+
],
13+
"rules": {
14+
"prettier/prettier": "error"
15+
}
16+
}

.github/workflows/nodejs.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
name: Node CI
22

3-
on:
4-
push:
5-
branches:
6-
- $default-branch
7-
pull_request:
8-
branches:
9-
- "*"
10-
3+
on: [push]
4+
env:
5+
FORCE_COLOR: 2
116
jobs:
12-
build:
13-
14-
runs-on: ubuntu-latest
15-
7+
test:
8+
name: v${{ matrix.node }} @ ${{ matrix.os }}
9+
runs-on: ${{ matrix.os }}
1610
strategy:
1711
matrix:
18-
node-version: [12.x, 14.x, 16.x]
19-
12+
node: [14, 16, 18]
13+
os: [ubuntu-latest]
2014
steps:
21-
- uses: actions/checkout@v1
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
15+
- uses: actions/checkout@v3
16+
- name: Use Node.js ${{ matrix.node }}
17+
uses: actions/setup-node@v3
2418
with:
25-
node-version: ${{ matrix.node-version }}
26-
- name: npm install, build, and test
19+
node-version: ${{ matrix.node }}
20+
- run: npm install
21+
- name: Build and run tests
22+
run: |
23+
npm run build --if-present
24+
npm test
25+
- name: Run browser tests and lint
2726
run: |
28-
npm install
29-
npm run test
3027
npm run browser-tests
3128
npm run lint
32-
env:
33-
CI: true

.mocharc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"require" : [
3+
"ts-node/register"
4+
],
5+
"spec": "./test/test-vectors/*.ts",
6+
"package": "./package.json",
7+
"ui": "bdd"
8+
}

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"dependencies": {
2727
"@noble/hashes": "1.1.2",
28-
"@noble/secp256k1": "1.6.2",
28+
"@noble/secp256k1": "1.6.3",
2929
"@scure/bip32": "1.1.0",
3030
"@scure/bip39": "1.1.0"
3131
},
@@ -40,8 +40,8 @@
4040
"test": "npm-run-all test:node",
4141
"test:node": "mocha",
4242
"clean": "rimraf test-builds bip39 '*.js' '*.js.map' '*.d.ts' '*.d.ts.map' 'src/**/*.js'",
43-
"lint": "tslint --project tsconfig.json",
44-
"lint:fix": "tslint --fix --project tsconfig.json",
43+
"lint": "eslint",
44+
"lint:fix": "eslint --fix",
4545
"browser-tests": "npm-run-all browser-tests:build browser-tests:test",
4646
"browser-tests:build": "bash -x ./scripts/build-browser-tests.sh",
4747
"browser-tests:test": "npm-run-all browser-tests:test-parcel browser-tests:test-browserify browser-tests:test-webpack browser-tests:test-rollup",
@@ -51,30 +51,30 @@
5151
"browser-tests:test-rollup": "karma start --single-run --browsers ChromeHeadless test/karma.rollup.conf.js"
5252
},
5353
"devDependencies": {
54-
"@rollup/plugin-commonjs": "^20.0.0",
55-
"@rollup/plugin-node-resolve": "^13.0.4",
56-
"@types/mocha": "^5.2.7",
57-
"@types/node": "^16.9.2",
58-
"browserify": "^16.5.0",
59-
"karma": "^4.3.0",
60-
"karma-chrome-launcher": "^3.1.0",
61-
"karma-mocha": "^1.3.0",
62-
"karma-mocha-reporter": "^2.2.5",
63-
"mocha": "^6.2.0",
64-
"npm-run-all": "^4.1.5",
65-
"parcel": "^2.0.0-rc.0",
66-
"prettier": "1.18.2",
67-
"rimraf": "^3.0.0",
68-
"rollup": "^2.53.0",
69-
"rollup-plugin-commonjs": "^10.1.0",
70-
"rollup-plugin-node-resolve": "^5.2.0",
71-
"ts-node": "^8.3.0",
72-
"tslint": "^5.19.0",
73-
"tslint-config-prettier": "^1.18.0",
74-
"tslint-plugin-prettier": "^2.0.1",
75-
"typescript": "4.5.4",
76-
"webpack": "^4.39.3",
77-
"webpack-cli": "^3.3.8"
54+
"@rollup/plugin-commonjs": "22.0.1",
55+
"@rollup/plugin-node-resolve": "13.3.0",
56+
"@types/estree": "0.0.47",
57+
"@types/mocha": "9.1.1",
58+
"@types/node": "18.0.4",
59+
"@typescript-eslint/eslint-plugin": "5.30.6",
60+
"@typescript-eslint/parser": "5.30.6",
61+
"browserify": "17.0.0",
62+
"eslint": "8.19.0",
63+
"eslint-plugin-prettier": "4.2.1",
64+
"karma": "6.4.0",
65+
"karma-chrome-launcher": "3.1.1",
66+
"karma-mocha": "2.0.1",
67+
"karma-mocha-reporter": "2.2.5",
68+
"mocha": "10.0.0",
69+
"npm-run-all": "4.1.5",
70+
"parcel": "2.6.2",
71+
"prettier": "2.7.1",
72+
"rimraf": "~3.0.2",
73+
"rollup": "2.76.0",
74+
"ts-node": "10.9.1",
75+
"typescript": "4.7.3",
76+
"webpack": "5.73.0",
77+
"webpack-cli": "4.10"
7878
},
7979
"keywords": [
8080
"ethereum",

scripts/build-browser-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo "Building tests with Browserify"
1010
npx browserify test-builds/tsc/test/test-vectors/*.js > test-builds/browserify-build.js
1111

1212
echo "Building tests with webpack"
13-
npx webpack --mode development test-builds/tsc/test/test-vectors/*.js --output test-builds/webpack-build.js
13+
npx webpack --mode development ./test-builds/tsc/test/test-vectors/*.js --output-path ./test-builds
1414

1515
echo "Building tests with Rollup"
1616
rollup -c test/rollup.config.js

test/karma.webpack.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function(config) {
22
config.set({
33
frameworks: ["mocha"],
4-
files: ["../test-builds/webpack-build.js"],
4+
files: ["../test-builds/main.js"],
55
colors: true,
66
logLevel: config.LOG_INFO,
77
browsers: ["ChromeHeadless"],

test/mocha.opts

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

test/test-vectors/scrypt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("scrypt", function() {
3939
describe("scrypt sync", function() {
4040
for (let i = 0; i < TEST_VECTORS.length; i++) {
4141
it(`Should process the test ${i} correctly`, function() {
42-
this.enableTimeouts(false);
42+
this.timeout(10000)
4343

4444
const vector = TEST_VECTORS[i];
4545

@@ -60,7 +60,7 @@ describe("scrypt", function() {
6060
describe("scrypt async", function() {
6161
for (let i = 0; i < TEST_VECTORS.length; i++) {
6262
it(`Should process the test ${i} correctly`, async function() {
63-
this.enableTimeouts(false);
63+
this.timeout(10000);
6464

6565
const vector = TEST_VECTORS[i];
6666

0 commit comments

Comments
 (0)