Giter Club home page Giter Club logo

packwatch's Introduction

πŸ“¦ PackWatch πŸ‘€

All Contributors

It ain't easy being tiny.

codecov packwatch CI

✈️ Moved away!

This project has moved away from Github and is now hosted elsewhere.

Overview

packwatch is inspired by what projects like bundlewatch do for webpack bundle size monitoring and applies the same general idea to monitor your node packages' tarball sizes across time and help avoid incremental bloat. Keeping your applications as trim as possible is important to provide better experiences to users and to avoid wasting system resources, and being cognizant of the footprint of the packages you put out there is paramount.

Using packwatch, you can track your package's expected size, packed and unpacked, via a manifest comitted along with your code. You can use it to define an upper limit for your package's size and validate that increases in package footprint are warranted and not accidental.

Installation

Installing packwatch is easy as pie:

yarn add packwatch -D

or

npm install packwatch --save-dev

While you can install packwatch as a global package, it's better to include it as a devDependency in your project.

Usage

packwatch tracks your packages' size via its .packwatch.json manifest. To get started, call packwatch at the root of your project: a fresh manifest will be generated for you using your current package's size as the initial upper limit for package size.

Once a manifest file exists, calling packwatch again will compare its data to the current state of your package. Every time packwatch compares your code to the manifest, it will update the last reported package size statistics it contains, but not the limit you have set.

At any time, you can update the limit specified in your manifest by using the --update-manifest flag:

packwatch --update-manifest

Just commit your .packwatch.json manifest and you're good to go!

Check out Packwatch's best practices tips and tricks for some advice on how to make the most of it!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Marc Cataford

πŸ€” πŸ’» πŸš‡ ⚠️ πŸ“–

Michael Rose

πŸš‡ πŸ“– πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

packwatch's People

Contributors

allcontributors[bot] avatar dependabot-preview[bot] avatar dependabot[bot] avatar mcataford avatar msrose avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

msrose

packwatch's Issues

Add yarn caching to CI

Each CI step currently runs yarn install. This should be cached using actions/cache so that we don't needlessly refetch packages and spend time preparing dependencies when they haven't changed.

Ability to set "ok interval"

As of now, we can CI failures, as soon as we wrote some code that just adds 0.1kB. It would be great to set a higher granularity. A few possible options:

  1. Being able to set granularity to kB
  2. Being able to set a "max higher" amount, which will end up in warnings

The reason we don't just increase the kB, is that it then says, that our bundle shrank, which is also not true.

Awesome project!

I can't believe this doesn't have any stars yet!
This package does exactly what it should do - really awesome!

I was first a bit confused, that the config is not described anywhere, maybe you want to add a bit of docs for that.

But the fact, that I just do yarn packwatch and I'm done, is awesome.
Thanks!

Looking at v3

It's been a while since Packwatch has been touched in any meaningful way, 2023 is time. πŸš€

Open to feature requests

In mapping what v3 will look like and offer, the suggestion box is open! πŸŽ‰ Just post under this issue to start a discussion on features or changes you'd like to see in Packwatch 3.

Projected features

  • Ability to have greater control of threshold that trigger failing checks (#18)
  • Tracking the number of direct / transitive dependencies (via the Yarn API?)
  • A versioned schema for packwatch.json

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update actions/cache action to v4
  • chore(deps): update codecov/codecov-action action to v4
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/nodejs.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • codecov/codecov-action v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3
npm
package.json
  • @types/jest ^29.5.0
  • @types/node ^18.15.5
  • jest ^29.5.0
  • rome ^12.0.0
  • ts-jest ^29.0.5
  • typescript ^4.3.0
nvm
.nvmrc
  • node 18.15.0

  • Check this box to trigger a request for Renovate to run again on this repository

Don't error on first run

It's quite weird, that although the first run was successful, it exits with exit code 1.
As a user new to packwatch, I'm wondering what I did wrong.

image

Add better CI support

It would be cool to leverage GH actions and archive historical Packwatch results based on commit hash in a dedicated git branch.
This would allow for really cool analysis over time and could open the door for a version of Packwatch that could live solely in CI.

πŸ€”

Automate dependency management further

There is no reason why anything devDependency should not just be merged as soon as it passes the build.

This can be done using the Treat approvals as requests to merge feature of Dbot combined with the auto-approve GH action.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Cannot push to the Git repository.

semantic-release cannot push the version tag to the branch master on the remote Git repository with URL https://x-access-token:%[email protected]/mcataford/packwatch.git.

This can be caused by:


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.