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

fix: destructure of adapter config error #11

Merged
merged 2 commits into from
Feb 9, 2021
Merged
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
9 changes: 8 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run fix
FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx" | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

# Fix all selected files
echo "$FILES" | xargs ./node_modules/.bin/xo --fix

# Add back the modified files to staging
echo "$FILES" | xargs git add
13 changes: 6 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,12 @@ function getFile(filepath) {
}
}

async function adapter(builder, parameters) {
const {
hostingSite = null,
sourceRewriteMatch = '**',
firebaseJson = 'firebase.json',
cloudRunBuildDir = null
} = parameters;
async function adapter(builder, {
hostingSite = null,
sourceRewriteMatch = '**',
firebaseJson = 'firebase.json',
cloudRunBuildDir = null
} = {}) {
// Joi.array.single converts the hosting field to an array if a single item is provided
const firebaseConfig = validateFirebaseConfig(
firebaseJson,
Expand Down