Skip to content

Commit 1c3546f

Browse files
author
Paul Korzhyk
committed
New release. Green tests. Almost no ts errors
1 parent 7f473cf commit 1c3546f

19 files changed

+46
-222
lines changed

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
module.exports = {
2+
globals: {
3+
"ts-jest": {
4+
diagnostics: false,
5+
},
6+
},
27
testEnvironment: "node",
38
transform: {
49
".ts": "ts-jest"

lib/client.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"use strict";
22
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
return new (P || (P = Promise))(function (resolve, reject) {
54
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
65
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
87
step((generator = generator.apply(thisArg, _arguments || [])).next());
98
});
109
};

lib/clientStub.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ var __assign = (this && this.__assign) || function () {
1111
return __assign.apply(this, arguments);
1212
};
1313
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1514
return new (P || (P = Promise))(function (resolve, reject) {
1615
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1716
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
1918
step((generator = generator.apply(thisArg, _arguments || [])).next());
2019
});
2120
};
@@ -271,7 +270,7 @@ var DgraphClientStub = (function () {
271270
version: "1.0.x",
272271
}];
273272
}
274-
return [2, __assign(__assign({}, JSON.parse(text)), { health: "OK" })];
273+
return [2, __assign({}, JSON.parse(text), { health: "OK" })];
275274
}
276275
});
277276
});

lib/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ export * from "./clientStub";
33
export * from "./client";
44
export * from "./txn";
55
export * from "./errors";
6-
export * from "./zero";

lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ __export(require("./clientStub"));
77
__export(require("./client"));
88
__export(require("./txn"));
99
__export(require("./errors"));
10-
__export(require("./zero"));

lib/txn.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"use strict";
22
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
return new (P || (P = Promise))(function (resolve, reject) {
54
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
65
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
87
step((generator = generator.apply(thisArg, _arguments || [])).next());
98
});
109
};

lib/zero.d.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/zero.js

Lines changed: 0 additions & 99 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dgraph-js-http",
3-
"version": "1.1.0-rc21",
3+
"version": "2003.0.0",
44
"description": "A javascript HTTP client for Dgraph",
55
"license": "Apache-2.0",
66
"repository": {

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DgraphClientStub } from "./clientStub";
22
import { ERR_NO_CLIENTS } from "./errors";
33
import { Txn } from "./txn";
4-
import { Operation, Payload, UiKeywords, TxnOptions, Response } from "./types";
4+
import { Operation, Payload, Response, TxnOptions, UiKeywords } from "./types";
55
import { stringifyMessage } from "./util";
66

77
/**
@@ -96,14 +96,14 @@ export class DgraphClient {
9696
* getHealth gets client or cluster health
9797
*/
9898
public async getHealth(all: boolean = true): Promise<Response> {
99-
return await this.anyClient().getHealth(all);
99+
return this.anyClient().getHealth(all);
100100
}
101101

102102
/**
103103
* getState gets cluster state
104104
*/
105105
public async getState(): Promise<Response> {
106-
return await this.anyClient().getState();
106+
return this.anyClient().getState();
107107
}
108108

109109
/**

0 commit comments

Comments
 (0)