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 authored and danielleadams committed Jan 12, 2021
1 parent 3ca7a78 commit cfdbb79
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 cfdbb79

Please sign in to comment.