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 <duhamelantoine1995@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • 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.