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: pass environment into readConfig #274

Merged
merged 3 commits into from
Dec 11, 2021
Merged

Conversation

guidojw
Copy link
Contributor

@guidojw guidojw commented Dec 9, 2021

Noticed a small bug while using the csp-headers command: environment was not being passed into the config function.

This PR fixes that!

Copy link
Collaborator

@jelhan jelhan left a comment

Choose a reason for hiding this comment

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

Thanks a lot. Looks good to me.

I noticed that API docs for readConfig is also missing that argument. May be the reason for which we haven't noticed earlier. If you have time, fixing that one

If you have time to extend existing test to cover this case, that would be awesome.

If you don't have time for either, that's fine as well.

@guidojw guidojw mentioned this pull request Dec 11, 2021
@guidojw
Copy link
Contributor Author

guidojw commented Dec 11, 2021

Added the missing doc and tests! Hope you like what I did in node-tests/utils, suggestions are welcome :)

Copy link
Collaborator

@jelhan jelhan left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding a test and fixing docs.

Hope you like what I did in node-tests/utils, suggestions are welcome :)

To be honest I'm a little bit afraid by the added complexity of that special syntax. But I also don't see a better solution. Maybe passing the function as a string. But that also does not help much with readability. Doesn't seem to be an easy one. And your solution good enough for sure. 👍

Not at my computer currently. Will try to release on Monday. If I forget, please ping me.

@jelhan
Copy link
Collaborator

jelhan commented Dec 13, 2021

Released as v2.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants