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

drafter

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drafter - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0-pre.0

CHANGELOG.md

12

package.json
{
"name": "drafter",
"version": "1.2.0",
"version": "2.0.0-pre.0",
"description": "Node API Blueprint Parser",
"main": "lib/drafter.js",
"engines": {
"node": ">= 0.12"
"node": ">= 4"
},

@@ -23,11 +23,11 @@ "repository": {

"dependencies": {
"drafter.js": "^2.6.0"
"drafter.js": "^3.0.0-pre.1"
},
"optionalDependencies": {
"protagonist": "^1.6.0"
"protagonist": "^2.0.0-pre.1"
},
"devDependencies": {
"mocha": "~1.17.1",
"chai": "~1.9.0"
"mocha": "^3.2.0",
"chai": "^3.5.0"
}
}

@@ -33,3 +33,3 @@ ![logo](https://raw.github.com/apiaryio/api-blueprint/master/assets/logo_apiblueprint.png)

var options = {
generateSourcemap: true,
generateSourceMap: true,
};

@@ -50,3 +50,3 @@

try {
var result = drafter.parse('# API Blueprint...', options);
var result = drafter.parseSync('# API Blueprint...', options);
console.log(result);

@@ -77,8 +77,5 @@ } catch (err) {

`generateSourceMap` | Enable sourcemap generation (default: false)
`type` | Set the output structure type as either `ast` or `refract` (default: `refract`)
**NOTE**: *The `ast` option is deprecated in favour of `refract`.*
## License
MIT License. See the [LICENSE](LICENSE) file.

@@ -12,4 +12,15 @@ var expect = require('chai').expect;

meta: {
classes: ['api'],
title: 'API Blueprint',
classes: {
element: 'array',
content: [
{
element: 'string',
content: 'api'
}
]
},
title: {
element: 'string',
content: 'API Blueprint'
},
},

@@ -16,0 +27,0 @@ content: [],

@@ -30,14 +30,40 @@ var expect = require('chai').expect;

meta: {
classes: ['warning'],
classes: {
element: 'array',
content: [
{
element: 'string',
content: 'warning'
}
]
},
},
attributes: {
code: 6,
sourceMap: [
{
element: 'sourceMap',
content: [
[ 0, 8 ]
]
}
]
code: {
element: 'number',
content: 6
},
sourceMap: {
element: 'array',
content: [
{
element: 'sourceMap',
content: [
{
element: 'array',
content: [
{
element: 'number',
content: 0
},
{
element: 'number',
content: 8
}
]
}
]
}
]
}
},

@@ -71,14 +97,40 @@ content: "action is missing a response",

meta: {
classes: ['error'],
classes: {
element: 'array',
content: [
{
element: 'string',
content: 'error'
}
]
},
},
attributes: {
code: 4,
sourceMap: [
{
element: 'sourceMap',
content: [
[ 18, 9 ]
]
}
]
code: {
element: 'number',
content: 4
},
sourceMap: {
element: 'array',
content: [
{
element: 'sourceMap',
content: [
{
element: 'array',
content: [
{
element: 'number',
content: 18
},
{
element: 'number',
content: 9
}
]
}
]
}
]
}
},

@@ -85,0 +137,0 @@ content: "base type 'A' circularly referencing itself",

Sorry, the diff of this file is not supported yet

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