citgm icon indicating copy to clipboard operation
citgm copied to clipboard

Add webpack to modules list?

Open TheLarkInn opened this issue 9 years ago • 14 comments

After a brief discussion via twitter with @MylesBorins, he offered we could work together on getting webpack added to the module lists.

We also have some important supporting packages but ill list all and their testing commands and we can work from there:

repo command to run tests recommended test machine (if relevant)
webpack/webpack npm link && npm link webpack && npm t any
webpack/enhanced-resolve npm test any
webpack/watchpack npm test non-mac (very flaky tests on mac)
webpack/loader-runner npm test any
webpack/tapable npm test any
webpack/webpack-sources npm test any
webpack/memory-fs npm test any

All of the non webpack/webpack repos are less important but they are just some more on the list to ensure legit coverage.

We are working to create a similar CITGM for our own plugin loader ecosystem so we can smoke test individual packages as well.

Let me know about thoughts. I will submit a PR with a bit of direction. Thanks!

TheLarkInn avatar Jan 08 '17 20:01 TheLarkInn

@MylesBorins how are we going to add this if we can't pass in custom test commands?

gdams avatar Jan 09 '17 09:01 gdams

We could create an alias command for webpack/webpack if needed. Let me know if I can help facilitate.

TheLarkInn avatar Jan 09 '17 15:01 TheLarkInn

@TheLarkInn the way that citgm currently works is that it runs npm install and then npm test on the module.

gdams avatar Jan 09 '17 15:01 gdams

I haven't looked at that part of the code yet, is there scope to add a pre hook?

TheLarkInn avatar Jan 09 '17 16:01 TheLarkInn

Not at the moment, we are trying to move away from all custom scripts

gdams avatar Jan 09 '17 16:01 gdams

@TheLarkInn official pre hooks will be called. Essentially we shell out npm install && npm test

MylesBorins avatar Jan 09 '17 16:01 MylesBorins

Oh so could I technically set that linking in a postinstall and that would be fine?

TheLarkInn avatar Jan 09 '17 20:01 TheLarkInn

@TheLarkInn that should work, and it should be sandboxed to out install... that being said I think it is a bit of an anti-pattern to have to modify the environment of the machine to run the test suite. I can dig into the webpack test suite a little bit and see if there is a way to do this without changing the environment.

MylesBorins avatar Jan 09 '17 20:01 MylesBorins

@MylesBorins That would be greatly appreciated. I can't recall specifically the reasoning behind needing to npm link && npm link webpack locally for that test suite so if we can remove it ourselves from our infra, that would be even better.

TheLarkInn avatar Jan 09 '17 21:01 TheLarkInn

@TheLarkInn can you not just change your test script in package.json from

"test": "mocha test/*.test.js --harmony --check-leaks", ==>

"test": "npm link && npm link webpack && mocha test/*.test.js --harmony --check-leaks",

Seems to be working for me and then it could be implemented into citgm easily

gdams avatar Jan 31 '17 15:01 gdams

ping @TheLarkInn @MylesBorins is my solution going to work?

gdams avatar Feb 21 '17 16:02 gdams