From bda604b389071ab2dd31a7107841aa7fcafdc04f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Jan 2021 17:44:36 +0200 Subject: [PATCH] fix(deps): update dependency js-yaml to v4 (#4797) --- cypress/utils/config.js | 4 ++-- package.json | 2 +- .../scripts/process-languages.js | 2 +- website/gatsby-config.js | 2 +- website/package.json | 2 +- website/yarn.lock | 7 +++++++ yarn.lock | 12 ++++++++++++ 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/cypress/utils/config.js b/cypress/utils/config.js index 6a178b68..e4c31130 100644 --- a/cypress/utils/config.js +++ b/cypress/utils/config.js @@ -19,9 +19,9 @@ async function copyBackendFiles(backend) { async function updateConfig(configModifier) { const configFile = path.join(devTestDirectory, 'config.yml'); const configContent = await fs.readFile(configFile); - const config = yaml.safeLoad(configContent); + const config = yaml.load(configContent); await configModifier(config); - await fs.writeFileSync(configFile, yaml.safeDump(config)); + await fs.writeFileSync(configFile, yaml.dump(config)); } async function switchVersion(version) { diff --git a/package.json b/package.json index 46cd51b1..fad88384 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "jest": "^26.1.0", "jest-cli": "^26.1.0", "jest-emotion": "^10.0.32", - "js-yaml": "^3.13.1", + "js-yaml": "^4.0.0", "mockserver-client": "^5.8.0", "mockserver-node": "^5.8.0", "ncp": "^2.0.0", diff --git a/packages/netlify-cms-widget-code/scripts/process-languages.js b/packages/netlify-cms-widget-code/scripts/process-languages.js index 6ab396b3..63f78682 100644 --- a/packages/netlify-cms-widget-code/scripts/process-languages.js +++ b/packages/netlify-cms-widget-code/scripts/process-languages.js @@ -9,7 +9,7 @@ const outputPath = '../data/languages.json'; async function fetchData() { const filePath = path.resolve(__dirname, rawDataPath); const fileContent = await fs.readFile(filePath); - return yaml.safeLoad(fileContent); + return yaml.load(fileContent); } function outputData(data) { diff --git a/website/gatsby-config.js b/website/gatsby-config.js index 4d01262a..e362563a 100644 --- a/website/gatsby-config.js +++ b/website/gatsby-config.js @@ -2,7 +2,7 @@ const pkg = require('./package.json'); const fs = require('fs'); const yaml = require('js-yaml'); -const staticConfig = yaml.safeLoad(fs.readFileSync('./site.yml', 'utf8')); +const staticConfig = yaml.load(fs.readFileSync('./site.yml', 'utf8')); module.exports = { siteMetadata: { diff --git a/website/package.json b/website/package.json index cb0cf42b..841c99a8 100644 --- a/website/package.json +++ b/website/package.json @@ -31,7 +31,7 @@ "gatsby-transformer-json": "2.8.0", "gatsby-transformer-remark": "2.13.1", "gatsby-transformer-yaml": "2.8.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.0.0", "lodash": "^4.17.15", "moment": "^2.24.0", "netlify-cms-app": "^2.11.31", diff --git a/website/yarn.lock b/website/yarn.lock index 38b9a3ef..f5797653 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -8190,6 +8190,13 @@ js-yaml@^3.11.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@~3.14.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" diff --git a/yarn.lock b/yarn.lock index 6156560d..f32be0fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4254,6 +4254,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + aria-query@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" @@ -11177,6 +11182,13 @@ js-yaml@^3.11.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"