Skip to content

Commit

Permalink
feat(deps): bump js-yaml from 3.14.1 to 4.1.0
Browse files Browse the repository at this point in the history
Closes #2026 
Refs #1970
  • Loading branch information
char0n authored Aug 9, 2021
1 parent f923632 commit 3937607
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 21 deletions.
218 changes: 205 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"fast-json-patch": "^3.0.0-1",
"form-data-encoder": "^1.0.1",
"formdata-node": "^3.6.2",
"js-yaml": "^3.14.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.19",
"qs": "^6.9.4",
"querystring-browser": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function parseBody(body, contentType) {
) {
return JSON.parse(body);
}
return jsYaml.safeLoad(body);
return jsYaml.load(body);
}

// Serialize the response, returns a promise with headers and the body part of the hash
Expand Down
2 changes: 1 addition & 1 deletion src/specmap/lib/refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function getDoc(docPath) {
function fetchJSON(docPath) {
return fetch(docPath, { headers: { Accept: ACCEPT_HEADER_VALUE_FOR_DOCUMENTS }, loadSpec: true })
.then((res) => res.text())
.then((text) => jsYaml.safeLoad(text));
.then((text) => jsYaml.load(text));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/bugs/1719.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jsYaml from 'js-yaml';

import resolveSubtree from '../../src/subtree-resolver';

const testDoc = jsYaml.safeLoad(
const testDoc = jsYaml.load(
fs.readFileSync(path.join('test', 'data', 'issue-1719-ref-object-reference.yaml'), 'utf8')
);

Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { escape } from 'querystring';

import { buildRequest, baseUrl } from '../../../src/execute';

const petstoreSpec = jsYaml.safeLoad(
const petstoreSpec = jsYaml.load(
fs.readFileSync(path.join('test', 'oas3', 'data', 'petstore-oas3.yaml'), 'utf8')
);

Expand Down
2 changes: 1 addition & 1 deletion test/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ describe('resolver', () => {

test('should not throw errors on resvered-keywords in freely-named-fields', () => {
// Given
const ReservedKeywordSpec = jsYaml.safeLoad(
const ReservedKeywordSpec = jsYaml.load(
fs.readFileSync(path.resolve(__dirname, './data/reserved-keywords.yaml'), 'utf8')
);

Expand Down
Loading

0 comments on commit 3937607

Please sign in to comment.