Skip to content

Commit

Permalink
Merge pull request #1 from stoplightio/chore/deps
Browse files Browse the repository at this point in the history
fix(deps): update yaml-ast-parser
  • Loading branch information
XVincentX authored Nov 19, 2018
2 parents b9cea8c + 07b44fa commit 6be6d2d
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 296 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@
"test.watch": "yarn test --watch"
},
"dependencies": {
"@stoplight/types": "1.2.2",
"@stoplight/types": "2.0.0",
"lodash": "4.x.x",
"yaml-ast-parser": "0.0.41"
"yaml-ast-parser": "0.0.43"
},
"devDependencies": {
"@stoplight/scripts": "1.x.x",
"benchmark": "2.1.x",
"@stoplight/scripts": "2.x.x",
"typescript": "3.1.6"
},
"lint-staged": {
Expand Down
9 changes: 3 additions & 6 deletions src/parseWithPointers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { IParserResult, IParserResultPointers } from '@stoplight/types';
import { IParserResult, IParserResultPointers, LogLevel } from '@stoplight/types';
import { load as loadAST, YAMLException } from 'yaml-ast-parser';

// import { IParser, IParserResult, IParserResultPointers, MessageSeverity } from '../../types';

const get = require('lodash/get');
import get = require('lodash/get');

export interface IYamlParserOpts {
// Increase performance by limiting how deep into the object we recurse to generate pointers.
Expand Down Expand Up @@ -164,8 +162,7 @@ const transformErrors = (errors: YAMLException[]): any[] => {
const validation: any = {
ruleId: error.name,
msg: error.reason,
// FIXME when LogLevel enum published in types package: error.isWarning ? LogLevel.Warn : LogLevel.Fatal
level: error.isWarning ? 40 : 60,
level: error.isWarning ? LogLevel.Warn : LogLevel.Fatal,
};

if (error.mark && error.mark.line) {
Expand Down
Loading

0 comments on commit 6be6d2d

Please sign in to comment.