2 ms·
Sigh... the dependencies remind me of the "left-pad" and "is-positive" package. Most of the heavy lifting on this one is done by the `is-ci` package [1], which
by SilasX 8y ago
Sigh... the dependencies remind me of the "left-pad" and "is-positive" package.
Most of the heavy lifting on this one is done by the `is-ci` package [1], which is what does (obviously) the "is this a CI server" request.
But it doesn't end there. `is-ci` just does a single call within the broader `ci-info` library [2].
Any reason it couldn't have just imported `ci-info` and used its `isCI` function?
[1] https://github.com/watson/is-ci https://github.com/watson/is-ci
[2] https://github.com/watson/ci-info https://github.com/watson/ci-info
- watson 8y agoHi, co-creator of volkswagen, is-ci, and ci-info here. I extracted is-ci into its own module during the time I wrote volkswagen. It then turned out a lot of people wanted a module like that for actual useful things. But they wanted more info than simply "is this a CI server or not" (which was all that volkswagen cared about). So I made ci-info and moved the logic into that module and then made is-ci inherit from that, so to not have to duplicate the logic
- Dylan16807 8y agoWhich is largely understandable, but shouldn't ci-info have obsoleted is-ci?
- watson 8y agoYou're free to just depend on ci-info directly if that's all you need of course. The is-ci module does give you one added benefit however: It allows you to run this on the command line: $ is-ci && echo "I'm running in a CI environment" But of course that could technically be baked into ci-info. It's just more convenient to use with npx and to reason about if it's a self-contained module
- SilasX 8y agoYou're asking why someone doesn't want a lower number of published npm libraries on their resume?
- eppsilon 8y agoPerhaps you would enjoy https://github.com/jezen/is-thirteen https://github.com/jezen/is-thirteen