Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the repositoryRoot from @netlify/config #1579

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/build/tests/core/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down
Binary file modified packages/build/tests/core/snapshots/tests.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/config/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const resolveConfig = async function(opts) {

const { config: configA, buildDir } = await handleFiles({ config, repositoryRoot, baseRelDir: baseRelDirA })

const result = { siteInfo, configPath, buildDir, config: configA, context, branch, api, logs }
const result = { siteInfo, configPath, buildDir, config: configA, repositoryRoot, context, branch, api, logs }
logResult(result, { logs, debug })
return result
}
Expand Down
15 changes: 15 additions & 0 deletions packages/config/tests/api/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -40,6 +41,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -59,6 +61,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -80,6 +83,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -101,6 +105,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -119,6 +124,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -140,6 +146,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"build_settings": {␊
"base": null,␊
Expand Down Expand Up @@ -184,6 +191,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"build_settings": {␊
"base": "base",␊
Expand Down Expand Up @@ -225,6 +233,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -246,6 +255,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -267,6 +277,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -285,6 +296,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -306,6 +318,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"build_settings": {␊
"repo_url": "test"␊
Expand All @@ -331,6 +344,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down Expand Up @@ -364,6 +378,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"build_settings": {␊
"base": "base",␊
Expand Down
Binary file modified packages/config/tests/api/snapshots/tests.js.snap
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/config/tests/base/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -49,6 +50,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -69,6 +71,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -91,5 +94,6 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`
Binary file modified packages/config/tests/base/snapshots/tests.js.snap
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/config/tests/cli/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Generated by [AVA](https://ava.li).
"stderr": [],␊
"stdout": []␊
},␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -82,6 +83,7 @@ Generated by [AVA](https://ava.li).
"environment": {}␊
}␊
},␊
"repositoryRoot": "/file/path",␊
"context": "production",␊
"branch": "branch",␊
"logs": {␊
Expand Down Expand Up @@ -109,6 +111,7 @@ Generated by [AVA](https://ava.li).
"stderr": [],␊
"stdout": []␊
},␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -131,6 +134,7 @@ Generated by [AVA](https://ava.li).
"stderr": [],␊
"stdout": []␊
},␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down
Binary file modified packages/config/tests/cli/snapshots/tests.js.snap
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/config/tests/context/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -44,6 +45,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -63,6 +65,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -82,6 +85,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "testContext",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -101,6 +105,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -120,6 +125,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -139,6 +145,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -158,6 +165,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -177,6 +185,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -196,5 +205,6 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "testContext",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`
Binary file modified packages/config/tests/context/snapshots/tests.js.snap
Binary file not shown.
5 changes: 5 additions & 0 deletions packages/config/tests/cwd/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -49,6 +50,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -67,6 +69,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down Expand Up @@ -97,6 +100,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -116,5 +120,6 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`
Binary file modified packages/config/tests/cwd/snapshots/tests.js.snap
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/config/tests/load/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -39,6 +40,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {␊
"id": "test"␊
}␊
Expand All @@ -61,6 +63,7 @@ Generated by [AVA](https://ava.li).
"configPath": "/file/path",␊
"context": "production",␊
"hasApi": true,␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -86,6 +89,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -104,6 +108,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down Expand Up @@ -131,6 +136,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand Down Expand Up @@ -163,6 +169,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -182,6 +189,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -207,6 +215,7 @@ Generated by [AVA](https://ava.li).
},␊
"configPath": "/file/path",␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`

Expand All @@ -224,5 +233,6 @@ Generated by [AVA](https://ava.li).
"plugins": []␊
},␊
"context": "production",␊
"repositoryRoot": "/file/path",␊
"siteInfo": {}␊
}`
Binary file modified packages/config/tests/load/snapshots/tests.js.snap
Binary file not shown.
Loading