
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
cancelable-awaiter
Advanced tools
A replacement for Typescript's default awaiter helper that supports Bluebird promise cancellations.
A replacement for Typescript's default awaiter helper that supports Bluebird promise cancellations.
npm install --save cancelable-awaiter
Depends on bluebird being installed as a dependency and configured to support cancellations:
import * as tslib from "tslib";
import * as Bluebird from "bluebird";
import * as awaiter from "cancelable-awaiter";
Bluebird.config({
cancellation: true
});
(tslib as any).__awaiter = awaiter;
Note that in order for the above to work you also need to compile your project with the --importHelpers
flag and install the tslib
module.
Then async/await syntax can be used in conjunction with promise cancellations:
async function doSomeThings() {
await doFirstThing()
    // will be invoked anyway:
.finally(() => console.log("May have done first thing."));
  // may not execute this part if cancelled beforehand:
  console.log("Done first thing!");
 Â
 // may also be cancelled after first thing is done:
await doSecondThing();
  console.log("Done second thing!");
}
const promise = doSomeThings()
.finally(() => console.log("May have done some things."));
Promise.delay(1000)
.then(() => promise.cancel());
FAQs
A replacement for Typescript's default awaiter helper that supports Bluebird promise cancellations.
The npm package cancelable-awaiter receives a total of 1,055 weekly downloads. As such, cancelable-awaiter popularity was classified as popular.
We found that cancelable-awaiter 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.