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

is-install-needed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-install-needed

Tool to check if runnning npm/yarn install is necessary

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

is-install-needed

Build Status Dependencies

This is a simple tool that checks if the lock file has changed (supports both Yarn and npm) so you know if you need to run install.

Installation

npm

$ npm install -g is-install-needed

yarn

$ yarn global add is-install-needed

Usage

CLI

$ is-install-needed

By default it looks for both yarn.lock and package-lock.json.

FlagDescription
--yarnOnly look for yarn.lock
--npmOnly look for package-lock.json

Programmatic API

import { isInstallNeeded } from 'is-install-needed';

async function check() {
  const isNeeded = await isInstallNeeded('./yarn.lock', '.lockhash');
  if (result) {
    // Install packages
  }
}

FAQs

Package last updated on 16 Oct 2018

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