New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-ral

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ral - npm Package Compare versions

Comparing version 0.18.1 to 0.18.2

test/update/config/sharedObject.js

11

lib/config.js

@@ -53,7 +53,7 @@ /**

if (!err) {
_.map(confs, function (conf) {
validate(conf.serviceID, conf);
_.map(confs, function (conf, serviceID) {
validate(serviceID, conf);
if (conf._isValid === true) {
config[conf.serviceID] = conf;
contextCache[conf.serviceID] = {};
config[serviceID] = conf;
contextCache[serviceID] = {};
}

@@ -183,2 +183,5 @@ });

data = require(filePath);
if (data) {
data = ralUtil.deepClone(data);
}
}

@@ -185,0 +188,0 @@ else if (ext === '.json') {

@@ -142,3 +142,5 @@ /**

logger.fatal('config normalize failed');
fs.close(fd);
fs.close(fd, function (err) {
err && logger.warning('failed config_cache close: ' + err.message);
});
// delete failed file

@@ -145,0 +147,0 @@ fs.unlink(me.dataPath, function (err) {

{
"name": "node-ral",
"version": "0.18.1",
"version": "0.18.2",
"description": "a rpc client for node",

@@ -39,3 +39,3 @@ "main": "index.js",

"urlencode": "1.1.0",
"yog-log": "0.1.3"
"yog-log": "^0.1.8"
},

@@ -42,0 +42,0 @@ "devDependencies": {

@@ -18,2 +18,3 @@ node-ral

- [x] node 6.x
- [x] node 8.x

@@ -20,0 +21,0 @@ > io.js 1.63至1.8.1版本不支持GBK编码

@@ -97,2 +97,25 @@ /**

(process.env.CI ? it : it.skip)('update configs of shared object successful', function (done) {
var fake = {
normalizeConfig: function (conf) {
return conf;
},
needUpdate: function () {
return true;
}
};
normalizeManager.setConfigNormalizer([fake, 'default']);
config.load(path.join(__dirname, './update/config'));
config.enableUpdate(300000, true);
// read:succ事件在config更新之后才触发
configUpdater.once('read:succ', function () {
config.disableUpdate();
config.getConfNames().map(function (serviceID) {
var conf = config.getConf(serviceID);
conf.__from__.should.be.startWith('updater');
});
done();
});
});
(process.env.CI ? it : it.skip)('auto updater should be triggered when normalizer need update', function (done) {

@@ -99,0 +122,0 @@ var fake = {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc