Socket
Socket
Sign inDemoInstall

resolve-protobuf-schema

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-protobuf-schema - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.travis.yml

3

index.js

@@ -14,4 +14,3 @@ var schema = require('protobuf-schema')

var proto = fs.readFileSync(filename, 'utf-8')
var sch = schema(sch)
var sch = schema(fs.readFileSync(filename, 'utf-8'))
var imports = [].concat(sch.imports || [])

@@ -18,0 +17,0 @@

{
"name": "resolve-protobuf-schema",
"version": "1.0.1",
"version": "1.0.2",
"description": "Read a protobuf schema from the disk, parse it and resolve all imports",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,2 +9,4 @@ # resolve-protobuf-schema

[![build status](http://img.shields.io/travis/mafintosh/resolve-protobuf-schema.svg?style=flat)](http://travis-ci.org/mafintosh/resolve-protobuf-schema)
## Usage

@@ -44,3 +46,3 @@

* `resolve(path, cb)` read and resolve a schema
* `resolve.sync()` sync version of `resolve`
* `resolve.sync(path)` sync version of `resolve`

@@ -47,0 +49,0 @@ ## License

var tape = require('tape')
var schema = require('../')
tape('c', function(t) {
var test = function(name, fn) {
tape(name, function(t) {
fn(t, schema)
})
tape(name+' sync', function(t) {
fn(t, function(name, cb) {
cb(null, schema.sync(name))
})
})
}
test('c', function(t, schema) {
schema(__dirname+'/c.proto', function(err, sch) {

@@ -16,3 +27,3 @@ t.notOk(err, 'no err')

tape('b imports c', function(t) {
test('b imports c', function(t, schema) {
schema(__dirname+'/b.proto', function(err, sch) {

@@ -29,3 +40,3 @@ t.notOk(err, 'no err')

tape('a imports b imports c', function(t) {
test('a imports b imports c', function(t, schema) {
schema(__dirname+'/a.proto', function(err, sch) {

@@ -32,0 +43,0 @@ t.notOk(err, 'no err')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc