-
Notifications
You must be signed in to change notification settings - Fork 241
feat(har-validator): Use compiled HAR validator and move test suite to vite #297
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
Conversation
… ajv, use vitest for tests
| @@ -1,14 +0,0 @@ | |||
| import { request } from '../targets/node/request/client'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was unused
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
| // Vitest Snapshot v1 | ||
|
|
||
| exports[`availableTargets > returns all available targets 1`] = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is vitests snapshot
|
thanks! this is certainly interesting! The thing that worries me about removing the ajv validation is that it's extremely critical to all subsequent codepaths that the input is a valid HAR. If you replaced it with hand-rolled code that did the same checks as AJV I'd be totally cool with that, but it looks like it was just outright removed. Did I read that correctly in the diff? |
|
Also, could you please say more about the advantages you see with switching to vitest? I'm certainly open-minded on the topic, but I don't know what we substantively gain by making the switch. For example, can you please post some before-and-after runs for any performance differences so I can compare to my own runs? |
|
So This is exactly the same logic that |
Sure, here's a screenshot The nice part is that 1) it has an enormous emphasis on speed (as the entire |
|
And |
|
Closing as stale |
|
Are you not interested in using the compiled one? It would improve the install size significantly, and speed it up as well |

I removed the dependency on
ajvfor har validation, which should make this library more usable on the web, as well as improve bundle size.I also migrated the test suite to vitest.