Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 207e351

Browse files
committed
Upgrade @netlify/config
1 parent 428ac78 commit 207e351

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

netlify-config-parser.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ const {
77
} = require('./common')
88
const resolveConfig = require('@netlify/config')
99

10-
async function parse(configPath) {
10+
async function parse(config) {
1111
const result = new Result()
12-
const { config } = await resolveConfig({ config: configPath })
12+
const {
13+
config: { redirects },
14+
} = await resolveConfig({ config })
1315

14-
if (!Array.isArray(config.redirects)) {
16+
if (!Array.isArray(redirects)) {
1517
return result
1618
}
1719

18-
config.redirects.forEach((obj, idx) => {
20+
redirects.forEach((obj, idx) => {
1921
if (!isPlainObj(obj)) {
2022
result.addError(idx, obj)
2123
return

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"author": "Netlify",
1515
"license": "MIT",
1616
"dependencies": {
17-
"@netlify/config": "^0.4.1"
17+
"@netlify/config": "^0.9.1"
1818
},
1919
"devDependencies": {
2020
"husky": "^2.2.0",

0 commit comments

Comments
 (0)