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

depsync

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depsync - npm Package Compare versions

Comparing version 1.3.13 to 1.3.14

2

package.json
{
"name": "depsync",
"version": "1.3.13",
"version": "1.3.14",
"author": "Dom Chen",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/domchen/depsync",

@@ -141,26 +141,2 @@ //////////////////////////////////////////////////////////////////////////////////////

function compareVersion(versionA, versionB) {
if (versionA === versionB) {
return 0;
}
let listA = versionA.split(".");
let listB = versionB.split(".");
let length = Math.max(listA.length, listB.length);
for (let i = 0; i < length; i++) {
if (listA.length <= i) {
return -1;
}
let a = parseInt(listA[i]);
if (listB.length <= i) {
return 1;
}
let b = parseInt(listB[i]);
if (a === b) {
continue;
}
return a > b ? 1 : -1;
}
return 0;
}
function parse(configFileName, version, platform) {

@@ -175,3 +151,3 @@ if (!fs.existsSync(configFileName)) {

} catch (e) {
if (jsonText.trimLeft().indexOf("{") === 0) {
if (jsonText.trim().indexOf("{") === 0) {
Utils.error("The DEPS config file is not a valid JSON file: " + configFileName);

@@ -184,3 +160,3 @@ }

config.version = data.version ? data.version : "0.0.0";
if (compareVersion(version, config.version) < 0) {
if (Utils.compareVersion(version, config.version) < 0) {
Utils.error("The DEPS config requires a higher version of depsync tool: " + configFileName);

@@ -187,0 +163,0 @@ Utils.error("Requires version: " + config.version);

@@ -66,2 +66,7 @@ //////////////////////////////////////////////////////////////////////////////////////

function run(args) {
let version = process.versions.node;
if (Utils.compareVersion(version, "14.14.0") < 0) {
Utils.error("Node.js version must be greater than or equal to 14.14.0\n");
process.exit(1);
}
let commandOptions = CommandLine.parse(args);

@@ -68,0 +73,0 @@ if (commandOptions.errors.length > 0) {

@@ -226,2 +226,26 @@ //////////////////////////////////////////////////////////////////////////////////////

function compareVersion(versionA, versionB) {
if (versionA === versionB) {
return 0;
}
let listA = versionA.split(".");
let listB = versionB.split(".");
let length = Math.max(listA.length, listB.length);
for (let i = 0; i < length; i++) {
if (listA.length <= i) {
return -1;
}
let a = parseInt(listA[i]);
if (listB.length <= i) {
return 1;
}
let b = parseInt(listB[i]);
if (a === b) {
continue;
}
return a > b ? 1 : -1;
}
return 0;
}
function addLineBreaker() {

@@ -241,2 +265,3 @@ hasLineBreaker = true;

exports.error = error;
exports.compareVersion = compareVersion;
exports.addLineBreaker = addLineBreaker;
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