Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

protodef-yaml

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protodef-yaml - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

test/_t.txt

9

compiler.js
const fs = require('fs')
const yaml = require('js-yaml')
const getJSON = (file) => JSON.parse(fs.readFileSync(file, 'utf8'))
const log = () => {}
function detectIndentation(lines) {

@@ -387,3 +390,3 @@ const indentationLevel = 0

function formFinal(inp, out) {
var j = require(inp || './compiled_proto.json')
var j = getJSON(inp || './compiled_proto.json')
let ret = {}

@@ -399,3 +402,3 @@ for (var entry of j) {

parseYAML(toYAML(inputFile, false), temp)
return require(temp)
return getJSON(temp)
}

@@ -407,3 +410,3 @@

parseYAML(toYAML(inputFile), temp)
transform(require(temp), out)
transform(getJSON(temp), out)
formFinal(out, outputFile)

@@ -410,0 +413,0 @@ }

{
"name": "protodef-yaml",
"version": "1.0.0",
"version": "1.0.1",
"description": "Transforms YAML-like syntax to ProtoDef JSON schema",

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

@@ -8,3 +8,3 @@ # protodef-yaml

```sh
npm install -g extremeheat/protodef-yaml
npm install -g protodef-yaml
protodef-yaml <input yaml file> <output json file>

@@ -15,3 +15,3 @@ ```

```
npx extremeheat/protodef-yaml input.yml
npx protodef-yaml input.yml
```

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

@@ -22,3 +22,3 @@ const { compile } = require('../compiler')

console.info('sha1', hash)
const expected = 'dc910b6e000fbd9a318110f3cc303c16e2d1aaea'
const expected = 'da1054296f6298df78854c044dd9cef881e608b8'
if (hash !== expected) {

@@ -25,0 +25,0 @@ console.error('Unexpected hash: ', hash, '!=', expected)

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