Uh oh!
There was an error while loading. Please reload this page.
feat(har-validator): Use compiled HAR validator and move test suite to vite - #297
feat(har-validator): Use compiled HAR validator and move test suite to vite#297jonluca wants to merge 1 commit into
Conversation
… ajv, use vitest for tests
| @@ -1,14 +0,0 @@ | |||
| import { request } from '../targets/node/request/client'; | |||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
| // Vitest Snapshot v1 | ||
| exports[`availableTargets > returns all available targets 1`] = ` |
dimitropoulos
commented
Aug 30, 2022
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? |
dimitropoulos
commented
Aug 30, 2022
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? |
jonluca
commented
Aug 30, 2022
So This is exactly the same logic that |
jonluca
commented
Aug 30, 2022
Sure, here's a screenshot The nice part is that 1) it has an enormous emphasis on speed (as the entire |
jonluca
commented
Aug 30, 2022
And |
filfreire
commented
Jul 12, 2024
Closing as stale |
jonluca
commented
Jul 12, 2024
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.