Skip to content

Commit 3937607

Browse files
authored
feat(deps): bump js-yaml from 3.14.1 to 4.1.0
Closes #2026 Refs #1970
1 parent f923632 commit 3937607

File tree

9 files changed

+213
-21
lines changed

9 files changed

+213
-21
lines changed

package-lock.json

Lines changed: 205 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"fast-json-patch": "^3.0.0-1",
117117
"form-data-encoder": "^1.0.1",
118118
"formdata-node": "^3.6.2",
119-
"js-yaml": "^3.14.0",
119+
"js-yaml": "^4.1.0",
120120
"lodash": "^4.17.19",
121121
"qs": "^6.9.4",
122122
"querystring-browser": "^1.0.4",

src/http/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function parseBody(body, contentType) {
100100
) {
101101
return JSON.parse(body);
102102
}
103-
return jsYaml.safeLoad(body);
103+
return jsYaml.load(body);
104104
}
105105

106106
// Serialize the response, returns a promise with headers and the body part of the hash

src/specmap/lib/refs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ function getDoc(docPath) {
379379
function fetchJSON(docPath) {
380380
return fetch(docPath, { headers: { Accept: ACCEPT_HEADER_VALUE_FOR_DOCUMENTS }, loadSpec: true })
381381
.then((res) => res.text())
382-
.then((text) => jsYaml.safeLoad(text));
382+
.then((text) => jsYaml.load(text));
383383
}
384384

385385
/**

test/bugs/1719.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import jsYaml from 'js-yaml';
66

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

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

test/oas3/execute/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { escape } from 'querystring';
55

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

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

test/resolver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ describe('resolver', () => {
720720

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

0 commit comments

Comments
 (0)