Skip to content

Commit

Permalink
fix(parsers): update @stoplight/yaml from ~4.2.3 to ~4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed Mar 22, 2024
1 parent ffa6ebe commit 91fdded
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/parsers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"dependencies": {
"@stoplight/json": "~3.21.0",
"@stoplight/types": "^13.6.0",
"@stoplight/yaml": "~4.2.3",
"@stoplight/types": "^14.1.1",
"@stoplight/yaml": "~4.3.0",
"tslib": "^2.3.1"
}
}
14 changes: 11 additions & 3 deletions packages/parsers/src/yaml.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { getLocationForJsonPath, parseWithPointers, trapAccess, YamlParserResult } from '@stoplight/yaml';
import { IParser } from './types';
import { getLocationForJsonPath as _getLocationForJsonPath, parseWithPointers, trapAccess } from '@stoplight/yaml';
import type { YamlParserResult as _YamlParserResult } from '@stoplight/yaml';
import type { ILocation, JsonPath } from '@stoplight/types';

export { YamlParserResult };
import type { IParser } from './types';

export type YamlParserResult<T> = Omit<_YamlParserResult<T>, 'comments'>;

function getLocationForJsonPath<T>(result: YamlParserResult<T>, path: JsonPath): ILocation | undefined {
return _getLocationForJsonPath(result as _YamlParserResult<T>, path);
}

export const parseYaml = (input: string): YamlParserResult<unknown> =>
parseWithPointers(input, {
ignoreDuplicateKeys: false,
mergeKeys: true,
preserveKeyOrder: true,
attachComments: false,
});

export const Yaml: IParser<YamlParserResult<unknown>> = {
Expand Down
43 changes: 36 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2615,10 +2615,10 @@ __metadata:
languageName: node
linkType: hard

"@stoplight/ordered-object-literal@npm:^1.0.1, @stoplight/ordered-object-literal@npm:^1.0.3, @stoplight/ordered-object-literal@npm:~1.0.4":
version: 1.0.4
resolution: "@stoplight/ordered-object-literal@npm:1.0.4"
checksum: 81afa24943880b0a213af3728a9fe0a28bd01d4840b9583d448f7823ced5b6e673628698b59d201cef50afebcbd89256e133714a174968d11b624d943e0c2c2f
"@stoplight/ordered-object-literal@npm:^1.0.1, @stoplight/ordered-object-literal@npm:^1.0.3, @stoplight/ordered-object-literal@npm:^1.0.5, @stoplight/ordered-object-literal@npm:~1.0.4":
version: 1.0.5
resolution: "@stoplight/ordered-object-literal@npm:1.0.5"
checksum: 84fe385ed742c5298fd5bee3f95366bfe17a2b99ed52f9b323180756d3495078dfb3bf7e5f49f3c8dee7b79f2e8358b38fe4977b7b6475f0094765160d716bb5
languageName: node
linkType: hard

Expand Down Expand Up @@ -2757,8 +2757,8 @@ __metadata:
resolution: "@stoplight/spectral-parsers@workspace:packages/parsers"
dependencies:
"@stoplight/json": ~3.21.0
"@stoplight/types": ^13.6.0
"@stoplight/yaml": ~4.2.3
"@stoplight/types": ^14.1.1
"@stoplight/yaml": ~4.3.0
tslib: ^2.3.1
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -2878,14 +2878,43 @@ __metadata:
languageName: node
linkType: hard

"@stoplight/types@npm:^14.1.1":
version: 14.1.1
resolution: "@stoplight/types@npm:14.1.1"
dependencies:
"@types/json-schema": ^7.0.4
utility-types: ^3.10.0
checksum: 1da2e683e88afe2f72c3b3af341537bc9bac153d224f65744ca60d44eade93609ce91172064ae27093e1ebfa7bcbf05fb232a1910d83b2aee5b1eed4bb726200
languageName: node
linkType: hard

"@stoplight/yaml-ast-parser@npm:0.0.48":
version: 0.0.48
resolution: "@stoplight/yaml-ast-parser@npm:0.0.48"
checksum: 4e252a874636d4015ff78a638075c438ccf7b8b4b38e3df12f7b8381da2da0411dfff7a6de38354b8093a36a8911a9dd656264fb0d34453cb7bcf78a3627dfa0
languageName: node
linkType: hard

"@stoplight/yaml@npm:^4.2.2, @stoplight/yaml@npm:~4.2.3":
"@stoplight/yaml-ast-parser@npm:0.0.50":
version: 0.0.50
resolution: "@stoplight/yaml-ast-parser@npm:0.0.50"
checksum: dd46f2e39cef4e3a56276202872282bc435c5f92ea7cf344abd6722fbdab62547ec7d2b84983c6c05aaa2776ac29efd53affe6d9753cce10ef37b4e15ce6ccdc
languageName: node
linkType: hard

"@stoplight/yaml@npm:^4.2.2, @stoplight/yaml@npm:~4.3.0":
version: 4.3.0
resolution: "@stoplight/yaml@npm:4.3.0"
dependencies:
"@stoplight/ordered-object-literal": ^1.0.5
"@stoplight/types": ^14.1.1
"@stoplight/yaml-ast-parser": 0.0.50
tslib: ^2.2.0
checksum: f113f600a62b75c76c96c27ce3713ba2c48be205fca73097699b66b6f861411c6917dcc5afa4dd08c17fe63f5181b49fa2be9c6500140ea5d05a107ffcb48a4f
languageName: node
linkType: hard

"@stoplight/yaml@npm:~4.2.3":
version: 4.2.3
resolution: "@stoplight/yaml@npm:4.2.3"
dependencies:
Expand Down

0 comments on commit 91fdded

Please sign in to comment.