-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript files (.ts) are marked as binary files #990
Comments
See 3rd string in this line https://github.com/karma-runner/karma/blob/master/lib/preprocessor.js#L21 I was worried about extension collisions in the back of my mind @vojtajina, and here is one, is it a "Transport Stream" or "TypeScript" file? This is where something like mime-magic can help, but it is quite a large dependency to introduce. There's gotta be a better way to do this :/ |
@dignifiedquire I like it, have you tried it? |
Yes I've been using it in production without problems for over a month now. |
Would like @vojtajina to weigh in before a pull request ;) |
Can somebody do a benchmark of isbinaryfile? Compare to just checking the path as we do now? Because for the purpose of Karma, in 99.9% time it's not a binary file. And if you preprocess thousands of files I dont' wanna slow it down. As a quick fix for now, I would remove the |
I've created simple benchmark https://github.com/ondrejsevcik/isbinaryfile-benchmark It tests a few npm packages, but I'm not 100% sure that this test is adequate so please check it out. |
Fixed by 8269852. |
Hi, I'm using karma with preprocessor for typescript and since this 8a30cf5 commit its not possible to use typescript files with default .ts extension.
The text was updated successfully, but these errors were encountered: