
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Constants and functions for working with postgres xlog positions. This module makes a number of assumptions about the format of xlog positions. It's not totally clear that this is a committed Postgres interface, but it seems to be true.
We assume that postgres xlog positions are represented as strings of the form:
filepart/offset e.g., "0/17BB660"
where both "filepart" and "offset" are hexadecimal numbers. xlog position F1/O1 is at least as new as F2/O2 if (F1 > F2) or (F1 == F2 and O1 >= O2). We try to avoid assuming that they're zero-padded (i.e., that a simple string comparison might do the right thing). We also don't make any assumptions about the size of each file, which means we can't compute the actual difference between two positions.
var assert = require('assert');
var lsn = require('pg-lsn');
var locationOne = '2D7/0';
var locationTwo = '2D6/FEFFE770';
var comparison = lsn.xlogCompare(locationOne, locationTwo);
if (comparison === 0) {
console.log('locations are the same');
} else if(comparison > 0) {
console.log('locationOne is greater than locationTwo');
} else {
assert.ok(comparison < 0);
console.log('locationOne is less than locationTwo');
}
FAQs
PostgreSQL LSN comparison library
We found that pg-lsn 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.