1 | {
|
2 | "name": "threads",
|
3 | "version": "1.7.0",
|
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 | "scripts": {
|
9 | "clean": "rimraf dist/ dist-esm/",
|
10 | "dev": "npm run clean && tsc -p tsconfig.json --watch",
|
11 | "build": "npm run clean && npm run build:cjs && npm run build:es",
|
12 | "build:cjs": "tsc -p tsconfig.json",
|
13 | "build:es": "tsc -p tsconfig-esm.json",
|
14 | "postbuild": "npm run bundle",
|
15 | "bundle": "rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist-esm/worker/bundle-entry.js",
|
16 | "test": "npm run test:library && npm run test:tooling && npm run test:puppeteer:basic && npm run test:puppeteer:webpack",
|
17 | "test:library": "cross-env TS_NODE_FILES=true ava ./test/**/*.test.ts",
|
18 | "test:tooling": "cross-env TS_NODE_FILES=true ava ./test-tooling/**/*.test.ts",
|
19 | "test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
|
20 | "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",
|
21 | "posttest": "tslint --project .",
|
22 | "prepare": "npm run build"
|
23 | },
|
24 | "exports": {
|
25 | ".": {
|
26 | "require": "./dist/index.js",
|
27 | "default": "./index.mjs"
|
28 | },
|
29 | "./observable": {
|
30 | "require": "./observable.js",
|
31 | "default": "./observable.mjs"
|
32 | },
|
33 | "./register": {
|
34 | "require": "./register.js",
|
35 | "default": "./register.mjs"
|
36 | },
|
37 | "./worker": {
|
38 | "require": "./worker.js",
|
39 | "default": "./worker.mjs"
|
40 | }
|
41 | },
|
42 | "sideEffects": [
|
43 | "./dist*/master/register.js",
|
44 | "./dist*/worker/index.js",
|
45 | "./register.*js",
|
46 | "./worker.*js"
|
47 | ],
|
48 | "repository": {
|
49 | "type": "git",
|
50 | "url": "git+https://github.com/andywer/threads.js.git"
|
51 | },
|
52 | "author": "Andy Wermke (https://github.com/andywer)",
|
53 | "bugs": {
|
54 | "url": "https://github.com/andywer/threads.js/issues"
|
55 | },
|
56 | "funding": "https://github.com/andywer/threads.js?sponsor=1",
|
57 | "homepage": "https://threads.js.org",
|
58 | "keywords": [
|
59 | "thread",
|
60 | "worker",
|
61 | "pool",
|
62 | "spawn",
|
63 | "isomorphic",
|
64 | "parallel",
|
65 | "observable",
|
66 | "worker_threads"
|
67 | ],
|
68 | "dependencies": {
|
69 | "callsites": "^3.1.0",
|
70 | "debug": "^4.2.0",
|
71 | "is-observable": "^2.1.0",
|
72 | "observable-fns": "^0.6.1"
|
73 | },
|
74 | "devDependencies": {
|
75 | "@rollup/plugin-commonjs": "^16.0.0",
|
76 | "@rollup/plugin-node-resolve": "^10.0.0",
|
77 | "@types/chai": "^4.2.14",
|
78 | "@types/debug": "^4.1.5",
|
79 | "@types/execa": "^2.0.0",
|
80 | "@types/mocha": "^8.0.3",
|
81 | "@types/node": "^14.14.5",
|
82 | "@types/webpack": "^4.41.23",
|
83 | "ava": "^3.13.0",
|
84 | "chai": "^4.2.0",
|
85 | "cross-env": "^7.0.2",
|
86 | "execa": "^4.0.3",
|
87 | "mocha": "^8.2.0",
|
88 | "puppet-run": "^0.11.3",
|
89 | "puppet-run-plugin-mocha": "^0.10.0-alpha",
|
90 | "raw-loader": "^4.0.2",
|
91 | "rimraf": "^3.0.2",
|
92 | "rollup": "^2.32.1",
|
93 | "threads-plugin": "^1.3.3",
|
94 | "tiny-worker": "^2.2.0",
|
95 | "ts-loader": "^8.0.7",
|
96 | "ts-node": "^9.0.0",
|
97 | "tslint": "^6.1.3",
|
98 | "tslint-config-prettier": "^1.18.0",
|
99 | "typescript": "^4.2.3",
|
100 | "wavy": "^1.0.4",
|
101 | "webpack": "^4.44.2",
|
102 | "worker-plugin": "^5.0.0"
|
103 | },
|
104 | "optionalDependencies": {
|
105 | "tiny-worker": ">= 2"
|
106 | },
|
107 | "ava": {
|
108 | "extensions": [
|
109 | "ts"
|
110 | ],
|
111 | "files": [
|
112 | "./test/**/*.test.ts",
|
113 | "./test-tooling/**/*.test.ts"
|
114 | ],
|
115 | "require": [
|
116 | "ts-node/register"
|
117 | ],
|
118 | "serial": true
|
119 | },
|
120 | "browser": {
|
121 | "callsites": false,
|
122 | "tiny-worker": false,
|
123 | "ts-node": false,
|
124 | "ts-node/register": false,
|
125 | "worker_threads": false,
|
126 | "./dist/master/implementation.js": "./dist/master/implementation.browser.js",
|
127 | "./dist/master/implementation.node.js": false,
|
128 | "./dist/worker/implementation.js": "./dist/worker/implementation.browser.js",
|
129 | "./dist/worker/implementation.tiny-worker.js": false,
|
130 | "./dist/worker/implementation.worker_threads.js": false,
|
131 | "./dist-esm/master/implementation.js": "./dist-esm/master/implementation.browser.js",
|
132 | "./dist-esm/master/implementation.node.js": false,
|
133 | "./dist-esm/worker/implementation.js": "./dist-esm/worker/implementation.browser.js",
|
134 | "./dist-esm/worker/implementation.tiny-worker.js": false,
|
135 | "./dist-esm/worker/implementation.worker_threads.js": false
|
136 | },
|
137 | "files": [
|
138 | "dist/**",
|
139 | "dist-esm/**",
|
140 | "*.js",
|
141 | "*.mjs",
|
142 | "*.ts"
|
143 | ]
|
144 | }
|