Permalink
Browse files

CLI: pbjs/pbts no longer generate any volatile headers, see #614

  • Loading branch information...
dcodeIO committed Jan 3, 2017
1 parent b52089e commit ee20b81f9451c56dc106177bbf9758840b99d0f8
Showing with 52 additions and 79 deletions.
  1. +0 −5 cli/pbjs.js
  2. +1 −5 cli/pbts.js
  3. +0 −3 tests/data/ambiguous-names.js
  4. +7 −10 tests/data/mapbox/vector_tile.js
  5. +5 −8 tests/data/package.js
  6. +0 −3 tests/data/rpc.js
  7. +4 −7 tests/data/test.d.ts
  8. +35 −38 tests/data/test.js
@@ -174,11 +174,6 @@ exports.main = function(args, callback) {
throw err;
}
if (output !== "") {
output = [
"// $> pbjs " + args.join(" "),
"// Generated " + (new Date()).toUTCString().replace(/GMT/, "UTC"),
""
].join("\n") + "\n" + output;
if (argv.out)
fs.writeFileSync(argv.out, output, { encoding: "utf8" });
else
@@ -125,11 +125,7 @@ exports.main = function(args, callback) {
return;
}
var output = [
"// $> pbts " + args.join(" "),
"// Generated " + (new Date()).toUTCString().replace(/GMT/, "UTC"),
""
];
var output = [];
if (argv.global)
output.push(
"export as namespace " + argv.global + ";",
@@ -1,6 +1,3 @@
// $> pbjs --target static-module --wrap commonjs --root test_ambiguous-names --out tests/data/ambiguous-names.js tests/data/ambiguous-names.proto
// Generated Mon, 02 Jan 2017 21:00:30 UTC
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex*/
"use strict";
@@ -1,6 +1,3 @@
// $> pbjs --target static-module --wrap commonjs --root test_vector_tile --out tests/data/mapbox/vector_tile.js tests/data/mapbox/vector_tile.proto
// Generated Mon, 02 Jan 2017 21:00:30 UTC
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex*/
"use strict";
@@ -254,19 +251,19 @@ $root.vector_tile = (function() {
/**
* Value intValue.
* @type {number|Long}
* @type {number|$protobuf.Long}
*/
$prototype.intValue = $protobuf.util.emptyObject;
/**
* Value uintValue.
* @type {number|Long}
* @type {number|$protobuf.Long}
*/
$prototype.uintValue = $protobuf.util.emptyObject;
/**
* Value sintValue.
* @type {number|Long}
* @type {number|$protobuf.Long}
*/
$prototype.sintValue = $protobuf.util.emptyObject;
@@ -512,7 +509,7 @@ $root.vector_tile = (function() {
/**
* Feature id.
* @type {number|Long}
* @type {number|$protobuf.Long}
*/
$prototype.id = $protobuf.util.emptyObject;
@@ -526,7 +523,7 @@ $root.vector_tile = (function() {
* Feature type.
* @type {number}
*/
$prototype.type = 0;
$prototype.type = undefined;
/**
* Feature geometry.
@@ -567,7 +564,7 @@ $root.vector_tile = (function() {
}
writer.ldelim();
}
if (message.type !== undefined && message.type !== 0) {
if (message.type !== undefined && message.type !== undefined) {
writer.uint32(24).uint32(message.type);
}
if (message.geometry && message.geometry.length) {
@@ -731,7 +728,7 @@ $root.vector_tile = (function() {
dst.tags = [];
}
}
dst.type = impl.enums(src.type, 0, types[2], options);
dst.type = impl.enums(src.type, undefined, types[2], options);
if (src.geometry && src.geometry.length) {
dst.geometry = [];
for (var i = 0; i < src.geometry.length; ++i) {
@@ -1,6 +1,3 @@
// $> pbjs --target static-module --wrap commonjs --root test_package --out tests/data/package.js tests/data/package.proto
// Generated Mon, 02 Jan 2017 21:00:30 UTC
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex*/
"use strict";
@@ -544,19 +541,19 @@ $root.Package = (function() {
dst.main = "";
}
if (dst.bin === undefined && options.defaults) {
dst.bin = {};
dst.bin = "";
}
if (dst.scripts === undefined && options.defaults) {
dst.scripts = {};
dst.scripts = "";
}
if (dst.dependencies === undefined && options.defaults) {
dst.dependencies = {};
dst.dependencies = "";
}
if (dst.optionalDependencies === undefined && options.defaults) {
dst.optionalDependencies = {};
dst.optionalDependencies = "";
}
if (dst.devDependencies === undefined && options.defaults) {
dst.devDependencies = {};
dst.devDependencies = "";
}
if (dst.types === undefined && options.defaults) {
dst.types = "";
@@ -1,6 +1,3 @@
// $> pbjs --target static-module --wrap commonjs --root test_rpc --out tests/data/rpc.js tests/data/rpc.proto
// Generated Mon, 02 Jan 2017 21:00:30 UTC
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex*/
"use strict";
@@ -1,6 +1,3 @@
// $> pbts --out tests/data/test.d.ts --no-comments tests/data/test.js
// Generated Mon, 02 Jan 2017 21:00:32 UTC
import * as $protobuf from "../..";
export namespace jspb {
@@ -234,7 +231,7 @@ export namespace jspb {
constructor(properties?: Object);
stringField: string;
boolField: boolean;
intField: (number|Long);
intField: (number|$protobuf.Long);
enumField: number;
emptyField: string;
bytesField: Uint8Array;
@@ -399,7 +396,7 @@ export namespace jspb {
constructor(properties?: Object);
mapStringString: string;
mapStringInt32: number;
mapStringInt64: (number|Long);
mapStringInt64: (number|$protobuf.Long);
mapStringBool: boolean;
mapStringDouble: number;
mapStringEnum: number;
@@ -901,8 +898,8 @@ export namespace google {
constructor(properties?: Object);
name: google.protobuf.UninterpretedOption.NamePart[];
identifierValue: string;
positiveIntValue: (number|Long);
negativeIntValue: (number|Long);
positiveIntValue: (number|$protobuf.Long);
negativeIntValue: (number|$protobuf.Long);
doubleValue: number;
stringValue: Uint8Array;
aggregateValue: string;
Oops, something went wrong.

0 comments on commit ee20b81

Please sign in to comment.