ueberdb2 1.4.15 → 1.4.19
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/CHANGELOG.md +15 -0
- package/databases/postgres_db.js +1 -0
- package/package.json +13 -13
- package/test/test_postgres.js +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Notable Changes
|
|
2
2
|
|
|
3
|
+
## v1.4.19
|
|
4
|
+
|
|
5
|
+
Updated database (and other) dependencies:
|
|
6
|
+
* `mongodb`: Updated `mongodb` to 3.7.3.
|
|
7
|
+
* `mssql`: Updated `mssql` to 7.3.0.
|
|
8
|
+
* `dirty_git`: Updated `simple-git` to 2.47.0.
|
|
9
|
+
|
|
10
|
+
## v1.4.16
|
|
11
|
+
|
|
12
|
+
* `postgres`: You can now provide a connection string instead of a settings
|
|
13
|
+
object. For example:
|
|
14
|
+
```javascript
|
|
15
|
+
const db = new ueberdb.Database('postgres', 'postgres://user:password@host/dbname');
|
|
16
|
+
```
|
|
17
|
+
|
|
3
18
|
## v1.4.15
|
|
4
19
|
|
|
5
20
|
* `postgres`, `postgrespool`: The `postgrespool` database driver was renamed to
|
package/databases/postgres_db.js
CHANGED
|
@@ -22,6 +22,7 @@ const pg = require('pg');
|
|
|
22
22
|
exports.Database = class extends AbstractDatabase {
|
|
23
23
|
constructor(settings) {
|
|
24
24
|
super();
|
|
25
|
+
if (typeof settings === 'string') settings = {connectionString: settings};
|
|
25
26
|
this.settings = settings;
|
|
26
27
|
|
|
27
28
|
this.settings.cache = settings.cache || 1000;
|
package/package.json
CHANGED
|
@@ -21,34 +21,34 @@
|
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"async": "^3.2.
|
|
24
|
+
"async": "^3.2.2",
|
|
25
25
|
"cassandra-driver": "^4.6.3",
|
|
26
26
|
"dirty": "^1.1.3",
|
|
27
|
-
"elasticsearch": "^16.7.
|
|
28
|
-
"mongodb": "^3.
|
|
29
|
-
"mssql": "^7.
|
|
27
|
+
"elasticsearch": "^16.7.2",
|
|
28
|
+
"mongodb": "^3.7.3",
|
|
29
|
+
"mssql": "^7.3.0",
|
|
30
30
|
"mysql": "2.18.1",
|
|
31
|
-
"nano": "^9.0.
|
|
31
|
+
"nano": "^9.0.5",
|
|
32
32
|
"pg": "^8.7.1",
|
|
33
33
|
"redis": "^3.1.2",
|
|
34
34
|
"rethinkdb": "^2.4.2",
|
|
35
|
-
"simple-git": "^2.
|
|
35
|
+
"simple-git": "^2.47.0"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"sqlite3": "
|
|
38
|
+
"sqlite3": "github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"cli-table": "^0.3.
|
|
41
|
+
"cli-table": "^0.3.8",
|
|
42
42
|
"eslint": "^7.32.0",
|
|
43
|
-
"eslint-config-etherpad": "^2.0.
|
|
44
|
-
"eslint-plugin-cypress": "^2.
|
|
43
|
+
"eslint-config-etherpad": "^2.0.2",
|
|
44
|
+
"eslint-plugin-cypress": "^2.12.1",
|
|
45
45
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
46
46
|
"eslint-plugin-mocha": "^9.0.0",
|
|
47
47
|
"eslint-plugin-node": "^11.1.0",
|
|
48
48
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
49
|
-
"eslint-plugin-promise": "^5.1.
|
|
49
|
+
"eslint-plugin-promise": "^5.1.1",
|
|
50
50
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
51
|
-
"mocha": "^9.1.
|
|
51
|
+
"mocha": "^9.1.3",
|
|
52
52
|
"randexp": "^0.5.3",
|
|
53
53
|
"wtfnode": "^0.9.1"
|
|
54
54
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"url": "https://github.com/ether/ueberDB.git"
|
|
58
58
|
},
|
|
59
59
|
"main": "./index",
|
|
60
|
-
"version": "1.4.
|
|
60
|
+
"version": "1.4.19",
|
|
61
61
|
"bugs": {
|
|
62
62
|
"url": "https://github.com/ether/ueberDB/issues"
|
|
63
63
|
},
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const assert = require('assert').strict;
|
|
4
|
+
const {databases} = require('./lib/databases');
|
|
5
|
+
const ueberdb = require('../index');
|
|
6
|
+
const util = require('util');
|
|
7
|
+
|
|
8
|
+
describe(__filename, function () {
|
|
9
|
+
it('connection string instead of settings object', async function () {
|
|
10
|
+
const {user, password, host, database} = databases.postgres;
|
|
11
|
+
const db =
|
|
12
|
+
new ueberdb.Database('postgres', `postgres://${user}:${password}@${host}/${database}`);
|
|
13
|
+
await util.promisify(db.init.bind(db))();
|
|
14
|
+
await util.promisify(db.set.bind(db))('key', 'val');
|
|
15
|
+
assert.equal(await util.promisify(db.get.bind(db))('key'), 'val');
|
|
16
|
+
});
|
|
17
|
+
});
|