Closed lukaszjenczmyk closed 1 year ago
Hi @lukaszjenczmyk
Thanks for this pull request. I've rewritten the library using Typescript. The new way doesn't do a match against log file, just the extension and that is being escaped to be safe. Link to v1 below. I hope to release it in 7 days or so.
Thanks @rogerc. In that case, I'm closing this pull request.
Hey, I noticed a bug related to handling paths with special characters (for example
special-characters-test-logs))/program.log
):It matters a lot when the code is executed on clients' machines (for example in Electron applications) because the paths can't be trusted and need to be sanitized before creating a regex.
I included a test that shows what used to fail. I don't know why the
testGetStream
function intest.js
starts withreturn
statement (which effectively disables that part of tests), but once you remove the return statement, the tests work fine.