protocol-buffers-schema
Advanced tools
Comparing version 3.5.2 to 3.6.0
{ | ||
"name": "protocol-buffers-schema", | ||
"version": "3.5.2", | ||
"version": "3.6.0", | ||
"description": "No nonsense protocol buffers schema parser written in Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,6 @@ | ||
var onimport = function (i, result) { | ||
result.push('import "' + i + '";', '') | ||
return result | ||
} | ||
var onfield = function (f, result) { | ||
@@ -175,2 +180,8 @@ var prefix = f.repeated ? 'repeated' : f.required ? 'required' : 'optional' | ||
if (schema.imports) { | ||
schema.imports.forEach(function (i) { | ||
onimport(i, result) | ||
}) | ||
} | ||
if (!schema.options) schema.options = {} | ||
@@ -177,0 +188,0 @@ |
@@ -112,2 +112,8 @@ var tape = require('tape') | ||
tape('import parse + stringify', function (t) { | ||
var syntax = 'syntax = "proto3";\n\n' | ||
t.same(schema.stringify(schema.parse(fixture('search.proto'))), syntax + fixture('search.proto')) | ||
t.end() | ||
}) | ||
tape('enums with options', function (t) { | ||
@@ -114,0 +120,0 @@ t.same(schema.parse(fixture('enum.proto')), require('./fixtures/enum.json')) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68684
44
2354