aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2016-11-18 12:32:52 -0800
committerGravatar Adam Cozzette <acozzette@google.com>2016-11-21 09:19:22 -0800
commit40f3586412c2efa7a81ccb685e6f96e817996e36 (patch)
tree002d8061ac8eb7082de2991c5e74bae2de43bfe6 /js
parent315350b2fa37201851ac298627e5547cfca64798 (diff)
Fixed remaining JSPB test failures
Diffstat (limited to 'js')
-rw-r--r--js/binary/proto_test.js2
-rw-r--r--js/commonjs/export.js1
-rw-r--r--js/commonjs/export_testdeps.js1
-rw-r--r--js/gulpfile.js6
-rw-r--r--js/jasmine.json5
5 files changed, 10 insertions, 5 deletions
diff --git a/js/binary/proto_test.js b/js/binary/proto_test.js
index ae50a703..f86dc645 100644
--- a/js/binary/proto_test.js
+++ b/js/binary/proto_test.js
@@ -88,7 +88,7 @@ goog.require('proto.jspb.test.extendRepeatedStringList');
goog.require('proto.jspb.test.extendRepeatedUint32List');
goog.require('proto.jspb.test.extendRepeatedUint64List');
-// CommonJS-LoadFromFile: google/protobuf/any_pb proto.google.protobuf
+// CommonJS-LoadFromFile: ../node_modules/google-protobuf/google/protobuf/any_pb proto.google.protobuf
goog.require('proto.google.protobuf.Any');
diff --git a/js/commonjs/export.js b/js/commonjs/export.js
index 2403b1a4..1eaab5d5 100644
--- a/js/commonjs/export.js
+++ b/js/commonjs/export.js
@@ -24,3 +24,4 @@ exports.ExtensionFieldBinaryInfo = jspb.ExtensionFieldBinaryInfo;
exports.exportSymbol = goog.exportSymbol;
exports.inherits = goog.inherits;
exports.object = {extend: goog.object.extend};
+exports.typeOf = goog.typeOf;
diff --git a/js/commonjs/export_testdeps.js b/js/commonjs/export_testdeps.js
index 59c77ca2..174c61e6 100644
--- a/js/commonjs/export_testdeps.js
+++ b/js/commonjs/export_testdeps.js
@@ -12,6 +12,7 @@ goog.require('jspb.arith.Int64');
goog.require('jspb.arith.UInt64');
goog.require('jspb.BinaryEncoder');
goog.require('jspb.BinaryDecoder');
+goog.require('jspb.BinaryWriter');
goog.require('jspb.utils');
exports.goog = goog;
diff --git a/js/gulpfile.js b/js/gulpfile.js
index cca99131..5f1b1d93 100644
--- a/js/gulpfile.js
+++ b/js/gulpfile.js
@@ -24,7 +24,7 @@ var wellKnownTypes = [
];
gulp.task('genproto_closure', function (cb) {
- exec(protoc + ' --js_out=library=testproto_libs,binary:. -I ../src -I . *.proto ../src/google/protobuf/descriptor.proto',
+ exec(protoc + ' --js_out=library=testproto_libs,binary:. -I ../src -I . *.proto && ' + protoc + ' --js_out=one_output_file_per_input_file,binary:. -I ../src -I . ' + wellKnownTypes.join(' '),
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
@@ -33,7 +33,7 @@ gulp.task('genproto_closure', function (cb) {
});
gulp.task('genproto_commonjs', function (cb) {
- exec('mkdir -p commonjs_out && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out -I ../src -I commonjs -I . *.proto commonjs/test*/*.proto ../src/google/protobuf/descriptor.proto',
+ exec('mkdir -p commonjs_out && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out -I ../src -I commonjs -I . *.proto commonjs/test*/*.proto ' + wellKnownTypes.join(' '),
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
@@ -42,7 +42,7 @@ gulp.task('genproto_commonjs', function (cb) {
});
gulp.task('genproto_commonjs_wellknowntypes', function (cb) {
- exec('mkdir -p commonjs_out/node_modules/google-protobuf && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out/node_modules/google-protobuf -I ../src ../src/google/protobuf/descriptor.proto',
+ exec('mkdir -p commonjs_out/node_modules/google-protobuf && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out/node_modules/google-protobuf -I ../src ' + wellKnownTypes.join(' '),
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
diff --git a/js/jasmine.json b/js/jasmine.json
index f83c54c0..093f1579 100644
--- a/js/jasmine.json
+++ b/js/jasmine.json
@@ -7,6 +7,9 @@
"helpers": [
"node_modules/google-closure-library/closure/goog/bootstrap/nodejs.js",
"node_loader.js",
- "deps.js"
+ "deps.js",
+ "google/protobuf/any.js",
+ "google/protobuf/struct.js",
+ "google/protobuf/timestamp.js"
]
}