
Security News
Node.js Considers Public Workflow for Security Reports Amid AI-Driven Surge
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.
@nxtedition/shared
Advanced tools
Ring Buffer for NodeJS cross Worker communication.
npm i @nxtedition/shared
// index.js
import * as shared from '@nxtedition/shared'
import tp from 'timers/promise'
const writer = shared.alloc(16 * 1024 * 1024)
const reader = shared.alloc(16 * 1024 * 1024)
const worker = new Worker(new URL('worker.js', import.meta.url), {
workerData: { reader, writer },
})
const writeToWorker = shared.writer(reader)
shared.reader(writer, async (buffer) => {
console.log(`From worker ${buffer}`)
await tp.setTimeout(1e3) // Backpressure
})
while (true) {
await writeToParent(Buffer.from('Hello from parent')
}
// worker.js
import * as shared from '@nxtedition/shared'
import tp from 'timers/promise'
const writeToParent = shared.writer(workerData.writer)
shared.reader(workerData.reader, (buffer) => {
console.log(`From parent ${buffer}`)
await tp.setTimeout(1e3) // Backpressure
})
while (true) {
await writeToParent(Buffer.from('Hello from worker')
}
FAQs
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
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.