
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.
`no-race` is a simple library for JavaScript/TypeScript to queue promises in case of concurrency and race conditions.
no-race is a simple library for JavaScript/TypeScript to queue promises in case of concurrency and race conditions.
EagerQueue provides a best-effort queue, it queues and executes tasks in order.
import { EagerQueue } from 'no-race'
import { sleep } from 'bun'
results = []
promises = []
const eagerQueue = new EagerQueue()
for (let i = 0; i < 10; i++) {
const done = eagerQueue.enqueue(async () => {
await sleep(Math.random() * 100)
results.push(i)
})
promises.push(done)
}
await Promise.all(promises)
// expected output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
console.log(results)
LazyQueue provides a queue that skips when it is busy; this is very helpful when each task is extremely resource-consuming.
import { LazyQueue } from 'no-race'
import { sleep } from 'bun'
results = []
promises = []
const lazyQueue = new LazyQueue()
for (let i = 0; i < 10; i++) {
const done = lazyQueue.enqueue(async () => {
await sleep(Math.random() * 100)
results.push(i)
})
promises.push(done)
}
await Promise.all(promises)
// expected output: [0], maybe one or two more due to the indeterminism of `random`
console.log(results)
FAQs
`no-race` is a simple library for JavaScript/TypeScript to queue promises in case of concurrency and race conditions.
The npm package no-race receives a total of 0 weekly downloads. As such, no-race popularity was classified as not popular.
We found that no-race 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.