This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 62
Migrate to TypeScript #69
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
22ef32e
Migrate to TypeScript
rekmarks c16fec8
Update CI config
rekmarks 04d8d21
Fix test coverage; cleanup
rekmarks 548c8b7
Update eth-rpc-errors, fix JsonRpcError stack type
rekmarks 00fae51
Fix serializable type
rekmarks 779972d
Add runtime typecheck for handle callback
rekmarks ede7181
Change callback error type to unknown
rekmarks e5e294f
Genericize handle
rekmarks 7c329f0
Use Maybe utility type for response.result
rekmarks c38ed87
fixup! Use Maybe utility type for response.result
rekmarks 9bbb4ae
Genericize middleware
rekmarks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ dist | |
|
||
### misc ### | ||
.nyc* | ||
coverage | ||
|
||
# Created by https://www.gitignore.io/api/osx,node | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ module.exports = { | |
lines: 100, | ||
functions: 100, | ||
statements: 100, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
{ | ||
"name": "json-rpc-engine", | ||
"version": "5.4.0", | ||
"description": "a tool for processing JSON RPC", | ||
"description": "A tool for processing JSON-RPC messages.", | ||
"license": "ISC", | ||
"author": "kumavis", | ||
"main": "src/index.js", | ||
"types": "src/index.d.ts", | ||
"main": "dist/index.js", | ||
"engines": { | ||
"node": ">=10.0.0" | ||
}, | ||
"files": [ | ||
"src" | ||
"dist" | ||
], | ||
"scripts": { | ||
"lint": "eslint . --ext js,json", | ||
"lint:fix": "eslint . --ext js,json --fix", | ||
"build": "tsc --project .", | ||
"lint": "eslint . --ext ts,js,json", | ||
"lint:fix": "eslint . --ext ts,js,json --fix", | ||
"test": "mocha ./test", | ||
"coverage": "nyc --check-coverage yarn test" | ||
}, | ||
"dependencies": { | ||
"eth-rpc-errors": "^3.0.0", | ||
"safe-event-emitter": "^1.0.1" | ||
"@metamask/safe-event-emitter": "^2.0.0", | ||
"eth-rpc-errors": "^4.0.2" | ||
}, | ||
"devDependencies": { | ||
"@metamask/eslint-config": "^2.1.0", | ||
"eslint": "^6.8.0", | ||
"@metamask/eslint-config": "^4.1.0", | ||
"@types/node": "^14.14.7", | ||
"@typescript-eslint/eslint-plugin": "^4.8.0", | ||
"@typescript-eslint/parser": "^4.8.0", | ||
"eslint": "^7.13.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-json": "^2.1.0", | ||
"eslint-plugin-mocha": "^6.3.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"mocha": "^7.1.1", | ||
"nyc": "^15.0.0", | ||
"sinon": "^9.0.2" | ||
"nyc": "^15.1.0", | ||
"sinon": "^9.0.2", | ||
"typescript": "^4.0.5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -41,6 +49,7 @@ | |
"test": "test" | ||
}, | ||
"contributors": [ | ||
"kumavis <[email protected]>" | ||
"kumavis <[email protected]>", | ||
"Erik Marks <[email protected]>" | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript complains without it.