Skip to content

Commit cfdbb79

Browse files
targosdanielleadams
authored andcommitted
tools: update doc tool dependencies
PR-URL: #36844 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3ca7a78 commit cfdbb79

File tree

3 files changed

+149
-203
lines changed

3 files changed

+149
-203
lines changed

tools/doc/common.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
const yaml =
4-
require(`${__dirname}/../node_modules/eslint/node_modules/js-yaml`);
3+
const yaml = require('js-yaml');
54

65
function isYAMLBlock(text) {
76
return /^<!-- YAML/.test(text);
@@ -20,8 +19,8 @@ function extractAndParseYAML(text) {
2019
.replace(/^<!-- YAML/, '')
2120
.replace(/-->$/, '');
2221

23-
// js-yaml.safeLoad() throws on error.
24-
const meta = yaml.safeLoad(text);
22+
// js-yaml.load() throws on error.
23+
const meta = yaml.load(text);
2524

2625
if (meta.added) {
2726
// Since semver-minors can trickle down to previous major versions,

0 commit comments

Comments
 (0)