-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
configuration validation : strict "Promise" instanceof validation #258
Comments
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Feb 2, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) depends on (webpack/webpack#6430)
I have a branch ready with this change that I will PR once webpack/webpack#6430 is part of a tagged release. |
Sounds good |
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Feb 17, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) depends on (webpack/webpack#6430)
webpack 4.0.0 is out. 🔥 @jbottigliero Can we make the PR now? |
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Mar 1, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) depends on (webpack/webpack#6430)
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Mar 1, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) depends on (webpack/webpack#6430)
@dhruvdutt – opened #298, cheers! |
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Mar 1, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) - depends on (webpack/webpack#6430)
jbottigliero
pushed a commit
to jbottigliero/webpack-cli
that referenced
this issue
Mar 1, 2018
- updates configuration schema to use `"instanceof": "Promise"` (webpack#258) - depends on (webpack/webpack#6430)
evenstensberg
pushed a commit
that referenced
this issue
Mar 1, 2018
- updates configuration schema to use `"instanceof": "Promise"` (#258) - depends on (webpack/webpack#6430)
#298 was merged to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Feature.
What is the current behavior?
#240 introduces validation which causes
Promise
based configurations to pass due toinstanceof Function
beingtrue
.What is the expected behavior?
At the point the validation runs, the configuration can never be just a
Function
, it's expected to be an object, an array of objects, or aPromise
.If this is a feature request, what is motivation or use case for changing the behavior?
Provide stricter validation schema.
Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.
The main concern with adding the above is that it requires webpack/webpack#6430.
The
ajv-keywords
package does not support"instanceof": "Promise"
in versions<3.1.0
, which has apeerDependency
ofajv@^6.0.0
.An alternative to updating the package versions would be to add
Promise
as a "custom" constructor (outlined here), but this would still have to be implemented inwebpack/webpack
basedajv
being configured in core, and not directly exposed.The text was updated successfully, but these errors were encountered: