Comparing version 0.6.0 to 0.7.0
@@ -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 @@ |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
62749
48
727
Yes
21