Skip to content

Commit

Permalink
fix(#4917): downgrade js-yaml from v4.x to v3.14.x (#4932)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin authored Apr 7, 2022
1 parent 0b5cc8a commit 3540e87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/plugins/renderer/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

const yaml = require('js-yaml');
const { escape } = require('hexo-front-matter');
const schema = yaml.DEFAULT_SCHEMA.extend(require('js-yaml-js-types').all);

function yamlHelper(data) {
return yaml.load(escape(data.text), { schema });
return yaml.load(escape(data.text));
}

module.exports = yamlHelper;
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"hexo-i18n": "^1.0.0",
"hexo-log": "^2.0.0",
"hexo-util": "^2.4.0",
"js-yaml": "^4.0.0",
"js-yaml-js-types": "^1.0.0",
"js-yaml": "^3.14.1",
"micromatch": "^4.0.2",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
Expand Down

0 comments on commit 3540e87

Please sign in to comment.