marc136 / node-folder-hash

Create a hash checksum over a folder or a file
MIT License
110 stars 17 forks source link

fix: excludes the passed path for purposes of matching inclusion/exclusion folders #201

Open Aeolun opened 1 year ago

Aeolun commented 1 year ago

The same folder accessed from a different working directory will include/exclude in the same way

Whether I run the script from /src/bla/bla, pointing at ../../ or from /src pointing at ./ should work the same way when I'm writing an exclusion rule called exclude: ['bla/bla'].

Originally running it from /src/bla/bla would prepend ../../ to all the paths.

Aeolun commented 1 year ago

No worries about the delay, you are faster than I often am.

I'd strongly suggest not going the way of defining separate type definitions. The biggest benefit to Typescript is reasoning about what happens within your own code (was certainly helpful for me trying to navigate through the unfamiliar code, even if I had to type things first).

I'm not sure if and when I'll have time to split them up, so if it doesn't happen on any schedule, feel free to lift just the fix from the PR and include it in one of your own commits.