I can confirm for me the fix suggested by @Priyanshu_Singh worked.
I changed to:
const parts = path_1.default.relative('.', filePath).split(path_1.default.sep);
and just to be sure, at another part in the same file, line 99:
const parts = filePath.split(path_1.default.sep);
@Priyanshu_Singh, you might want to add the TS equivalent of this too in your pull request.
In general, whenever path operations are made path.sep should be used. A quick code search suggests there might be other places in the code where the same should be fixed.