thread-stream 3.0.0 → 3.0.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from 'events'
2
- import workerThreads from 'worker_threads'
2
+ import * as workerThreads from 'worker_threads'
3
3
 
4
4
  interface ThreadStreamOptions {
5
5
  /**
@@ -76,9 +76,8 @@ declare class ThreadStream extends EventEmitter {
76
76
  * @param args the arguments to be passed to the event handlers.
77
77
  * @returns {boolean} `true` if the event had listeners, `false` otherwise.
78
78
  */
79
- emit(eventName: string | symbol, ...args: any[]): boolean {
80
- return super.emit(eventName, ...args);
81
- }
79
+ emit(eventName: string | symbol, ...args: any[]): boolean;
80
+
82
81
  /**
83
82
  * Post a message to the Worker with specified data and an optional list of transferable objects.
84
83
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thread-stream",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "A streaming way to send data to a Node.js Worker Thread",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "fastbench": "^1.0.1",
16
16
  "husky": "^9.0.6",
17
17
  "pino-elasticsearch": "^8.0.0",
18
- "sonic-boom": "^3.0.0",
18
+ "sonic-boom": "^4.0.1",
19
19
  "standard": "^17.0.0",
20
20
  "tap": "^16.2.0",
21
21
  "ts-node": "^10.8.0",
@@ -23,7 +23,8 @@
23
23
  "why-is-node-running": "^2.2.2"
24
24
  },
25
25
  "scripts": {
26
- "test": "standard && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts",
26
+ "build": "tsc --noEmit",
27
+ "test": "standard && npm run build && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts",
27
28
  "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts",
28
29
  "test:ci:js": "tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \"test/**/*.test.*js\"",
29
30
  "test:ci:ts": "tap --ts --no-check-coverage --coverage-report=lcovonly \"test/**/*.test.*ts\"",
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "compilerOptions": {
3
+ "esModuleInterop": true
4
+ },
5
+ "files": [
6
+ "index.d.ts"
7
+ ],
8
+ }