Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Validate that Plugin 'args' is an array #229

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jan 8, 2020

Previously if args was set to something other than an array via any of .use(), .tap(), .merge() or .set(), that call would succeed but the later .toConfig() would fail with an unhelpful error message (when the init function tried to spread args).

Now validation is performed at the time args is set, with a more helpful error message and stack trace.

Fixes #121.

Previously if `args` was set to something other than an array via any
of `.use()`, `.tap()`, `.merge()` or `.set()`, that call would succeed
but the later `.toConfig()` would fail with an unhelpful error message
(when the `init` function tried to spread `args`).

Now validation is performed at the time `args` is set, with a more
helpful error message and stack trace.

Fixes #121.
@edmorley edmorley self-assigned this Jan 8, 2020
@edmorley edmorley requested a review from a team January 8, 2020 11:58
@edmorley
Copy link
Member Author

@neutrinojs/core-contributors (or anyone else), could I get a review? :-)

Copy link

@timkelty timkelty left a comment

Choose a reason for hiding this comment

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

:chefkiss:

@edmorley
Copy link
Member Author

Thank you :-)

@edmorley edmorley merged commit a991eb6 into master Jan 27, 2020
@edmorley edmorley deleted the edmorley-validate-plugin-args branch January 27, 2020 21:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Better error message for passing object as plugin arguments
2 participants