Skip to content

Commit

Permalink
downgrade uuid and node-cache (#200)
Browse files Browse the repository at this point in the history
* downgrade uuid and node-cache

* 2.18.1
  • Loading branch information
kbarbounakis authored Jan 23, 2025
1 parent b159561 commit 919e0f3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
15 changes: 10 additions & 5 deletions data-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ class DefaultDataCacheStrategy extends DataCacheStrategy {
if (err) {
return reject(err);
}
return resolve(res);
if (Object.prototype.hasOwnProperty.call(res, key)) {
return resolve(res[key]);
}
return resolve();
});
} catch (err) {
return reject(err);
Expand Down Expand Up @@ -180,9 +183,9 @@ class DefaultDataCacheStrategy extends DataCacheStrategy {
finalize() {
var self = this;
return self.clear().then(function() {
// destroy timer
if (self.rawCache) {
self.rawCache.close();
if (self.rawCache.checkTimeout != null) {
clearTimeout(self.rawCache.checkTimeout);
return Promise.resolve();
}
});
}
Expand All @@ -201,7 +204,9 @@ class DefaultDataCacheStrategy extends DataCacheStrategy {
try {
void self.rawCache.get(key, (err, res) => {
if (typeof res !== 'undefined') {
return resolve(res);
if (Object.prototype.hasOwnProperty.call(res, key)) {
return resolve(res[key]);
}
}
try {
void getFunc().then(function (res) {
Expand Down
41 changes: 18 additions & 23 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@themost/data",
"version": "2.18.0",
"version": "2.18.1",
"description": "MOST Web Framework Codename Blueshift - Data module",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -33,12 +33,12 @@
"esprima": "^4.0.1",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"node-cache": "^4.2.1",
"node-cache": "^1.1.0",
"pluralize": "^7.0.0",
"q": "^1.4.1",
"sprintf-js": "^1.1.2",
"symbol": "^0.3.1",
"uuid": "^11.0.5"
"uuid": "^10.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.17.2",
Expand Down

0 comments on commit 919e0f3

Please sign in to comment.