
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.
Simple queue handling asynchronous tasks.
npm i asynque
const { AsynQue, Task } = require('asynque');
const queue = new AsynQue();
const retrieveHello = new Task({ task: name => `Hello, ${name}!` });
queue.enque(retrieveHello).then(result => {
console.log(`The task is done: ${result}`);
// > The task is done: Hello, AsynQue!
});
// ... do some works, and later ...
const task = queue.deque();
const result = task.run('AsynQue'); // The promise will resolve at this moment.
// > Hello, AsynQue!
const { AsynQue, Task } = require('asynque');
const queue = new AsynQue();
queue.enque(new Task({ task: () => 'Run this after.', priority: 10}));
queue.enque(new Task({ task: () => 'Run this first!', priority: -10}));
console.log(queue.deque().run()); // > Run this first!
console.log(queue.deque().run()); // > Run this after.
const { AsynQue, Task } = require('asynque');
const queue = new AsynQue();
const taste = new Task({
task: flavor => {
if (flavor === 'Mint') {
throw new Error('I hate mint');
}
return `It is ${flavor} flavor!`;
},
});
queue.enque(taste)
.then(result => {
console.log(result); // It's not executed because the error is thrown.
})
.catch(error => {
console.error(error);
// > I hate mint
});
// ... do some works, and later ...
const task = queue.deque();
try {
task.run('Mint'); // The promise will reject at this moment.
} catch (error) {
console.error(error);
// > Error: I hate mint
}
FAQs
Simple queue handling asynchronous tasks.
We found that asynque 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.