@stdlib/utils-parallel 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +24 -9
- package/SECURITY.md +5 -0
- package/docs/types/index.d.ts +1 -1
- package/lib/node/worker/worker.js +1 -1
- package/package.json +15 -12
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -57,9 +57,11 @@ var parallel = require( '@stdlib/utils-parallel' );
|
|
|
57
57
|
|
|
58
58
|
Executes scripts in parallel.
|
|
59
59
|
|
|
60
|
+
<!-- FIXME: revert back to JavaScript once can handle errors -->
|
|
61
|
+
|
|
60
62
|
<!-- run-disable -->
|
|
61
63
|
|
|
62
|
-
```
|
|
64
|
+
```text
|
|
63
65
|
var files = [
|
|
64
66
|
'./a.js',
|
|
65
67
|
'./b.js'
|
|
@@ -89,9 +91,11 @@ The function accepts the following `options`:
|
|
|
89
91
|
|
|
90
92
|
By default, the number of workers running scripts is equal to the number of CPUs minus `1` (master process). To adjust the number of workers, set the `workers` option.
|
|
91
93
|
|
|
94
|
+
<!-- FIXME: revert back to JavaScript once can handle errors -->
|
|
95
|
+
|
|
92
96
|
<!-- run-disable -->
|
|
93
97
|
|
|
94
|
-
```
|
|
98
|
+
```text
|
|
95
99
|
var files = [
|
|
96
100
|
'./a.js',
|
|
97
101
|
'./b.js'
|
|
@@ -115,9 +119,11 @@ parallel( files, opts, done );
|
|
|
115
119
|
|
|
116
120
|
By default, the number of scripts running concurrently is equal to the number of workers. To adjust the concurrency, set the `concurrency` option.
|
|
117
121
|
|
|
122
|
+
<!-- FIXME: revert back to JavaScript once can handle errors -->
|
|
123
|
+
|
|
118
124
|
<!-- run-disable -->
|
|
119
125
|
|
|
120
|
-
```
|
|
126
|
+
```text
|
|
121
127
|
var files = [
|
|
122
128
|
'./a.js',
|
|
123
129
|
'./b.js'
|
|
@@ -149,9 +155,11 @@ $ node <script_path>
|
|
|
149
155
|
|
|
150
156
|
To run scripts via an alternative executable or none at all, set the `cmd` option.
|
|
151
157
|
|
|
158
|
+
<!-- FIXME: revert back to JavaScript once can handle errors -->
|
|
159
|
+
|
|
152
160
|
<!-- run-disable -->
|
|
153
161
|
|
|
154
|
-
```
|
|
162
|
+
```text
|
|
155
163
|
var files = [
|
|
156
164
|
'./a.js',
|
|
157
165
|
'./b.js'
|
|
@@ -175,9 +183,11 @@ parallel( files, opts, done );
|
|
|
175
183
|
|
|
176
184
|
By default, the `stdio` output for each script is interleaved; i.e., the `stdio` output from one script **may** be interleaved with the `stdio` output from one or more other scripts. To preserve the `stdio` output order for each script, set the `ordered` option to `true`.
|
|
177
185
|
|
|
186
|
+
<!-- FIXME: revert back to JavaScript once can handle errors -->
|
|
187
|
+
|
|
178
188
|
<!-- run-disable -->
|
|
179
189
|
|
|
180
|
-
```
|
|
190
|
+
```text
|
|
181
191
|
var files = [
|
|
182
192
|
'./a.js',
|
|
183
193
|
'./b.js'
|
|
@@ -220,9 +230,11 @@ parallel( files, opts, done );
|
|
|
220
230
|
|
|
221
231
|
## Examples
|
|
222
232
|
|
|
233
|
+
<!-- FIXME: re-enable running of code block once able to set `maxBuffer` configuration -->
|
|
234
|
+
|
|
223
235
|
<!-- run-disable -->
|
|
224
236
|
|
|
225
|
-
<!--
|
|
237
|
+
<!-- eslint-disable node/no-sync -->
|
|
226
238
|
|
|
227
239
|
<!-- eslint no-undef: "error" -->
|
|
228
240
|
|
|
@@ -363,7 +375,7 @@ See [LICENSE][stdlib-license].
|
|
|
363
375
|
|
|
364
376
|
## Copyright
|
|
365
377
|
|
|
366
|
-
Copyright © 2016-
|
|
378
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
367
379
|
|
|
368
380
|
</section>
|
|
369
381
|
|
|
@@ -378,8 +390,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
378
390
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-parallel.svg
|
|
379
391
|
[npm-url]: https://npmjs.org/package/@stdlib/utils-parallel
|
|
380
392
|
|
|
381
|
-
[test-image]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
382
|
-
[test-url]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml?query=branch:v0.
|
|
393
|
+
[test-image]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml/badge.svg?branch=v0.3.0
|
|
394
|
+
[test-url]: https://github.com/stdlib-js/utils-parallel/actions/workflows/test.yml?query=branch:v0.3.0
|
|
383
395
|
|
|
384
396
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-parallel/main.svg
|
|
385
397
|
[coverage-url]: https://codecov.io/github/stdlib-js/utils-parallel?branch=main
|
|
@@ -406,8 +418,11 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
406
418
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
407
419
|
|
|
408
420
|
[deno-url]: https://github.com/stdlib-js/utils-parallel/tree/deno
|
|
421
|
+
[deno-readme]: https://github.com/stdlib-js/utils-parallel/blob/deno/README.md
|
|
409
422
|
[umd-url]: https://github.com/stdlib-js/utils-parallel/tree/umd
|
|
423
|
+
[umd-readme]: https://github.com/stdlib-js/utils-parallel/blob/umd/README.md
|
|
410
424
|
[esm-url]: https://github.com/stdlib-js/utils-parallel/tree/esm
|
|
425
|
+
[esm-readme]: https://github.com/stdlib-js/utils-parallel/blob/esm/README.md
|
|
411
426
|
[branches-url]: https://github.com/stdlib-js/utils-parallel/blob/main/branches.md
|
|
412
427
|
|
|
413
428
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-parallel/main/LICENSE
|
package/SECURITY.md
ADDED
package/docs/types/index.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ declare function parallel( files: Array<string>, clbk: Callback ): void;
|
|
|
133
133
|
*
|
|
134
134
|
* parallel( files, opts, done );
|
|
135
135
|
*/
|
|
136
|
-
declare function parallel( files: Array<string>, options: Options, clbk: Callback ): void;
|
|
136
|
+
declare function parallel( files: Array<string>, options: Options, clbk: Callback ): void;
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
// EXPORTS //
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/utils-parallel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Execute scripts in parallel.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -39,17 +39,20 @@
|
|
|
39
39
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@stdlib/assert-has-own-property": "^0.1.
|
|
43
|
-
"@stdlib/assert-is-boolean": "^0.
|
|
44
|
-
"@stdlib/assert-is-function": "^0.
|
|
45
|
-
"@stdlib/assert-is-nonnegative-integer": "^0.
|
|
46
|
-
"@stdlib/assert-is-plain-object": "^0.
|
|
47
|
-
"@stdlib/assert-is-positive-integer": "^0.
|
|
48
|
-
"@stdlib/assert-is-string": "^0.
|
|
49
|
-
"@stdlib/assert-is-string-array": "^0.
|
|
50
|
-
"@stdlib/os-num-cpus": "^0.
|
|
51
|
-
"@stdlib/process-cwd": "^0.
|
|
52
|
-
"@stdlib/
|
|
42
|
+
"@stdlib/assert-has-own-property": "^0.1.1",
|
|
43
|
+
"@stdlib/assert-is-boolean": "^0.2.0",
|
|
44
|
+
"@stdlib/assert-is-function": "^0.2.0",
|
|
45
|
+
"@stdlib/assert-is-nonnegative-integer": "^0.2.0",
|
|
46
|
+
"@stdlib/assert-is-plain-object": "^0.2.0",
|
|
47
|
+
"@stdlib/assert-is-positive-integer": "^0.2.0",
|
|
48
|
+
"@stdlib/assert-is-string": "^0.2.0",
|
|
49
|
+
"@stdlib/assert-is-string-array": "^0.2.0",
|
|
50
|
+
"@stdlib/os-num-cpus": "^0.2.0",
|
|
51
|
+
"@stdlib/process-cwd": "^0.2.0",
|
|
52
|
+
"@stdlib/process-env": "^0.2.0",
|
|
53
|
+
"@stdlib/string-format": "^0.2.0",
|
|
54
|
+
"@stdlib/utils-keys": "^0.2.0",
|
|
55
|
+
"debug": "^2.6.9"
|
|
53
56
|
},
|
|
54
57
|
"devDependencies": {
|
|
55
58
|
"proxyquire": "^2.0.0",
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
title: stdlib
|
|
3
|
-
message: >-
|
|
4
|
-
If you use this software, please cite it using the
|
|
5
|
-
metadata from this file.
|
|
6
|
-
|
|
7
|
-
type: software
|
|
8
|
-
|
|
9
|
-
authors:
|
|
10
|
-
- name: The Stdlib Authors
|
|
11
|
-
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
-
|
|
13
|
-
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
-
url: https://stdlib.io
|
|
15
|
-
|
|
16
|
-
abstract: |
|
|
17
|
-
Standard library for JavaScript and Node.js.
|
|
18
|
-
|
|
19
|
-
keywords:
|
|
20
|
-
- JavaScript
|
|
21
|
-
- Node.js
|
|
22
|
-
- TypeScript
|
|
23
|
-
- standard library
|
|
24
|
-
- scientific computing
|
|
25
|
-
- numerical computing
|
|
26
|
-
- statistical computing
|
|
27
|
-
|
|
28
|
-
license: Apache-2.0 AND BSL-1.0
|
|
29
|
-
|
|
30
|
-
date-released: 2016
|