Socket
Socket
Sign inDemoInstall

@sapphire/async-queue

Package Overview
Dependencies
Maintainers
0
Versions
800
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire/async-queue - npm Package Compare versions

Comparing version 1.5.3-next.1ca44f3f.0 to 1.5.3-next.1e73db92

24

dist/iife/index.global.js

@@ -7,8 +7,5 @@ var SapphireAsyncQueue = (function (exports) {

var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// src/lib/AsyncQueueEntry.ts
// src/lib/_AsyncQueueEntry.ts
var _AsyncQueueEntry = class _AsyncQueueEntry {

@@ -29,9 +26,7 @@ constructor(queue) {

setSignal(signal) {
if (signal.aborted)
return this;
if (signal.aborted) return this;
this.signal = signal;
this.signalListener = () => {
const index = this.queue["promises"].indexOf(this);
if (index !== -1)
this.queue["promises"].splice(index, 1);
if (index !== -1) this.queue["promises"].splice(index, 1);
this.reject(new Error("Request aborted manually"));

@@ -113,4 +108,3 @@ };

this.promises.push(entry);
if (options?.signal)
entry.setSignal(options.signal);
if (options?.signal) entry.setSignal(options.signal);
return entry.promise;

@@ -122,4 +116,3 @@ }

shift() {
if (this.promises.length === 0)
return;
if (this.promises.length === 0) return;
if (this.promises.length === 1) {

@@ -137,4 +130,3 @@ this.promises.shift();

abortAll() {
if (this.queued === 0)
return;
if (this.queued === 0) return;
for (let i = 1; i < this.promises.length; ++i) {

@@ -154,3 +146,3 @@ this.promises[i].abort();

})({});
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.global.js.map
//# sourceMappingURL=index.global.js.map
{
"name": "@sapphire/async-queue",
"version": "1.5.3-next.1ca44f3f.0",
"version": "1.5.3-next.1e73db92",
"description": "Sequential asynchronous lock-based queue for promises",

@@ -29,7 +29,8 @@ "author": "@sapphire",

"docs": "typedoc-json-parser",
"build": "tsup && yarn build:rename-cjs-index",
"build:rename-cjs-index": "node ../../scripts/rename-cjs-index.mjs",
"build": "yarn gen-index && tsup && yarn build:rename-cjs-index",
"build:rename-cjs-index": "tsx ../../scripts/rename-cjs-index.cts",
"prepack": "yarn build",
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run"
"check-update": "cliff-jumper --dry-run",
"gen-index": "tsx ../../scripts/gen-index.cts -w async-queue"
},

@@ -65,10 +66,11 @@ "repository": {

"devDependencies": {
"@favware/cliff-jumper": "^2.2.3",
"@vitest/coverage-v8": "^1.2.2",
"tsup": "^8.0.1",
"typedoc": "^0.25.7",
"typedoc-json-parser": "^9.0.1",
"typescript": "^5.3.3",
"vitest": "^1.2.2"
"@favware/cliff-jumper": "^4.0.2",
"@vitest/coverage-v8": "^2.0.3",
"tsup": "^8.2.1",
"tsx": "^4.16.2",
"typedoc": "^0.25.13",
"typedoc-json-parser": "^10.0.0",
"typescript": "~5.4.5",
"vitest": "^2.0.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc