@xylabs/threads 4.5.10 → 4.6.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.
Files changed (2) hide show
  1. package/eslint.config.mjs +35 -0
  2. package/package.json +81 -81
@@ -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.5.10",
3
+ "version": "4.6.0",
4
4
  "description": "Web workers & worker threads as simple as a function call",
5
- "license": "MIT",
6
- "main": "dist/index.js",
7
- "module": "dist/esm/index.js",
8
- "types": "dist/index.d.ts",
9
- "scripts": {
10
- "package-compile": "echo COMPILE && yarn build-threads && echo COMPILE_DONE",
11
- "package-build": "echo BUILD && yarn build-threads && echo BUILD_DONE",
12
- "clean": "rimraf ./dist ./dist-esm",
13
- "dev": "yarn clean && tsc -p tsconfig.json --watch",
14
- "build-threads": "yarn clean && yarn build:cjs && yarn build:es",
15
- "build:cjs": "tsc -p tsconfig.json",
16
- "build:es": "tsc -p tsconfig-esm.json",
17
- "postbuild": "yarn bundle",
18
- "bundle": "rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist/esm/worker/bundle-entry.js",
19
- "test": "yarn test:library && yarn test:tooling && yarn test:puppeteer:basic && yarn test:puppeteer:webpack",
20
- "test:library": "cross-env TS_NODE_FILES=true vitest ./test/**/*.test.ts",
21
- "test:tooling": "cross-env TS_NODE_FILES=true vitest ./test-tooling/**/*.test.ts",
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,62 @@
58
64
  "default": "./dist/esm/worker/index.js"
59
65
  }
60
66
  },
61
- "sideEffects": [
62
- "./dist*/master/register.js",
63
- "./dist*/worker/index.js",
64
- "./register.*js",
65
- "./worker.*js"
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
- "repository": {
68
- "type": "git",
69
- "url": "git+https://github.com/andywer/threads.js.git"
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
+ "postbuild": "yarn bundle",
103
+ "prepare": "yarn build-threads",
104
+ "test": "yarn test:library && yarn test:tooling && yarn test:puppeteer:basic && yarn test:puppeteer:webpack",
105
+ "test:library": "cross-env TS_NODE_FILES=true vitest ./test/**/*.test.ts",
106
+ "test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
107
+ "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",
108
+ "test:tooling": "cross-env TS_NODE_FILES=true vitest ./test-tooling/**/*.test.ts"
70
109
  },
71
- "author": "Andy Wermke (https://github.com/andywer)",
72
- "bugs": {
73
- "url": "git+https://github.com/andywer/threads.js/issues"
110
+ "ava": {
111
+ "extensions": [
112
+ "ts"
113
+ ],
114
+ "files": [
115
+ "./test/**/*.test.ts",
116
+ "./test-tooling/**/*.test.ts"
117
+ ],
118
+ "require": [
119
+ "ts-node/register"
120
+ ],
121
+ "serial": true
74
122
  },
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
123
  "dependencies": {
88
124
  "callsites-3-1-0": "npm:callsites@3.1.0",
89
125
  "debug": "^4.4.0",
@@ -112,43 +148,7 @@
112
148
  "optionalDependencies": {
113
149
  "tiny-worker": "^2.3.0"
114
150
  },
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
151
  "publishConfig": {
146
152
  "access": "public"
147
- },
148
- "files": [
149
- "dist/**",
150
- "*.js",
151
- "*.mjs",
152
- "*.ts"
153
- ]
153
+ }
154
154
  }