Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@devicefarmer/please-update-dependencies

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devicefarmer/please-update-dependencies

It checks that currently installed dependencies satisfy the requirements set in your package.json file

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@devicefarmer/please-update-dependencies

npm

@devicefarmer/please-update-dependencies is a useful addition to Node.js CLI applications. It checks that currently installed dependencies satisfy the requirements set in your package.json, and won't let the user continue till they've updated the dependencies.

Example

Benefits/philosophy

Pros

  • Easy to understand error messages.
  • Encourages users to solve issues by themselves rather than overloading the maintainer with questions or issues.
  • No output when nothing's wrong.

Cons

  • If you release a botched update and forget to release a dependency that you've bumped up, users can't run your app.
  • Only semver compatible dependencies are checked.
    • If you use URLs as dependencies, they will simply be ignored.
  • Slight but mostly unnoticeable overhead.

Installation

Using yarn:

yarn add @devicefarmer/please-update-dependencies

Using npm:

npm install --save @devicefarmer/please-update-dependencies

Now, in your main file, before anything else, insert the following line:

require('@devicefarmer/please-update-dependencies')(module)

If you're using Babel or similar, you probably have an existing entry point. You should put the line there before activating babel or anything else.

If you don't put the line as the first thing in your file, you risk running into incompatibilities before any checks even run.

The dependency check will run every time the binary is invoked, unless you've exported ALLOW_OUTDATED_DEPENDENCIES=1. It'll find the nearest package.json (either in the same folder or a parent folder) and check things from there.

License

See LICENSE.

Keywords

FAQs

Package last updated on 27 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc