File tree 6 files changed +7
-266
lines changed
6 files changed +7
-266
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ Classes & Methods
27
27
- [ ` get() ` method] ( refs.md#getref-options )
28
28
- [ ` set() ` method] ( refs.md#setref-value-options )
29
29
30
- #### [ The ` YAML ` object] ( yaml.md )
31
- - [ ` parse() ` method] ( yaml.md#parsetext )
32
- - [ ` stringify() ` method] ( yaml.md#stringifyvalue )
33
-
34
30
#### [ The ` Options ` object] ( options.md )
35
31
36
32
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ const maybe = require("call-me-maybe");
13
13
const { ono } = require ( "@jsdevtools/ono" ) ;
14
14
15
15
module . exports = $RefParser ;
16
- module . exports . YAML = require ( "./util/yaml" ) ;
17
16
module . exports . JSONParserError = JSONParserError ;
18
17
module . exports . InvalidPointerError = InvalidPointerError ;
19
18
module . exports . MissingPointerError = MissingPointerError ;
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
- const YAML = require ( "../util /yaml" ) ;
3
+ const { parseWithPointers } = require ( "@stoplight /yaml" ) ;
4
4
const { StoplightParserError } = require ( "../util/errors" ) ;
5
5
6
6
module . exports = {
@@ -44,7 +44,12 @@ module.exports = {
44
44
}
45
45
46
46
if ( typeof data === "string" ) {
47
- let result = YAML . parse ( data ) ;
47
+ let result = parseWithPointers ( data , {
48
+ json : true ,
49
+ mergeKeys : true ,
50
+ ignoreDuplicateKeys : false ,
51
+ } ) ;
52
+
48
53
if ( StoplightParserError . hasErrors ( result . diagnostics ) ) {
49
54
throw new StoplightParserError ( result . diagnostics , file . url ) ;
50
55
}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments