Under no circumstances Americans (accoring to Volkswagen package page) shall be deceived! Tests are essential! Tests are one of the most important tools in developers world! But what they did... they deceived us! How dare they do it?! How dare they tamper tests!? Just to get a nice green shield in README!?? It's miserable! If one doesn't want to write tests, he shouldn't be a developer, he really should not! As the head of the Clean-Code Group, I present you the flawless tool for eradicating such a disease! Use it everywhere, anytime!
Use Yarn. (Or npm). yarn add hoaxwagen
or npm install hoaxwagen
will do exactly as the commands say.
Or, using it as a CLI, yarn global add hoaxwagen
or npm install -g hoaxwagen
Not really hard, is it?
Well, you have two options: either to use require()
, or to run a CLI
Somewhere in your javascript project or, even better, in Webpack (or whatever tool you use), include the following code snippet:
require('hoaxwagen').monitor();
// continue adding whatever usually needs to be added
That's it!
And, while building, you might see this:
β
Clean!
or, occasionally, this:
π¨ WARNING π¨
Volkswagen π΄ is detected in the following packages:
ββ ugly-package-1 @ 0.0.0 (yarn.pm/ugly-package-1)
ββ ugly-package-2 @ 0.0.0 (yarn.pm/ugly-package-2)
ββ ugly-package-3 @ 0.0.0 (yarn.pm/ugly-package-3)
π§π³ BE AWARE OF POSSIBLE FUTURE CONSEQUENCES!
There're actually several things you can do apart from observing a warning message in the webpack:
Method name | Description | Return value | Appeared in |
---|---|---|---|
isFraud() |
Checks if Volkswagen library exists in node_modules |
boolean | v1.0.0 |
monitor() |
Shows an alert if isFraud() returns true |
void | v1.0.0 |
getPackages() |
Returns a list of packages that uses Volkswagen | IPackage | v1.0.1 |
interface IPackage {
name: string;
version: string;
yarn: string; // URL link to package
path: string; // absolute path
}
As an example, let's go over the packages that use Volkswagen:
const hoax = require("hoaxwagen");
const rogues = hoax.getPackages(); // yeah, let's get them out!
rogues.forEach(p => { // p is an IPackage
console.log(p.name);
});
Using a CLI is much simpler. Install hoaxwagen like this: yarn global add hoaxwagen
or npm i -g hoaxwagen
Run hoaxwagen
in terminal, in any javascript project folder, and it will show you how deep the rabbit hole goes:
Well, I've got bad news for you...
___ _____ ____ _ _ ____ _ ______
|_ _|_ _| / ___|| | | |/ ___| |/ / ___|
| | | | \___ \| | | | | | ' /\___ \
| | | | ___) | |_| | |___| . \ ___) |
|___| |_| |____/ \___/ \____|_|\_\____/
Volkswagen was detected in the following packages:
ββ long-package @ 1.0.0 (yarn.pm/long-package) in /Users/user/path/to/long-package
ββ package @ 2.0.0 (yarn.pm/package) in /Users/user/path/to/package
or a boring version:
β
Clean!
Actually, the use of the rabbit hole allegory was a little too generous. What this library is definitely not going to do is show you the dependency map. Search by yourself. (No offence).
Look at it! Such a nice shield we've made for you! Feel free to use everywhere!
Including it in your README will make the code run 1000x faster look better than without it, I swear!
Use it in markdown like this:
[![Not using VW](https://hoax.gq/not-using-vw.svg)](https://hoax.gq)
In html use this:
<a href="https://hoax.gq"><img alt="Not using VW" src="https://hoax.gq/not-using-vw.svg"></a>
Or print it out and stick it on the things:
Contributions are always welcome. There's no code of conduct, so feel free to do whatever you want, yeah!
But don't forget to give it a star!
Any similarities with a current event concerning (but not limited to) a multinational automobile manufacturer are purely coincidental.