@mojaloop/database-lib 11.3.5 → 11.3.7
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/.circleci/config.yml +1 -1
- package/CHANGELOG.md +9 -0
- package/audit-ci.jsonc +3 -1
- package/package.json +13 -8
- package/src/table.js +2 -2
- package/test/unit/table.test.js +6 -6
package/.circleci/config.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [11.3.7](https://github.com/mojaloop/database-lib/compare/v11.3.6...v11.3.7) (2026-02-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* replace allowlisted vulnerabilities with npm overrides ([#189](https://github.com/mojaloop/database-lib/issues/189)) ([904fcad](https://github.com/mojaloop/database-lib/commit/904fcad46304946a7f6493cfd4914a26a3c8dc87))
|
|
11
|
+
|
|
12
|
+
### [11.3.6](https://github.com/mojaloop/database-lib/compare/v11.3.5...v11.3.6) (2026-02-18)
|
|
13
|
+
|
|
5
14
|
### [11.3.5](https://github.com/mojaloop/database-lib/compare/v11.3.4...v11.3.5) (2026-01-13)
|
|
6
15
|
|
|
7
16
|
### [11.3.4](https://github.com/mojaloop/database-lib/compare/v11.3.3...v11.3.4) (2025-11-05)
|
package/audit-ci.jsonc
CHANGED
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
// audit-ci supports reading JSON, JSONC, and JSON5 config files.
|
|
4
4
|
// Only use one of ["low": true, "moderate": true, "high": true, "critical": true]
|
|
5
5
|
"moderate": true,
|
|
6
|
-
"allowlist": [
|
|
6
|
+
"allowlist": [ // NOTE: Please add as much information as possible to any items added to the allowList
|
|
7
|
+
"GHSA-2g4f-4pwh-qvx6" // ajv ReDoS with $data option - transitive via eslint, override breaks standardjs linter
|
|
8
|
+
]
|
|
7
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/database-lib",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.7",
|
|
4
4
|
"description": "Shared database code for central services",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"release": "standard-version --releaseCommitMessageFormat 'chore(release): {{currentTag}} [skip ci]'"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@mojaloop/central-services-error-handling": "13.1.
|
|
47
|
+
"@mojaloop/central-services-error-handling": "13.1.6",
|
|
48
48
|
"async-exit-hook": "^2.0.1",
|
|
49
49
|
"knex": "3.1.0",
|
|
50
|
-
"lodash": "4.17.
|
|
50
|
+
"lodash": "4.17.23",
|
|
51
51
|
"mysql": "^2.18.1",
|
|
52
|
-
"mysql2": "^3.
|
|
52
|
+
"mysql2": "^3.17.2"
|
|
53
53
|
},
|
|
54
54
|
"overrides": {
|
|
55
55
|
"form-data": "4.0.4",
|
|
@@ -73,15 +73,20 @@
|
|
|
73
73
|
},
|
|
74
74
|
"cross-spawn": "7.0.6",
|
|
75
75
|
"trim": "0.0.3",
|
|
76
|
-
"undici": "6.
|
|
76
|
+
"undici": "6.23.0",
|
|
77
77
|
"yargs-parser": "21.1.1",
|
|
78
|
-
"validator": "13.15.22"
|
|
78
|
+
"validator": "13.15.22",
|
|
79
|
+
"fast-xml-parser": "5.3.6",
|
|
80
|
+
"qs": "6.14.2",
|
|
81
|
+
"axios": "1.13.5",
|
|
82
|
+
"lodash": "4.17.23",
|
|
83
|
+
"lodash-es": "4.17.23"
|
|
79
84
|
},
|
|
80
85
|
"devDependencies": {
|
|
81
|
-
"@mojaloop/sdk-standard-components": "19.18.
|
|
86
|
+
"@mojaloop/sdk-standard-components": "19.18.7",
|
|
82
87
|
"audit-ci": "^7.1.0",
|
|
83
88
|
"jest": "^30.2.0",
|
|
84
|
-
"npm-check-updates": "19.3.
|
|
89
|
+
"npm-check-updates": "19.3.2",
|
|
85
90
|
"nyc": "17.1.0",
|
|
86
91
|
"pre-commit": "1.2.2",
|
|
87
92
|
"proxyquire": "2.1.3",
|
package/src/table.js
CHANGED
|
@@ -10,7 +10,7 @@ class Table {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
insert (fields) {
|
|
13
|
-
return this._createBuilder().insert(fields
|
|
13
|
+
return this._createBuilder().insert(fields).then(inserted => {
|
|
14
14
|
if (inserted.length === 0) {
|
|
15
15
|
throw new Error(`There was an error inserting the record to ${this._tableName}`)
|
|
16
16
|
}
|
|
@@ -20,7 +20,7 @@ class Table {
|
|
|
20
20
|
|
|
21
21
|
update (criteria, fields) {
|
|
22
22
|
const builder = this._createBuilder()
|
|
23
|
-
return this._addWhere(criteria, builder).update(fields
|
|
23
|
+
return this._addWhere(criteria, builder).update(fields).then(updated => {
|
|
24
24
|
if (updated.length === 0) return null
|
|
25
25
|
return updated.length === 1 ? updated[0] : updated
|
|
26
26
|
})
|
package/test/unit/table.test.js
CHANGED
|
@@ -36,7 +36,7 @@ Test('table', tableTest => {
|
|
|
36
36
|
table.insert(fields)
|
|
37
37
|
.then(record => {
|
|
38
38
|
test.equal(record, inserted)
|
|
39
|
-
test.ok(builderStub.insert.calledWith(fields
|
|
39
|
+
test.ok(builderStub.insert.calledWith(fields))
|
|
40
40
|
test.end()
|
|
41
41
|
})
|
|
42
42
|
})
|
|
@@ -53,7 +53,7 @@ Test('table', tableTest => {
|
|
|
53
53
|
})
|
|
54
54
|
.catch(err => {
|
|
55
55
|
test.equal(err.message, `There was an error inserting the record to ${tableName}`)
|
|
56
|
-
test.ok(builderStub.insert.calledWith(fields
|
|
56
|
+
test.ok(builderStub.insert.calledWith(fields))
|
|
57
57
|
test.end()
|
|
58
58
|
})
|
|
59
59
|
})
|
|
@@ -75,7 +75,7 @@ Test('table', tableTest => {
|
|
|
75
75
|
.then(record => {
|
|
76
76
|
test.equal(record, updated)
|
|
77
77
|
test.ok(builderStub.where.calledWith('id', 1))
|
|
78
|
-
test.ok(updateStub.calledWith(fields
|
|
78
|
+
test.ok(updateStub.calledWith(fields))
|
|
79
79
|
test.end()
|
|
80
80
|
})
|
|
81
81
|
})
|
|
@@ -93,7 +93,7 @@ Test('table', tableTest => {
|
|
|
93
93
|
.then(records => {
|
|
94
94
|
test.equal(records, updated)
|
|
95
95
|
test.ok(builderStub.where.calledWith('accountId', 3))
|
|
96
|
-
test.ok(updateStub.calledWith(fields
|
|
96
|
+
test.ok(updateStub.calledWith(fields))
|
|
97
97
|
test.end()
|
|
98
98
|
})
|
|
99
99
|
})
|
|
@@ -123,7 +123,7 @@ Test('table', tableTest => {
|
|
|
123
123
|
table.update({}, fields)
|
|
124
124
|
.then(records => {
|
|
125
125
|
test.equal(records, updated)
|
|
126
|
-
test.ok(builderStub.update.calledWith(fields
|
|
126
|
+
test.ok(builderStub.update.calledWith(fields))
|
|
127
127
|
test.end()
|
|
128
128
|
})
|
|
129
129
|
})
|
|
@@ -137,7 +137,7 @@ Test('table', tableTest => {
|
|
|
137
137
|
table.update(null, fields)
|
|
138
138
|
.then(records => {
|
|
139
139
|
test.equal(records, updated)
|
|
140
|
-
test.ok(builderStub.update.calledWith(fields
|
|
140
|
+
test.ok(builderStub.update.calledWith(fields))
|
|
141
141
|
test.end()
|
|
142
142
|
})
|
|
143
143
|
})
|