Socket
Socket
Sign inDemoInstall

update-check

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

update-check - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

21

index.js

@@ -113,9 +113,8 @@ // Native

const regURL = registryUrl(scope);
const url = new URL(full, regURL);
// For scoped packages, getting a certain dist tag is not supported
const url = new URL(scope ? full : `${full}/${encode(distTag)}`, regURL);
let version = null;
let spec = null;
try {
({version} = await loadPackage(url));
spec = await loadPackage(url);
} catch (err) {

@@ -131,4 +130,3 @@ // We need to cover:

const spec = await loadPackage(url, authInfo);
version = spec['dist-tags'].latest;
spec = await loadPackage(url, authInfo);
} else {

@@ -139,2 +137,8 @@ throw err;

const version = spec['dist-tags'][distTag];
if (!version) {
throw new Error(`Distribution tag ${distTag} is not available`);
}
return version;

@@ -172,7 +176,2 @@ };

const details = getDetails(pkg.name);
if (details.scope && config.distTag) {
throw new Error('For scoped packages, the npm registry does not support getting a certain tag');
}
const time = Date.now();

@@ -179,0 +178,0 @@ const {distTag, interval} = Object.assign({}, defaultConfig, config);

{
"name": "update-check",
"version": "1.2.0",
"version": "1.3.0",
"description": "Minimalistic update notifications for command line interfaces",

@@ -5,0 +5,0 @@ "main": "./index.js",

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