Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qyu

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qyu - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

dist/cjs/index.d.ts

28

CHANGELOG.md

@@ -5,2 +5,30 @@ # Changelog

## [0.7.0](https://github.com/shtaif/qyu/compare/v0.6.0...v0.7.0) (2022-10-07)
### ⚠ BREAKING CHANGES
* remove whole user-provided argument injection behavior (#16)
### Features
* dual build process for both CommonJS and ES Modules formats ([#17](https://github.com/shtaif/qyu/issues/17)) ([51f8c6f](https://github.com/shtaif/qyu/commit/51f8c6f1a7ad72917f960d3ad017e1ab9b812002))
* remove whole user-provided argument injection behavior ([#16](https://github.com/shtaif/qyu/issues/16)) ([8cdbc96](https://github.com/shtaif/qyu/commit/8cdbc96d56d30ce5470cec78c3b90ac918f57b5b))
## [0.7.0](https://github.com/shtaif/qyu/compare/v0.6.0...v0.7.0) (2022-10-07)
### ⚠ BREAKING CHANGES
* remove whole user-provided argument injection behavior (#16)
### Features
* dual build process for both CommonJS and ES Modules formats ([#17](https://github.com/shtaif/qyu/issues/17)) ([51f8c6f](https://github.com/shtaif/qyu/commit/51f8c6f1a7ad72917f960d3ad017e1ab9b812002))
* remove whole user-provided argument injection behavior ([#16](https://github.com/shtaif/qyu/issues/16)) ([8cdbc96](https://github.com/shtaif/qyu/commit/8cdbc96d56d30ce5470cec78c3b90ac918f57b5b))
## [0.6.0](https://github.com/shtaif/qyu/compare/v0.5.1...v0.6.0) (2022-09-27)

@@ -7,0 +35,0 @@

22

package.json
{
"name": "qyu",
"description": "A general-purpose asynchronous job queue for Node.js",
"version": "0.6.0",
"version": "0.7.0",
"license": "MIT",
"author": "Dor Shtaif <dorshtaif@gmail.com>",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"keywords": [

@@ -21,9 +19,22 @@ "queue",

},
"engineStrict": true,
"engines": {
"node": ">=7.6.0"
},
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/cjs/index.d.ts",
"type": "module",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"default": "./dist/esm/index.js"
}
},
"sideEffects": false,
"scripts": {
"test": "ts-mocha",
"test": "ts-mocha -p ./tsconfig-tests.json",
"code-check": "prettier --check \"./src/**/*.{ts,js}\" && eslint ./src --cache && yarn run test && tsc --noEmit",
"build": "rm -rf ./dist && tsc",
"build": "rm -rf ./dist && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node ./scripts/mark-dist-dirs-package-module-type.js",
"prepublishOnly": "yarn build"

@@ -40,2 +51,3 @@ },

"@types/mocha": "^9.1.1",
"@types/node": "^18.8.2",
"@types/sinon": "^10.0.13",

@@ -42,0 +54,0 @@ "@typescript-eslint/eslint-plugin": "^5.38.0",

# Qyu
`qyu` is a general-purpose asynchronous job queue for Node.js. It is flexible and easy to use, always accepting jobs and running them as fast as the concurrency settings dictate.
`qyu` is a general-purpose asynchronous job queue for the browser and Node.js. It is flexible and easy to use, always accepting jobs and running them as fast as the concurrency settings dictate.

@@ -25,3 +25,3 @@ Qyu was meant for:

// Extra options:
q(performRequest, {priority: 2}, arg1, arg2 /*, ...*/);
q(performRequest, {priority: 2});

@@ -55,2 +55,3 @@ // Returns promise (resolving or rejecting when job is eventually picked from queue

- Written in TypeScript, includes built-in type definitions
- Compatible with browsers as well as Node.js

@@ -131,6 +132,5 @@

#### instance(`fn`[, `options`[, `...args`]])
#### instance(`fn` [, `options`])
*(alias: instance#add)*
Queues function `fn` on instance with optional `options` and `args`.
`args` will all be injected as arguments to `fn` once called.
Queues function `fn` on instance with optional `options`.
**Returns**: *a promise that is tied to the jobs resolution or rejection value when it will be picked from queue and run.*

@@ -155,6 +155,6 @@ ```javascript

// This will be queued (or called right away if concurrency allows) only after job3 completed, regardless of job1 or job2's state! (Note the skipping of the second options argument in order to specify custom job arguments)
q((arg1, arg2) => {
// Do something with arg1, arg2...
}, null, arg1, arg2 /*, ...*/);
// This will be queued (or called right away if concurrency allows) only after job3 had completed, regardless of job1 or job2's state!
q(async () => {
// Do something...
});
```

@@ -174,3 +174,3 @@

await q.whenEmpty()//Will be resolved when no queued jobs are left.
await q.whenEmpty(); // Will be resolved when no queued jobs are left.
```

@@ -203,3 +203,3 @@

// Pausing; job3 will be held in queue until q.resume() is engaged.
// job1 and job2 are already running regardless, because setting the concurrency to "2" allowed them to be called right away without queueing
// job1 and job2 are already running regardless - since we've set the concurrency to `2` they were allowed to be immediately away without having to be queued
await q.pause();

@@ -217,3 +217,3 @@ q(job4); // job4 will also be added to the queue, not to be called until resuming...

q.resume();
// Now instance will run the job queue again normally!
// Only now the instance will start executing the jobs that have been added above!
```

@@ -220,0 +220,0 @@

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