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

unbloat

v1.0.10

Published

Unbloat maximizes the security posture of your repository and purges unnecessary file weight without compromising commit and commit message history.

Downloads

790

Readme

Unbloat

Unbloat is a powerful tool designed to help developers manage and clean up their Git repositories by identifying and handling files and directories that were once tracked but no longer present in the most recent commits across existing branches. It's particularly useful for removing API keys, passwords or other sensitive data, and large files and directories that were accidentally committed (e.g. /node_modules), while keeping commit and commit message history intact.


API

npm run unbloat

Features

  • Identifies Removed Files: Automatically scans your Git repository to find files that were previously tracked but have been removed since the most recent commits in the currently existing branches.
  • User-Friendly: Provides an interactive prompt to choose between viewing the list of removed files or permanently deleting them from the repository's history, as well as a fully styled commit rewrite progress indicator with completion fraction, lapsed and estimated time remaining.
  • Batch Processing: Efficiently processes branches in batches to optimize performance and reduce memory usage.
  • Comprehensive Cleanup: Offers an option to permanently delete removed files from the entire project history followed by a thorough cleanup of stashes, tags, original refs, the Git reflog and unreachable objects to maximize security and ensure optimal repository performance.

Notes

Unbloat works by scanning the entire Git repository, including all branches and reflog entries, to compile a comprehensive list of files that have ever been tracked. It then compares this list to the files present in the latest commits across all currently existing branches. This comparison allows Unbloat to accurately identify files that are no longer needed, providing the developer with the option to either view these files or remove them permanently from the repository's history. Once the obsolete files are identified Unbloat offers a cleanup option that not only removes these files but also purges stashes, tags, original refs, the Git reflog and unreachable objects, maximizing the security posture of the repository while also ensuring that it is as lean and performant as possible. Given the powerful nature of Unbloat it is highly recommended that developers experiment with it in a controlled environment before applying changes to their main repository. This can be achieved by running it from a local copy of the repository, carefully reviewing the list of identified files, and extensive regression testing. When confident in the repository's unbloated state, ensure collaborators are aware before forcing updates to the remote origin.

Installation

With npm do

$ npm install unbloat

License

(MIT)

Copyright (c) 2024 David H. <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.