| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c22efc5 commit aef7697
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - const yaml = | ||
| 4 | - require(`${__dirname}/../node_modules/eslint/node_modules/js-yaml`); | ||
| 3 | + const yaml = require('js-yaml'); | ||
| 5 | 4 | ||
| 6 | 5 | function isYAMLBlock(text) { | |
| 7 | 6 | return /^<!-- YAML/.test(text); | |
@@ -20,8 +19,8 @@ function extractAndParseYAML(text) { | |||
| 20 | 19 | .replace(/^<!-- YAML/, '') | |
| 21 | 20 | .replace(/-->$/, ''); | |
| 22 | 21 | ||
| 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); | ||
| 25 | 24 | ||
| 26 | 25 | if (meta.added) { | |
| 27 | 26 | // Since semver-minors can trickle down to previous major versions, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments