integrate client-nodejs with bazel build system #16
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.
Why is this PR needed?
So we are able to test
client-nodejs
withbazel
What does the PR do?
Migrates
client-nodejs
tobazel
Does it break backwards compatibility?
no
List of future improvements not on this PR
publishing artifacts to
npm
Implementation details: short version
We need to have correct imports in generated
*_pb.js
files and then we need to put generated files to same locations they would have been in if compiled bynpm
Implementation details: extended version
_proto_gen
genrules take proto files and stripprotocol/session
import statements usinggenerate_js.sh
generated_node_lib
is generated from those protos (a set of*_pb.js
and*_grpc_pb.js
files). A modified version ofgrpc/grpc
is used so file is generated even if there are no services in filesgenerated_node_lib_transformed
moves generates js files to appropriate locations sorequire()
statements in client's sources are satisfiedgrakn
combines all js files into one packagegrakn_dummy_binary
is needed to generate atar.gz
bundle with all dependenciesjest_tests
runs tests withjest
. We need to use.tar.gz
bundle because jest cannot handle symlinksbazel
is producing relevant issue and they refuse to merge PR that fixes it. This method resembles what has been done forclient-python
(we generatezip
module there)