From 3540e87c84e861fcd820dc0d55280cbf921aaad7 Mon Sep 17 00:00:00 2001 From: yoshinorin <yoshinorin.net@outlook.com> Date: Thu, 7 Apr 2022 22:10:21 +0900 Subject: [PATCH] fix(#4917): downgrade `js-yaml` from `v4.x` to `v3.14.x` (#4932) --- lib/plugins/renderer/yaml.js | 3 +-- package.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/plugins/renderer/yaml.js b/lib/plugins/renderer/yaml.js index 15d1e59b79..dc3a5296cf 100644 --- a/lib/plugins/renderer/yaml.js +++ b/lib/plugins/renderer/yaml.js @@ -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; diff --git a/package.json b/package.json index 200953a19a..3c9e4032fa 100644 --- a/package.json +++ b/package.json @@ -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",