npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hoaxwagen

v1.0.2

Published

Hoaxwagen detects Volkswagen in dependencies to prevent tests fraud

Downloads

17

Readme


Why?

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!

How would I get it?

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?

How would I use it?

Well, you have two options: either to use require(), or to run a CLI

Using as a library

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!

Library methods

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);
});

Running as CLI

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).

S.H.I.E.L.D.

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:

Contributing to Hoaxwagen

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!

Disclaimer

Any similarities with a current event concerning (but not limited to) a multinational automobile manufacturer are purely coincidental.