Giter Club home page Giter Club logo

yarn-plugin-new-dependency-check's Introduction

yarn-plugin-new-dependency-check

📦 Never accidentally pull in a billion new dependencies again.

✈️ Moved away!

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

Thoughts

One of the things I've come to love about how Linux prompts users when installing dependencies is that it makes it explicit how many packages will be fetched.

λ sudo apt install cowsay
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  filters cowsay-off
The following NEW packages will be installed:
  cowsay
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

When compared to the NodeJS ecosystem, this is vastly superior in that you can't really unknowning depend on a million things without having been explicitly notified about how many additional packages you were adding to your dependency tree along the way.

With this lack of awareness as well as how much NodeJS relies on adopting third-party packages, it's no wonder dependency hell is a thing.

This plugin attacks this problem from the angle of awareness -- by surfacing what's being installed (including transitive dependencies), you can make informed decisions about whether a certain package is worth it or not.

Disclaimer

Until this is released as 1.x, consider every release as potentially-breaking. Consult the release notes for more details.

Installation

yarn plugin import <link to your chosen release>

Development & Contributing

Work done on this plugin follows decisions and principles documented here.

Feel free to open a PR or an issue if you'd like to submit improvements! Anything sent up will be processed as soon as possible.

yarn-plugin-new-dependency-check's People

Contributors

mcataford avatar

Watchers

 avatar

yarn-plugin-new-dependency-check's Issues

Resolving installed package count mutates the `Project`

Ideally, the process of determining how many packages will be installed wouldn't modify the Project passed through by the hook. Currently, resolveEverything will mutate it

A possible solution could be to reset the resolutions after work is done, but we'd have to make sure this is all the state we touched.

`resolveEverything` fails with unpublished local tarball

          Outstanding problem: the tests require a network call due to `Project.resolveEverything` and the usage of a sample package for installs (i.e. `ansicolor`, picked randomly). Ideally, the tests would install a prebuilt tarball of the package itself to avoid the need for network, but the resolution step is still a problem.

Originally posted by @mcataford in #1 (comment)

The root cause seems to be the use of lockfileOnly when resolving future dependencies -- the tarball can't be resolved because it only exists locally (hot guess), which fails.

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.