mirror of https://github.com/grpc/grpc-node.git
Merge pull request #615 from JustinBeckwith/ld1
refactor: use individual lodash package for proto loader
This commit is contained in:
commit
06b74bf036
|
|
@ -38,12 +38,12 @@
|
||||||
"build/src/*.js"
|
"build/src/*.js"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.14.104",
|
"lodash.camelcase": "^4.3.0",
|
||||||
"@types/node": "^9.4.6",
|
|
||||||
"lodash": "^4.17.5",
|
|
||||||
"protobufjs": "^6.8.6"
|
"protobufjs": "^6.8.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/lodash.camelcase": "^4.3.4",
|
||||||
|
"@types/node": "^10.12.5",
|
||||||
"clang-format": "^1.2.2",
|
"clang-format": "^1.2.2",
|
||||||
"gts": "^0.5.3",
|
"gts": "^0.5.3",
|
||||||
"typescript": "~2.7.2"
|
"typescript": "~2.7.2"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
import * as Protobuf from 'protobufjs';
|
import * as Protobuf from 'protobufjs';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as _ from 'lodash';
|
import camelCase = require('lodash.camelcase');
|
||||||
|
|
||||||
export interface Serialize<T> {
|
export interface Serialize<T> {
|
||||||
(value: T): Buffer;
|
(value: T): Buffer;
|
||||||
|
|
@ -97,7 +97,7 @@ function createMethodDefinition(method: Protobuf.Method, serviceName: string, op
|
||||||
responseSerialize: createSerializer(method.resolvedResponseType as Protobuf.Type),
|
responseSerialize: createSerializer(method.resolvedResponseType as Protobuf.Type),
|
||||||
responseDeserialize: createDeserializer(method.resolvedResponseType as Protobuf.Type, options),
|
responseDeserialize: createDeserializer(method.resolvedResponseType as Protobuf.Type, options),
|
||||||
// TODO(murgatroid99): Find a better way to handle this
|
// TODO(murgatroid99): Find a better way to handle this
|
||||||
originalName: _.camelCase(method.name)
|
originalName: camelCase(method.name)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,6 @@
|
||||||
"outDir": "build"
|
"outDir": "build"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/*.ts",
|
"src/*.ts"
|
||||||
"src/**/*.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue