nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 50 forks source link

Create tmp files with `.browserify.js` extension #219

Closed etpinard closed 5 years ago

etpinard commented 5 years ago

... instead of .browserify to avoid "Invalid file type" logs in karma@3.1.1 from a patch added in karma-runner/karma#3165

Before https://github.com/nikku/karma-browserify/commit/4ef50afa4ae4cf7bbf645a1e1d6a651f49d50738

npm test > npm-test.base.txt
grep Invalid npm-test.base.txt

# gives
30 11 2018 15:42:10.544:WARN [middleware:karma]: Invalid file type, defaulting to js. browserify
30 11 2018 15:42:30.195:WARN [middleware:karma]: Invalid file type, defaulting to js. browserify
30 11 2018 15:42:31.145:WARN [middleware:karma]: Invalid file type, defaulting to js. browserify

and after

npm test > npm-test.txt
grep Invalid npm-test.txt
# blank!

npm-test.base.txt npm-test.txt

I could of course add a test for this, if deemed necessary.

etpinard commented 5 years ago

Ah. Looks like karma@3 dropped support for Node@4.

I should probably revert https://github.com/nikku/karma-browserify/pull/219/commits/aff7a533934bdcfb7cc1a606ab45af8804ea6b89, unless karma-browserify is ok with dropping Node@4 support.

Edit: [...] is ok with not being tested on Node@4.

bendrucker commented 5 years ago

I think it would be ok to drop Node 4 support as part of karma@3 compatibility. It's almost certainly more important to test on karma@latest than continue to support karma@2.

bendrucker commented 5 years ago

If anything a "no WARN logs are printed" test could be nice. If that's too tricky no test against this change is ok too.

etpinard commented 5 years ago

@bendrucker thanks for taking a look at my PR!

I should be able to add a test at some point next week.

bendrucker commented 5 years ago

Cool! Test is far from required and could even be submitted separately. I would be ok merging this now with:

bendrucker commented 5 years ago

Thanks! Published as a major (because of the peer + node version changes).