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

Allow functions config to override the service config #82

Merged
merged 1 commit into from
Dec 8, 2018
Merged

Allow functions config to override the service config #82

merged 1 commit into from
Dec 8, 2018

Conversation

juanjoDiaz
Copy link
Owner

I ended up touching too much code for what I wanted to do but the important bits are:

  • Now the function config can override enabled, source and sourceRaw from the service
  • I've decided to rename default to enabled since it makes much more sense. I've left a little hack to ensure backward compatibility but I'm happy also removing it and bumping the major version.
  • I've improved a bit the readme.

This enables #81 to set the concurrency inside the warmup object.

P.S.: We really should add tests. It's a pain to test everything manually... 🙂

return Object.assign({}, defaultOpts, { enabled: possibleConfig })
}

// Keep backwards compatibility for now
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the backward compatibility little hack 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it helps if we don't want to bump major.

@goncaloneves
Copy link
Contributor

Wow. It's looking a lot better. I like the structuring and using ternary.

Yes we really need to add tests. Should we go about writing tests in this one? Maybe it's the right time.

@juanjoDiaz
Copy link
Owner Author

I'd rather get this merged, do a couple more improvements that I have in mind and then add tests.

No need to release right away until we get this, #81 and the tests done.

@goncaloneves goncaloneves merged commit 2827548 into juanjoDiaz:master Dec 8, 2018
@juanjoDiaz juanjoDiaz deleted the make_service_config_overrideable_at_function branch February 4, 2019 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants