momocow / webpack-userscript

A Webpack plugin for userscript projects. 🙈
https://cow.moe/webpack-userscript/
MIT License
200 stars 21 forks source link

FR: set showConstraintMessages to true when stringifing validation errors #92

Closed mjpieters closed 1 year ago

mjpieters commented 1 year ago

Minor nit: Please set the showConstraintMessages parameter to ValidationError.toString() to true when validating headers, here:

https://github.com/momocow/webpack-userscript/blob/5bca4c8fa68cd296d58e0c7ada967882c9641f6e/lib/features/validate-headers/impl.ts#L54-L56

If you use err.toString(undefined, undefined, undefined, true) there then the validator message is shown rather than the name, which is a bit more informative. Compare

- property updateURL has failed the following constraints: isUrl 

with

- property updateURL has failed the following constraints: updateURL must be a URL address
mjpieters commented 1 year ago

I'd have expected the issue to be closed automatically, because my PR referenced it with 'fixes'.

But, given that it was merged into the dev branch, perhaps you wanted to keep this open until it has been released?

momocow commented 1 year ago

Don't worry about closing this issue or not, I'll ensure it closed after it is released.

There will be a few more minor features along with this one in the next minor update.

momocow commented 1 year ago

Released in v3.2.0.