Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
semver-level-harmony
Advanced tools
Compare if two semver version range levels are the same. The world is complex, sometimes dependencies rely on others to have the same version level. For example Spectron expects Electron to have the same minor version. Testing if these two modules have the same minor version makes this implicit relation explicit, getting them in harmony.
The module is smart enough to notice a range is too wide to compare on certain levels. For example comparing the minor level on ^1.2.3
is impossible since the installed version can go up to 1.9.9
.
This module is small and simple with the downside being it only supports semver ranges with three defined numbers. This is a range you get when installing a module with npm.
npm install semver-level-harmony --save-dev
const assert = require('assert');
const semverLevelHarmony = require('semver-level-harmony');
const { electron, spectron } = require('./package.json').devDependencies;
assert.ok(
semverLevelHarmony('minor', electron, spectron),
'electron and spectron version minor levels are the same'
);
Type: string
Version semver level: major
, minor
or patch
.
Type: string
The version semver range.
FAQs
Compare if two semver version range levels are the same.
The npm package semver-level-harmony receives a total of 0 weekly downloads. As such, semver-level-harmony popularity was classified as not popular.
We found that semver-level-harmony demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.