Skip to content

Commit

Permalink
fix(typing): update grpc to latest and fix the lastest typing problem (
Browse files Browse the repository at this point in the history
…#20)

* update grpc to latest and fix the lastest typing problem

* travis script

* script update

* try to speed up build
  • Loading branch information
winguse committed May 2, 2018
1 parent 96b9dbc commit 4858fdd
Show file tree
Hide file tree
Showing 15 changed files with 4,987 additions and 2,449 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ notifications:
email: false
node_js:
- node
install:
- npm install
- ./fix-grpc-typing-bug
- npm run download-envoy
script:
- export PATH=./node_modules/.bin/:$PATH
- npm run download-envoy
- npm run fix-grpc-typing-bug
- npm run test:prod && npm run build
after_success:
- npm run report-coverage
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ For developing or running test of this library, you probably need to:
```
2. there is a bug in gRPC's typing, run the following to fix it:
```shell
$ npm run fix-grpc-typing-bug
$ ./fix-grpc-typing-bug
```
3. to commit your code change:
```shell
Expand Down
14 changes: 14 additions & 0 deletions fix-grpc-typing-bug
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

SED_CMD="sed -i"

if [ "$(uname)" == "Darwin" ]; then
SED_CMD="$SED_CMD ''"
fi

# this is to fix the typing errors of the grpc error
$SED_CMD 's/Message<any>/Message/g' node_modules/grpc/index.d.ts


# this should be fixed in the latest lodash, but grpc looks using an old one
$SED_CMD 's/isWeakSet<T>/\/\/isWeakSet<T>/g' node_modules/@types/lodash/index.d.ts
Loading

0 comments on commit 4858fdd

Please sign in to comment.