From 207e351072712ea808512c6b1fa74779f4264780 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Thu, 9 Apr 2020 15:00:56 +0200 Subject: [PATCH] Upgrade @netlify/config --- netlify-config-parser.js | 10 ++++++---- package.json | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/netlify-config-parser.js b/netlify-config-parser.js index c81ae10..f2a01d3 100644 --- a/netlify-config-parser.js +++ b/netlify-config-parser.js @@ -7,15 +7,17 @@ const { } = require('./common') const resolveConfig = require('@netlify/config') -async function parse(configPath) { +async function parse(config) { const result = new Result() - const { config } = await resolveConfig({ config: configPath }) + const { + config: { redirects }, + } = await resolveConfig({ config }) - if (!Array.isArray(config.redirects)) { + if (!Array.isArray(redirects)) { return result } - config.redirects.forEach((obj, idx) => { + redirects.forEach((obj, idx) => { if (!isPlainObj(obj)) { result.addError(idx, obj) return diff --git a/package.json b/package.json index 44901ff..7d11aad 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "author": "Netlify", "license": "MIT", "dependencies": { - "@netlify/config": "^0.4.1" + "@netlify/config": "^0.9.1" }, "devDependencies": { "husky": "^2.2.0",