Skip to content

Commit

Permalink
Merge pull request #264 from ml054/RDBCL-429
Browse files Browse the repository at this point in the history
RDBC-429 node.js - expose @types/stream-json in package.json
  • Loading branch information
gregolsky authored Mar 12, 2021
2 parents 06d78ae + 51dd718 commit 2593800
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"@types/node-fetch": "^2.5.7",
"@types/qs": "^6.9.5",
"@types/semaphore": "^1.1.0",
"@types/stream-json": "^1.5.1",
"@types/uuid": "^8.3.0",
"@types/verror": "^1.10.4",
"abort-controller": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Http/RavenCommandResponsePipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class RavenCommandResponsePipeline<TStreamResult> extends EventEmitter {
const opts = this._opts;
let resultPromise: Promise<TStreamResult>;
if (opts.jsonAsync) {
const asm = Asm.connectTo(streams[streams.length - 1]);
const asm = Asm.connectTo(streams[streams.length - 1] as any);
resultPromise = new Promise(resolve => {
asm.on("done", asm => resolve(asm.current));
});
Expand Down
4 changes: 2 additions & 2 deletions src/Mapping/Json/Streams/TransformKeysJsonStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class TransformKeysJsonStream extends FilterBase {
private _getTransform: (key: string, stack: (string | null | number)[]) => CasingConvention;

constructor(opts: TransformJsonKeysStreamOptions) {
super();
super(null);
opts = opts || { getCurrentTransform: (key, stack) => null };
if (!opts.getCurrentTransform) {
throwError("InvalidArgumentException", "getCurrentTransform() must not be empty.");
Expand All @@ -21,7 +21,7 @@ export class TransformKeysJsonStream extends FilterBase {
}

private _transformKey(key) {
const transformName = this._getTransform(key, this._stack);
const transformName = this._getTransform(key, (this as any)._stack); // HACK: access private field
if (!transformName) {
return key;
}
Expand Down
14 changes: 0 additions & 14 deletions src/Types/stream-json/index.d.ts

This file was deleted.

3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
],
"types": [
"node",
"mocha",
"stream-json"
"mocha"
]
},
"files": [
Expand Down

0 comments on commit 2593800

Please sign in to comment.