E18E addresses performance issues and security risks by reducing dependencies in three categories: cleanup, speed up, and level up. The initiative focuses on optimizing packages, targeting base ecosystem packages like FDL, and creating leaner, faster alternatives. Through cleanup efforts, unnecessary polyfills and packages are removed, dependencies are upgraded, and native functionalities are utilized to minimize dependencies, enhancing project performance and stability.
So the impact that it has is that performance suffers. You have longer install times, bigger bundles, slower builds, and obviously also security risks from outdated dependencies. And if you ever had to do a security audit, you will know that going through thousands of Node modules is not so nice, because you have to audit all of them. So the less dependencies a project has, the better. So this is exactly the problem E18E was created to solve, and we go about that in three categories. We call them the three pillars of the E18E. The first one is about cleanup. So we go through open source projects and try to reduce the dependencies that they use. We remove unneeded polyfills, for example, for older Node versions, replace packages with alternatives that are faster or smaller.
We also have speed up, where we just try to make packages faster. So we often try to target packages that are at the base of the ecosystem, for example, FDL, which is used everywhere for file system access and all that stuff. So speeding that up speeds also up a lot of other packages that could consume FDL, for example, and just makes everything a little bit faster. The next thing is level up, because sometimes it's just not enough to make existing packages better because they are already bloated or the maintainers just don't want us to intervene. So we try to come up with better versions that are faster, leaner, and smaller, which you can then use instead. So now I want to go into these categories a bit more.
The first one is the cleanup one. So what we actually do is, as I said, we remove unrelated polyfills and replace unmet in packages, eliminate one-liner packages that are often like isNumber or isArray or isOdd, things like that, that's actually a plug-in by Dan and Ro that you can install now when you use Vite that would do that for your bundle already, so they don't end up in your production build. But if you don't even want to install those, that's what we do. We go into these projects and eliminate those in the dependencies. We also upgrade dependencies just as simple as that, because often this is just enough to get all the good things like better performance and stability because we already did the work somewhere else to make something better. And now we just have to make sure that the new version is present in all projects. Here's one of these GitHub issues that we in our repository create to track the progress that we've made. In this example, there's a pump package that can just be replaced with a native functionality from node stream.pipeline because since node 10, you can use that and you don't need the pump package anymore. So if you just do that, you have less dependencies, less to worry about. As you can see, then you have a whole list of packages that use pump. In this example, we have tarfs and pumpify and the traffic they generate when they're always downloaded every month. And the way we create these tables is with a CLI that I created when I first joined E18E. And we had to basically copy the whole NPM registry for that to add indexes so we can query dependencies. So we can know which package depends on what so we can basically create those tables. A community member, Roman, actually decided to build a better frontend for that instead of just the CLI.
Comments