@xylabs/threads 4.5.10 → 4.6.1
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/eslint.config.mjs +35 -0
- package/package.json +90 -88
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
typescriptConfig,
|
|
3
|
+
unicornConfig,
|
|
4
|
+
workspacesConfig,
|
|
5
|
+
rulesConfig,
|
|
6
|
+
importConfig,
|
|
7
|
+
} from '@xylabs/eslint-config-flat'
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
{ ignores: ['.yarn', 'dist', '**/dist/**',
|
|
11
|
+
'build', '**/build/**', 'node_modules/**', 'public', 'storybook-static', 'eslint.config.mjs',
|
|
12
|
+
'rollup.config.js', 'test-tooling', 'test', 'types', 'worker.*', '*.mjs', '*.d.ts', '*.js'] },
|
|
13
|
+
unicornConfig,
|
|
14
|
+
workspacesConfig,
|
|
15
|
+
rulesConfig,
|
|
16
|
+
typescriptConfig,
|
|
17
|
+
importConfig,
|
|
18
|
+
{
|
|
19
|
+
rules: {
|
|
20
|
+
'no-restricted-syntax': ['off'],
|
|
21
|
+
'no-restricted-imports': [
|
|
22
|
+
'warn',
|
|
23
|
+
{
|
|
24
|
+
paths: [
|
|
25
|
+
...rulesConfig.rules['no-restricted-imports'][1].paths,
|
|
26
|
+
'@xyo-network/*',
|
|
27
|
+
'lodash',
|
|
28
|
+
'lodash-es',
|
|
29
|
+
'@xylabs/lodash',
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
]
|
package/package.json
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/threads",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.1",
|
|
4
4
|
"description": "Web workers & worker threads as simple as a function call",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
|
|
23
|
-
"test:puppeteer:webpack": "puppet-run --serve ./test-tooling/webpack/dist/app.web/0.worker.js --serve ./test-tooling/webpack/dist/app.web/1.worker.js --plugin=mocha ./test-tooling/webpack/webpack.chromium.mocha.ts",
|
|
24
|
-
"prepare": "yarn build-threads"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"thread",
|
|
7
|
+
"worker",
|
|
8
|
+
"pool",
|
|
9
|
+
"spawn",
|
|
10
|
+
"isomorphic",
|
|
11
|
+
"parallel",
|
|
12
|
+
"observable",
|
|
13
|
+
"worker_threads"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://threads.js.org",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "git+https://github.com/andywer/threads.js/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/andywer/threads.js.git"
|
|
25
22
|
},
|
|
23
|
+
"funding": "https://github.com/andywer/threads.js?sponsor=1",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Andy Wermke (https://github.com/andywer)",
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"./dist*/master/register.js",
|
|
28
|
+
"./dist*/worker/index.js",
|
|
29
|
+
"./register.*js",
|
|
30
|
+
"./worker.*js"
|
|
31
|
+
],
|
|
26
32
|
"exports": {
|
|
27
33
|
".": {
|
|
28
34
|
"types": "./dist/index.d.ts",
|
|
@@ -58,32 +64,63 @@
|
|
|
58
64
|
"default": "./dist/esm/worker/index.js"
|
|
59
65
|
}
|
|
60
66
|
},
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"./
|
|
65
|
-
"./
|
|
67
|
+
"main": "dist/index.js",
|
|
68
|
+
"module": "dist/esm/index.js",
|
|
69
|
+
"browser": {
|
|
70
|
+
"./dist/esm/master/implementation.js": "./dist/esm/master/implementation.browser.js",
|
|
71
|
+
"./dist/esm/master/implementation.node.js": false,
|
|
72
|
+
"./dist/esm/worker/implementation.js": "./dist/esm/worker/implementation.browser.js",
|
|
73
|
+
"./dist/esm/worker/implementation.tiny-worker.js": false,
|
|
74
|
+
"./dist/esm/worker/implementation.worker_threads.js": false,
|
|
75
|
+
"./dist/master/implementation.js": "./dist/master/implementation.browser.js",
|
|
76
|
+
"./dist/master/implementation.node.js": false,
|
|
77
|
+
"./dist/worker/implementation.js": "./dist/worker/implementation.browser.js",
|
|
78
|
+
"./dist/worker/implementation.tiny-worker.js": false,
|
|
79
|
+
"./dist/worker/implementation.worker_threads.js": false,
|
|
80
|
+
"callsites": false,
|
|
81
|
+
"tiny-worker": false,
|
|
82
|
+
"ts-node": false,
|
|
83
|
+
"ts-node/register": false,
|
|
84
|
+
"worker_threads": false
|
|
85
|
+
},
|
|
86
|
+
"types": "dist/index.d.ts",
|
|
87
|
+
"files": [
|
|
88
|
+
"dist/**",
|
|
89
|
+
"*.js",
|
|
90
|
+
"*.mjs",
|
|
91
|
+
"*.ts"
|
|
66
92
|
],
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
93
|
+
"scripts": {
|
|
94
|
+
"build-threads": "yarn clean && yarn build:cjs && yarn build:es",
|
|
95
|
+
"build:cjs": "tsc -p tsconfig.json",
|
|
96
|
+
"build:es": "tsc -p tsconfig-esm.json",
|
|
97
|
+
"bundle": "rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist/esm/worker/bundle-entry.js",
|
|
98
|
+
"clean": "rimraf ./dist ./dist-esm",
|
|
99
|
+
"dev": "yarn clean && tsc -p tsconfig.json --watch",
|
|
100
|
+
"package-build": "echo BUILD && yarn build-threads && echo BUILD_DONE",
|
|
101
|
+
"package-compile": "echo COMPILE && yarn build-threads && echo COMPILE_DONE",
|
|
102
|
+
"package-publint": "echo Skipping Publint - @xylabs/threads",
|
|
103
|
+
"postbuild": "yarn bundle",
|
|
104
|
+
"prepare": "yarn build-threads",
|
|
105
|
+
"test": "yarn test:library && yarn test:tooling && yarn test:puppeteer:basic && yarn test:puppeteer:webpack",
|
|
106
|
+
"test:library": "cross-env TS_NODE_FILES=true vitest ./test/**/*.test.ts",
|
|
107
|
+
"test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
|
|
108
|
+
"test:puppeteer:webpack": "puppet-run --serve ./test-tooling/webpack/dist/app.web/0.worker.js --serve ./test-tooling/webpack/dist/app.web/1.worker.js --plugin=mocha ./test-tooling/webpack/webpack.chromium.mocha.ts",
|
|
109
|
+
"test:tooling": "cross-env TS_NODE_FILES=true vitest ./test-tooling/**/*.test.ts"
|
|
70
110
|
},
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
111
|
+
"ava": {
|
|
112
|
+
"extensions": [
|
|
113
|
+
"ts"
|
|
114
|
+
],
|
|
115
|
+
"files": [
|
|
116
|
+
"./test/**/*.test.ts",
|
|
117
|
+
"./test-tooling/**/*.test.ts"
|
|
118
|
+
],
|
|
119
|
+
"require": [
|
|
120
|
+
"ts-node/register"
|
|
121
|
+
],
|
|
122
|
+
"serial": true
|
|
74
123
|
},
|
|
75
|
-
"funding": "https://github.com/andywer/threads.js?sponsor=1",
|
|
76
|
-
"homepage": "https://threads.js.org",
|
|
77
|
-
"keywords": [
|
|
78
|
-
"thread",
|
|
79
|
-
"worker",
|
|
80
|
-
"pool",
|
|
81
|
-
"spawn",
|
|
82
|
-
"isomorphic",
|
|
83
|
-
"parallel",
|
|
84
|
-
"observable",
|
|
85
|
-
"worker_threads"
|
|
86
|
-
],
|
|
87
124
|
"dependencies": {
|
|
88
125
|
"callsites-3-1-0": "npm:callsites@3.1.0",
|
|
89
126
|
"debug": "^4.4.0",
|
|
@@ -91,64 +128,29 @@
|
|
|
91
128
|
"observable-fns": "^0.6.1"
|
|
92
129
|
},
|
|
93
130
|
"devDependencies": {
|
|
94
|
-
"@babel/types": "^7.26.
|
|
95
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
96
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
131
|
+
"@babel/types": "^7.26.10",
|
|
132
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
133
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
97
134
|
"@types/debug": "^4.1.12",
|
|
98
|
-
"@types/node": "^22.13.
|
|
99
|
-
"@xylabs/
|
|
135
|
+
"@types/node": "^22.13.10",
|
|
136
|
+
"@xylabs/eslint-config-flat": "^6.1.3",
|
|
137
|
+
"@xylabs/ts-scripts-yarn3": "^6.1.3",
|
|
100
138
|
"cross-env": "^7.0.3",
|
|
101
139
|
"puppet-run": "^0.11.4",
|
|
102
140
|
"raw-loader": "^4.0.2",
|
|
103
141
|
"rimraf": "^6.0.1",
|
|
104
|
-
"rollup": "^4.
|
|
142
|
+
"rollup": "^4.36.0",
|
|
105
143
|
"threads-plugin": "^1.4.0",
|
|
106
144
|
"tiny-worker": "^2.3.0",
|
|
107
145
|
"tslib": "^2.8.1",
|
|
108
146
|
"typescript": "^5.8.2",
|
|
109
|
-
"vitest": "^3.0.
|
|
147
|
+
"vitest": "^3.0.9",
|
|
110
148
|
"webpack": "^5.98.0"
|
|
111
149
|
},
|
|
112
150
|
"optionalDependencies": {
|
|
113
151
|
"tiny-worker": "^2.3.0"
|
|
114
152
|
},
|
|
115
|
-
"ava": {
|
|
116
|
-
"extensions": [
|
|
117
|
-
"ts"
|
|
118
|
-
],
|
|
119
|
-
"files": [
|
|
120
|
-
"./test/**/*.test.ts",
|
|
121
|
-
"./test-tooling/**/*.test.ts"
|
|
122
|
-
],
|
|
123
|
-
"require": [
|
|
124
|
-
"ts-node/register"
|
|
125
|
-
],
|
|
126
|
-
"serial": true
|
|
127
|
-
},
|
|
128
|
-
"browser": {
|
|
129
|
-
"./dist/esm/master/implementation.js": "./dist/esm/master/implementation.browser.js",
|
|
130
|
-
"./dist/esm/master/implementation.node.js": false,
|
|
131
|
-
"./dist/esm/worker/implementation.js": "./dist/esm/worker/implementation.browser.js",
|
|
132
|
-
"./dist/esm/worker/implementation.tiny-worker.js": false,
|
|
133
|
-
"./dist/esm/worker/implementation.worker_threads.js": false,
|
|
134
|
-
"./dist/master/implementation.js": "./dist/master/implementation.browser.js",
|
|
135
|
-
"./dist/master/implementation.node.js": false,
|
|
136
|
-
"./dist/worker/implementation.js": "./dist/worker/implementation.browser.js",
|
|
137
|
-
"./dist/worker/implementation.tiny-worker.js": false,
|
|
138
|
-
"./dist/worker/implementation.worker_threads.js": false,
|
|
139
|
-
"callsites": false,
|
|
140
|
-
"tiny-worker": false,
|
|
141
|
-
"ts-node": false,
|
|
142
|
-
"ts-node/register": false,
|
|
143
|
-
"worker_threads": false
|
|
144
|
-
},
|
|
145
153
|
"publishConfig": {
|
|
146
154
|
"access": "public"
|
|
147
|
-
}
|
|
148
|
-
"files": [
|
|
149
|
-
"dist/**",
|
|
150
|
-
"*.js",
|
|
151
|
-
"*.mjs",
|
|
152
|
-
"*.ts"
|
|
153
|
-
]
|
|
155
|
+
}
|
|
154
156
|
}
|