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

@oclif/plugin-warn-if-update-available

Package Overview
Dependencies
Maintainers
2
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/plugin-warn-if-update-available - npm Package Compare versions

Comparing version 1.2.5 to 1.3.0

2

.oclif.manifest.json

@@ -1,1 +0,1 @@

{"version":"1.2.5","commands":{}}
{"version":"1.3.0","commands":{}}

@@ -0,1 +1,9 @@

<a name="1.3.0"></a>
# [1.3.0](https://github.com/oclif/plugin-warn-if-update-available/compare/v1.2.5...v1.3.0) (2018-04-08)
### Features
* increase timeout to weekly and add timeoutInDays configuration ([7c1bdbf](https://github.com/oclif/plugin-warn-if-update-available/commit/7c1bdbf))
<a name="1.2.5"></a>

@@ -2,0 +10,0 @@ ## [1.2.5](https://github.com/oclif/plugin-warn-if-update-available/compare/v1.2.4...v1.2.5) (2018-04-08)

@@ -25,4 +25,6 @@ "use strict";

try {
const cfg = config.pjson.oclif['warn-if-update-available'] || {};
const timeoutInDays = cfg.timeoutInDays || 7;
const { mtime } = await fs.stat(file);
const staleAt = new Date(mtime.valueOf() + 1000 * 60 * 60 * 24);
const staleAt = new Date(mtime.valueOf() + 1000 * 60 * 60 * 24 * timeoutInDays);
return staleAt < new Date();

@@ -29,0 +31,0 @@ }

{
"name": "@oclif/plugin-warn-if-update-available",
"description": "warns if there is a newer version of CLI released",
"version": "1.2.5",
"version": "1.3.0",
"author": "Jeff Dickey @jdxcode",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/plugin-warn-if-update-available/issues",

@@ -18,2 +18,3 @@ @oclif/plugin-warn-if-update-available

* [Installation](#installation)
* [Configuration](#configuration)
<!-- tocstop -->

@@ -29,3 +30,3 @@

This checks the version against the npm registry asynchronously in a forked process, at most once per 24 hours. It then saves a version file to the cache directory that will enable the warning. The upside of this method is that it won't block a user while they're using your CLI—the downside is that it will only display _after_ running a command that fetches the new version.
This checks the version against the npm registry asynchronously in a forked process, at most once per 7 days. It then saves a version file to the cache directory that will enable the warning. The upside of this method is that it won't block a user while they're using your CLI—the downside is that it will only display _after_ running a command that fetches the new version.

@@ -46,1 +47,5 @@ # Installation

```
# Configuration
In `package.json`, set `oclif['warn-if-update-available'].timeoutInDays` to change the timeout duration between checks.
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