Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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