Skip to content

Commit b4499bd

Browse files
committed
back to commonjs
1 parent 402418d commit b4499bd

File tree

8 files changed

+24
-30
lines changed

8 files changed

+24
-30
lines changed

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redisgraph.js",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Connect to RedisGraph 1.0.0 and up from JavaScript",
55
"author": "RedisLabs",
66
"license": "BSD 3",
@@ -12,13 +12,10 @@
1212
"redis": "^2.8.0"
1313
},
1414
"devDependencies": {
15-
"babel-core": "^6.26.3",
16-
"babel-preset-latest": "^6.24.1",
17-
"babel-preset-stage-3": "^6.24.1",
1815
"mocha": "^5.2.0"
1916
},
2017
"scripts": {
21-
"test": "mocha -R spec --require babel-core/register --exit"
18+
"test": "mocha --exit"
2219
},
2320
"main": "./src/index.js"
2421
}

src/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import Record from "./record";
2-
import RedisGraph from "./redisGraph";
3-
import ResultSet from "./resultSet";
4-
import Statistics from "./statistics";
5-
import Label from "./label";
1+
const Record = require("./record");
2+
const RedisGraph = require("./redisGraph");
3+
const ResultSet = require("./resultSet");
4+
const Statistics = require("./statistics");
5+
const Label = require("./label");
66

7-
const redisGraph = {
7+
module.exports = {
88
Record: Record,
99
RedisGraph: RedisGraph,
1010
ResultSet: ResultSet,
1111
Statistics: Statistics,
1212
Label: Label
1313
};
14-
15-
export default redisGraph;

src/label.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Different Statistics labels
33
*/
4-
const Label = Object.freeze({
4+
var Label = Object.freeze({
55
LABELS_ADDED: "Labels added",
66
NODES_CREATED: "Nodes created",
77
NODES_DELETED: "Nodes deleted",
@@ -11,4 +11,4 @@ const Label = Object.freeze({
1111
QUERY_INTERNAL_EXECUTION_TIME: "Query internal execution time"
1212
});
1313

14-
export default Label;
14+
module.exports = Label;

src/record.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ class Record {
3232
}
3333
}
3434

35-
export default Record;
35+
module.exports = Record;

src/redisGraph.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import redis from "redis";
2-
import util from "util";
3-
import ResultSet from "./ResultSet";
1+
const redis = require("redis");
2+
const util = require("util");
3+
const ResultSet = require("./ResultSet");
44

55
/**
66
* RedisGraph client
@@ -50,4 +50,4 @@ class RedisGraph {
5050
}
5151
}
5252

53-
export default RedisGraph;
53+
module.exports = RedisGraph;

src/resultSet.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Statistics from "./statistics";
2-
import Record from "./record";
1+
const Statistics = require("./statistics");
2+
const Record = require("./record");
33

44
/**
55
* Hold a query result
@@ -43,4 +43,4 @@ class ResultSet {
4343
}
4444
}
4545

46-
export default ResultSet;
46+
module.exports = ResultSet;

src/statistics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Label from "./label";
1+
const Label = require("./label");
22

33
class Statistics {
44
constructor(raw) {
@@ -59,4 +59,4 @@ class Statistics {
5959
}
6060
}
6161

62-
export default Statistics;
62+
module.exports = Statistics;

test/redisGraphAPITest.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { describe, before, it } from "mocha";
2-
import assert from "assert";
3-
import redis from "redis";
4-
import Label from "../src/label";
5-
import RedisGraph from "../src/redisGraph";
1+
const assert = require("assert");
2+
const redis = require("redis");
3+
const Label = require("../src/label");
4+
const RedisGraph = require("../src/redisGraph");
65

76
describe("RedisGraph Test", () => {
87
const api = new RedisGraph("social");

0 commit comments

Comments
 (0)