File tree Expand file tree Collapse file tree 6 files changed +7
-266
lines changed Expand file tree Collapse file tree 6 files changed +7
-266
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ Classes & Methods
2727- [ ` get() ` method] ( refs.md#getref-options )
2828- [ ` set() ` method] ( refs.md#setref-value-options )
2929
30- #### [ The ` YAML ` object] ( yaml.md )
31- - [ ` parse() ` method] ( yaml.md#parsetext )
32- - [ ` stringify() ` method] ( yaml.md#stringifyvalue )
33-
3430#### [ The ` Options ` object] ( options.md )
3531
3632
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");
1313const { ono } = require ( "@jsdevtools/ono" ) ;
1414
1515module . exports = $RefParser ;
16- module . exports . YAML = require ( "./util/yaml" ) ;
1716module . exports . JSONParserError = JSONParserError ;
1817module . exports . InvalidPointerError = InvalidPointerError ;
1918module . exports . MissingPointerError = MissingPointerError ;
Original file line number Diff line number Diff line change 11"use strict" ;
22
3- const YAML = require ( "../util /yaml" ) ;
3+ const { parseWithPointers } = require ( "@stoplight /yaml" ) ;
44const { StoplightParserError } = require ( "../util/errors" ) ;
55
66module . exports = {
@@ -44,7 +44,12 @@ module.exports = {
4444 }
4545
4646 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+
4853 if ( StoplightParserError . hasErrors ( result . diagnostics ) ) {
4954 throw new StoplightParserError ( result . diagnostics , file . url ) ;
5055 }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments