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

@o-rango/update-notify

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@o-rango/update-notify

Check if an package needs to be update

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

@o-rango/update-notify

Build Status codecov

Inspired in update-notifier but using the default npm api that way is working behind proxy or any other config reflected in .npmrc.

It only has programmatic api and can be easily attached to your workflow.

Install

npm i --save @o-rango/updatet-notify

Usage

const { updateNotify } = require('@o-rango/update-notify');

const notifier = updateNotify({
      pkg: {
        version: '0.0.1',
        name: 'react'
      },
      updateCheckInterval: 0
    });


console.log(notifier);
// Output =>  

API

notify = updateNotify(options)

Checks if there is an available update. Accepts options defined below. Returns { updateAvailable: true , name: 'react' , latest: '16.11.0', 'current': '0.0.1' } if there is any update.

options

Type: object

pkg

Type: object

name

Required
Type: string

version

Required
Type: string

updateCheckInterval

Type: number
Default: 1000 * 60 * 60 * 24 (1 day)

How often to check for updates.

distTag

Type: string
Default: latest

Which dist-tag to use to find the latest version.

Extra

ping = pingRegistry()

Easter egg method that pings registry defined in your .npmrc;

const { pingRegistry } = require('@o-rango/update-notify');


const online = await pingRegistry();
// Output online => :{ isOnline : true }

Keywords

FAQs

Package last updated on 22 Jan 2020

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