Comparing version 1.2.0 to 2.0.0-pre.0
{ | ||
"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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
11434
202
1
79
+ Addeddrafter.js@3.2.0(transitive)
+ Addedprotagonist@2.3.0(transitive)
- Removeddrafter.js@2.6.7(transitive)
- Removedprotagonist@1.6.8(transitive)
Updateddrafter.js@^3.0.0-pre.1