visual-differ
visual-differ copied to clipboard
Feature: use Path for better cross platform support
This stops errors on Windows like:
PS C:\...\Documents\GitHub\visual-differ> node index.js
Generating images from your URLs...
■■■■■■■■■■■■■■■■■■■■ ■ 50% | ETA: 15s | 1/2
Diffing images and creating report...
■ 0% | ETA: 0s | 0/1node:fs:599
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, open 'screenshots/2022_12_28__11-54-53/1/a.png'
at Object.openSync (node:fs:599:3)
at Object.readFileSync (node:fs:467:35)
at C:\Users\...\Documents\GitHub\visual-differ\index.js:97:10 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'screenshots/2022_12_28__11-54-53/1/a.png'
}
Node.js v18.4.0
I've also tossed in a package.json dependency update. Meant to do that as a separate PR.