rxjs-grpc-minimal 0.2.28 → 0.2.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rxjs-grpc-minimal",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "grpc node callback and streams wrapped in observables",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -32,8 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "debug-fabulous": "^2.0.1",
35
- "rxjs": "^7.8.1",
36
- "through2": "^4.0.2"
35
+ "rxjs": "^7.8.1"
37
36
  },
38
37
  "devDependencies": {
39
38
  "@commitlint/cli": "^20.4.1",
@@ -44,7 +43,7 @@
44
43
  "@vitest/coverage-v8": "^4.0.18",
45
44
  "commit-and-tag-version": "^12.6.1",
46
45
  "eslint": "^10.0.0",
47
- "eslint-plugin-n": "^17.0.0",
46
+ "eslint-plugin-n": "^18.0.0",
48
47
  "globals": "^17.3.0",
49
48
  "lodash": "^4.17.21",
50
49
  "vitest": "^4.0.18"
package/src/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const { Observable } = require('rxjs');
2
- const though2 = require('through2');
2
+ const { Transform } = require('stream');
3
3
 
4
4
  const { getServiceNames } = require('../src/utils');
5
5
 
@@ -107,7 +107,7 @@ function createMethod(clientMethod, dbg, cancelCache) {
107
107
  grpcCancel(false);
108
108
  };
109
109
 
110
- call.pipe(though2.obj(onData, onEnd));
110
+ call.pipe(new Transform({ objectMode: true, transform: onData, flush: onEnd }));
111
111
  call.on('error', onError);
112
112
  }
113
113
 
package/src/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const { of, Observable } = require('rxjs');
2
- const through2 = require('through2');
2
+ const { Transform } = require('stream');
3
3
 
4
4
  const debug = require('../debug').spawn('server');
5
5
 
@@ -57,7 +57,7 @@ function createMethod(rxImpl, name, methods, dbg) {
57
57
  function createRequestStream({ call, name, dbg }) {
58
58
  dbg(() => 'requestStream');
59
59
  return new Observable(observer => {
60
- call.pipe(through2.obj(onData, onEnd));
60
+ call.pipe(new Transform({ objectMode: true, transform: onData, flush: onEnd }));
61
61
  call.on('error', onError);
62
62
 
63
63
  function onError(err) {