@tsdotnet/parallel 2.0.6 → 2.0.9

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 electricessence (Oren F.)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 electricessence (Oren F.)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,17 +1,16 @@
1
- # ![alt text](https://avatars1.githubusercontent.com/u/64487547?s=30 "tsdotnet") tsdotnet / parallel
2
-
3
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/parallel/blob/master/LICENSE)
4
- ![npm-publish](https://github.com/tsdotnet/parallel/workflows/npm-publish/badge.svg)
5
- [![npm version](https://img.shields.io/npm/v/@tsdotnet/parallel.svg?style=flat-square)](https://www.npmjs.com/package/@tsdotnet/parallel)
6
-
7
- A utility for automatically partitioning tasks (promises) and executing them in parallel using separate processes or web workers.
8
-
9
- ## Docs
10
-
11
- [tsdotnet.github.io/parallel](https://tsdotnet.github.io/parallel/)
12
-
13
- ## Demo
14
-
15
- [**Genetic Algorithm Parallelized (multi-process) in NodeJS & Browser!**](https://youtu.be/gy-cQuEMfqs)
16
-
17
- [![Genetic Algorithm Parallelized (multi-process) in NodeJS & Browser!](https://i.ytimg.com/vi/gy-cQuEMfqs/hqdefault.jpg?sqp=-oaymwEZCNACELwBSFXyq4qpAwsIARUAAIhCGAFwAQ==&rs=AOn4CLDBsZWDiGqlR0F70gDJwmPIB5W57w)](https://youtu.be/gy-cQuEMfqs)
1
+ # ![alt text](https://avatars1.githubusercontent.com/u/64487547?s=30 "tsdotnet") tsdotnet / parallel
2
+
3
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/parallel/blob/master/LICENSE)
4
+ [![npm version](https://img.shields.io/npm/v/@tsdotnet/parallel.svg?style=flat-square)](https://www.npmjs.com/package/@tsdotnet/parallel)
5
+
6
+ A utility for automatically partitioning tasks (promises) and executing them in parallel using separate processes or web workers.
7
+
8
+ ## Docs
9
+
10
+ [tsdotnet.github.io/parallel](https://tsdotnet.github.io/parallel/)
11
+
12
+ ## Demo
13
+
14
+ [**Genetic Algorithm Parallelized (multi-process) in NodeJS & Browser!**](https://youtu.be/gy-cQuEMfqs)
15
+
16
+ [![Genetic Algorithm Parallelized (multi-process) in NodeJS & Browser!](https://i.ytimg.com/vi/gy-cQuEMfqs/hqdefault.jpg?sqp=-oaymwEZCNACELwBSFXyq4qpAwsIARUAAIhCGAFwAQ==&rs=AOn4CLDBsZWDiGqlR0F70gDJwmPIB5W57w)](https://youtu.be/gy-cQuEMfqs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsdotnet/parallel",
3
- "version": "2.0.6",
3
+ "version": "2.0.9",
4
4
  "description": "A utility for automatically partitioning tasks (promises) and executing them in parallel using separate processes or web workers.",
5
5
  "author": "electricessence",
6
6
  "license": "MIT",
@@ -19,23 +19,6 @@
19
19
  "worker",
20
20
  "parallel"
21
21
  ],
22
- "scripts": {
23
- "clean": "rimraf dist",
24
- "build:types": "cpy \"src/**/*.d.ts\" dist/types --parents && tsc -p tsconfig.types.json",
25
- "build:esm": "rollup -c rollup.config.js",
26
- "build:cjs": "tsc -p tsconfig.cjs.json",
27
- "build": "pnpm clean && pnpm build:types && pnpm build:esm && pnpm build:cjs && pnpm typecheck:tests",
28
- "test": "vitest run",
29
- "typecheck": "tsc --noEmit",
30
- "typecheck:tests": "tsc -p tests/tsconfig.json --noEmit",
31
- "lint": "eslint src/**/*.ts",
32
- "docs": "rimraf docs && typedoc --options typedoc.json --readme none",
33
- "bump": "pnpm run precommit && pnpm version patch",
34
- "precommit": "pnpm build && pnpm test && pnpm lint && git status -s",
35
- "preversion": "pnpm lint && pnpm test",
36
- "postversion": "git push && git push --tags && pnpm run docs && git add -A && git commit -m \"Updated docs.\" docs && git push",
37
- "prepublishOnly": "pnpm build && pnpm test && pnpm lint"
38
- },
39
22
  "repository": {
40
23
  "type": "git",
41
24
  "url": "git+https://github.com/tsdotnet/parallel.git"
@@ -45,47 +28,43 @@
45
28
  },
46
29
  "homepage": "https://github.com/tsdotnet/parallel#readme",
47
30
  "devDependencies": {
48
- "@eslint/js": "^9.34.0",
49
- "@rollup/plugin-typescript": "^12.1.4",
50
- "@types/node": "^24.3.0",
51
- "@vitest/coverage-v8": "^3.2.4",
52
- "cpy-cli": "^6.0.0",
53
- "eslint": "^9.34.0",
54
- "jsdom": "^26.1.0",
55
- "rimraf": "^6.0.1",
56
- "rollup": "^4.48.0",
57
- "typedoc": "^0.28.10",
58
- "typescript": "^5.9.2",
59
- "typescript-eslint": "^8.40.0",
60
- "vitest": "^3.2.4"
31
+ "@eslint/js": "^10.0.1",
32
+ "@rollup/plugin-typescript": "^12.3.0",
33
+ "@types/node": "^25.5.0",
34
+ "@vitest/coverage-v8": "^4.1.0",
35
+ "cpy-cli": "^7.0.0",
36
+ "eslint": "^10.0.3",
37
+ "jsdom": "^29.0.0",
38
+ "rimraf": "^6.1.3",
39
+ "rollup": "^4.59.0",
40
+ "typedoc": "^0.28.17",
41
+ "typescript": "^5.9.3",
42
+ "typescript-eslint": "^8.57.1",
43
+ "vitest": "^4.1.0"
61
44
  },
62
45
  "dependencies": {
63
- "@tsdotnet/disposable": "^2.0.1",
64
- "@tsdotnet/object-pool": "^2.0.0",
65
- "@tsdotnet/promises": "^2.0.7",
66
- "@tsdotnet/stopwatch": "^2.0.3",
67
- "@tsdotnet/threading": "^2.0.5",
46
+ "@tsdotnet/disposable": "^2.0.3",
47
+ "@tsdotnet/object-pool": "^2.0.5",
48
+ "@tsdotnet/promises": "^2.0.11",
49
+ "@tsdotnet/stopwatch": "^2.0.8",
50
+ "@tsdotnet/threading": "^2.0.13",
68
51
  "tslib": "^2.8.1"
69
52
  },
70
- "pnpm": {
71
- "overrides": {
72
- "hosted-git-info@<2.8.9": ">=2.8.9",
73
- "y18n@=4.0.0": ">=4.0.1",
74
- "lodash@<4.17.20": ">=4.17.20",
75
- "shell-quote@<=1.7.2": ">=1.7.3",
76
- "lodash@<4.17.21": ">=4.17.21",
77
- "json5@<1.0.2": ">=1.0.2",
78
- "json5@>=2.0.0 <2.2.2": ">=2.2.2",
79
- "minimatch@<3.0.5": ">=3.0.5",
80
- "semver@<5.7.2": ">=5.7.2",
81
- "semver@>=6.0.0 <6.3.1": ">=6.3.1",
82
- "semver@>=7.0.0 <7.5.2": ">=7.5.2",
83
- "get-func-name@<2.0.1": ">=2.0.1",
84
- "@babel/traverse@<7.23.2": ">=7.23.2",
85
- "braces@<3.0.3": ">=3.0.3"
86
- },
87
- "ignoredBuiltDependencies": [
88
- "esbuild"
89
- ]
53
+ "scripts": {
54
+ "clean": "rimraf dist",
55
+ "copy:dts": "cpy \"src/**/*.d.ts\" dist/types --parents || echo No .d.ts files to copy",
56
+ "build:types": "pnpm copy:dts && tsc -p tsconfig.types.json",
57
+ "build:esm": "rollup -c rollup.config.js",
58
+ "build:cjs": "tsc -p tsconfig.cjs.json",
59
+ "build": "pnpm clean && pnpm build:types && pnpm build:esm && pnpm build:cjs && pnpm typecheck:tests",
60
+ "test": "vitest run",
61
+ "typecheck": "tsc --noEmit",
62
+ "typecheck:tests": "tsc -p tests/tsconfig.json --noEmit",
63
+ "lint": "eslint src/**/*.ts",
64
+ "docs": "rimraf docs && typedoc --options typedoc.json --readme none",
65
+ "bump": "pnpm run precommit && pnpm version patch",
66
+ "precommit": "pnpm build && pnpm test && pnpm lint && git status -s",
67
+ "preversion": "pnpm lint && pnpm test",
68
+ "postversion": "git push && git push --tags && pnpm run docs && git add -A && git commit -m \"Updated docs.\" docs && git push"
90
69
  }
91
- }
70
+ }
package/eslint.config.mjs DELETED
@@ -1,37 +0,0 @@
1
- import eslint from '@eslint/js';
2
- import tseslint from 'typescript-eslint';
3
-
4
- export default tseslint.config(
5
- eslint.configs.recommended,
6
- ...tseslint.configs.recommended,
7
- {
8
- rules: {
9
- "semi": ["warn", "always"],
10
- "indent": ["warn", "tab", { "SwitchCase": 1 }],
11
- "@typescript-eslint/no-explicit-any": "off",
12
- "@typescript-eslint/no-namespace": "off",
13
- "@typescript-eslint/no-unused-vars": "off",
14
- // Disable all the problematic rules identified in the lint output
15
- "@typescript-eslint/ban-types": "off",
16
- "@typescript-eslint/no-this-alias": "off",
17
- "@typescript-eslint/no-var-requires": "off",
18
- "@typescript-eslint/no-require-imports": "off",
19
- "@typescript-eslint/no-unsafe-function-type": "off",
20
- "@typescript-eslint/no-unused-expressions": "off",
21
- "prefer-const": "off"
22
- },
23
- files: ['src/**/*.ts'],
24
- languageOptions: {
25
- ecmaVersion: 2022,
26
- sourceType: 'module',
27
- globals: {
28
- console: 'readonly',
29
- process: 'readonly'
30
- }
31
- },
32
- // Disable unused eslint-disable directive warnings
33
- linterOptions: {
34
- reportUnusedDisableDirectives: false
35
- }
36
- }
37
- );
package/rollup.config.js DELETED
@@ -1,56 +0,0 @@
1
- import { defineConfig } from 'rollup';
2
- import typescript from '@rollup/plugin-typescript';
3
- import { readFileSync } from 'node:fs';
4
-
5
- const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url)));
6
-
7
- export default defineConfig([
8
- // Main Parallel entry point
9
- {
10
- input: 'src/Parallel.ts',
11
- output: {
12
- dir: 'dist/esm',
13
- format: 'es',
14
- preserveModules: true,
15
- preserveModulesRoot: 'src',
16
- entryFileNames: '[name].js',
17
- sourcemap: true
18
- },
19
- external: [
20
- /^node:/,
21
- ...Object.keys(pkg.dependencies || {}),
22
- ...Object.keys(pkg.peerDependencies || {})
23
- ],
24
- plugins: [
25
- typescript({
26
- tsconfig: './tsconfig.esm.json',
27
- declaration: false,
28
- declarationMap: false,
29
- sourceMap: true,
30
- removeComments: true
31
- })
32
- ]
33
- },
34
- // eval.js worker script - standalone
35
- {
36
- input: 'src/eval.ts',
37
- output: {
38
- file: 'dist/esm/eval.js',
39
- format: 'es',
40
- sourcemap: true
41
- },
42
- plugins: [
43
- typescript({
44
- tsconfig: './tsconfig.esm.json',
45
- declaration: false,
46
- declarationMap: false,
47
- sourceMap: true,
48
- removeComments: true
49
- })
50
- ]
51
- }
52
- ]);
53
-
54
-
55
-
56
-
package/vitest.config.ts DELETED
@@ -1,22 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- globals: true,
6
- environment: 'jsdom', // Changed from 'node' to provide browser-like globals
7
- coverage: {
8
- enabled: true,
9
- reporter: ['text'],
10
- include: ['src/**/*.ts'],
11
- exclude: ['src/**/*.d.ts'],
12
- thresholds: {
13
- global: {
14
- branches: 80,
15
- functions: 80,
16
- lines: 80,
17
- statements: 80
18
- }
19
- }
20
- },
21
- },
22
- });