Skip to content

Commit

Permalink
tools: update doc tool dependencies
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
targos committed May 1, 2021
1 parent c22efc5 commit aef7697
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 203 deletions.
7 changes: 3 additions & 4 deletions tools/doc/common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

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

function isYAMLBlock(text) {
return /^<!-- YAML/.test(text);
Expand All @@ -20,8 +19,8 @@ function extractAndParseYAML(text) {
.replace(/^<!-- YAML/, '')
.replace(/-->$/, '');

// js-yaml.safeLoad() throws on error.
const meta = yaml.safeLoad(text);
// js-yaml.load() throws on error.
const meta = yaml.load(text);

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

0 comments on commit aef7697

Please sign in to comment.