Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
A Transform stream which lets you take a peek at the first bytes before unpiping itself and unshifting the buffer back onto the upstream stream leaving the original stream ready to be piped again onto its final destination.
npm install buffer-peek-stream
Useful if you want to inspect the start of a stream before deciding what to do with it.
This works with buffers and does no string decoding. If you know you have a string and already know its encoding then checkout peek-stream.
As a function...
var peek = require('buffer-peek-stream');
var readstream = fs.createReadStream('package.json');
peek(readstream, 65536, function (err, data, outputStream) {
if (err) throw err;
// outputStream is ready to be piped somewhere else
outputStream.pipe(somewhere_else);
});
As a stream...
var PeekStream = require('buffer-peek-stream').BufferPeekStream;
var peek = new PeekStream(65536);
var readstream = fs.createReadStream('package.json');
// peek will only emit the data event once
peek.once('data', function (buf) {
// readstream is ready to be piped somewhere else
peek.pipe(somewhere_else);
});
readstream.pipe(peek);
// alternatively pipe `peek` here instead of in `data` callback
MIT
FAQs
jspm npm endpoint
The npm package jspm-npm receives a total of 6,058 weekly downloads. As such, jspm-npm popularity was classified as popular.
We found that jspm-npm 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.