Socket
Socket
Sign inDemoInstall

fastq

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastq - npm Package Compare versions

Comparing version 1.15.0 to 1.16.0

1

index.d.ts

@@ -15,2 +15,3 @@ declare function fastq<C, T = any, R = any>(context: C, worker: fastq.worker<C, T, R>, concurrency: number): fastq.queue<T, R>

resume(): any
running(): number
idle(): boolean

@@ -17,0 +18,0 @@ length(): number

9

package.json
{
"name": "fastq",
"version": "1.15.0",
"version": "1.16.0",
"description": "Fast, in memory work queue",

@@ -11,3 +11,3 @@ "main": "queue.js",

"test:report": "npm run lint && npm run unit:report",
"test": "npm run lint && npm run unit && npm run typescript",
"test": "npm run lint && npm run unit",
"typescript": "tsc --project ./test/tsconfig.json",

@@ -17,3 +17,4 @@ "legacy": "tape test/test.js"

"pre-commit": [
"test"
"test",
"typescript"
],

@@ -44,3 +45,3 @@ "repository": {

"tape": "^5.0.0",
"typescript": "^4.0.2"
"typescript": "^5.0.4"
},

@@ -47,0 +48,0 @@ "dependencies": {

@@ -121,2 +121,3 @@ 'use strict'

current.callback = done || noop
current.errorHandler = errorHandler

@@ -123,0 +124,0 @@ if (_running === self.concurrency || self.paused) {

@@ -35,2 +35,4 @@ import * as fastq from '../'

queue.running()
queue.saturated = () => undefined

@@ -37,0 +39,0 @@

@@ -567,1 +567,17 @@ 'use strict'

})
test('unshift with worker throwing error', function (t) {
t.plan(5)
var q = buildQueue(function (task, cb) {
cb(new Error('test error'), null)
}, 1)
q.error(function (err, task) {
t.ok(err instanceof Error, 'global error handler should catch the error')
t.match(err.message, /test error/, 'error message should be "test error"')
t.equal(task, 42, 'The task executed should be passed')
})
q.unshift(42, function (err) {
t.ok(err instanceof Error, 'unshift callback should catch the error')
t.match(err.message, /test error/, 'error message should be "test error"')
})
})

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