-
Notifications
You must be signed in to change notification settings - Fork 17
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
Incompatible with webpack #13
Comments
@morgante And what tool might you suggest? As far as I can tell, |
is-my-json-valid seems to be updated quite regularly, so it might be worth trying. You're right that it does seem json-schema is still mostly working, so it might be worth considering a fork if the issue isn't addressed soon. |
Plus 1. Webpack is complaining about json-schema/lib/validate.js, line 16 - specifically how it redeclares define to a new function ; comment that line out and jsprim works fine under webpack. |
|
Because we use this validator in several latency-sensitive, internet-facing services, in order to switch implementations, we'd need to verify that there are no semantic changes (i.e., the new implementation rejects any invalid inputs rejected by the old implementation, and accepts valid inputs accepted by the old implementation) and no significant performance regressions (since existing implementations vary in latency by orders of magnitude). At the very least, any semantic differences would need to be well-understood and documented for a major bump of this module. We'd also need to normalize the reported errors to match the existing ones that this library emits. It's a fair bit of work for someone to find a new implementation, integrate it into this module (translating errors), do the semantic testing, and do the performance testing. If someone steps up to do that, we'd be happy to review the test results and take that PR, as long as it meets the above requirements. I'm sorry that the json-schema dependency is affecting people's ability to use this module with webpack, but I don't believe any of the current maintainers has the interest or time to do that work ourselves, especially to work around what sounds like a deficiency in webpack. |
you just have to bump the json-schema version |
Fixed in version 1.3.1. |
This module is unfortunately currently incompatible with webpack. It produces the following error when built in a webpack environment:
The underlying issue is actually with json-schema, but because that module hasn't been updated since 2012 I might suggest choosing a different tool.
The text was updated successfully, but these errors were encountered: