Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary 2018-10-07 11:45:43 +01:00
commit f4ca8cd738
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
5 changed files with 20 additions and 7 deletions

View File

@ -2,7 +2,7 @@
http://nodered.org
[![Build Status](https://travis-ci.org/node-red/node-red.svg)](https://travis-ci.org/node-red/node-red)
[![Build Status](https://travis-ci.org/node-red/node-red.svg?branch=master)](https://travis-ci.org/node-red/node-red)
[![Coverage Status](https://coveralls.io/repos/node-red/node-red/badge.svg?branch=master)](https://coveralls.io/r/node-red/node-red?branch=master)
A visual tool for wiring the Internet of Things.

View File

@ -320,9 +320,9 @@ RED.palette = (function() {
}
setLabel(nt,$(d),label,nodeInfo);
var categoryNode = $("#palette-container-"+category);
var categoryNode = $("#palette-container-"+rootCategory);
if (categoryNode.find(".palette_node").length === 1) {
categoryContainers[category].open();
categoryContainers[rootCategory].open();
}
}

View File

@ -461,7 +461,11 @@ RED.projects.settings = (function() {
setTimeout(function() {
depsList.editableList('removeItem',entry);
refreshModuleInUseCounts();
entry.count = modulesInUse[entry.id].count;
if (modulesInUse.hasOwnProperty(entry.id)) {
entry.count = modulesInUse[entry.id].count;
} else {
entry.count = 0;
}
depsList.editableList('addItem',entry);
},500);
}

View File

@ -358,7 +358,15 @@ Project.prototype.update = function (user, data) {
promises.push(util.writeFile(this.paths['README.md'], this.description));
}
if (savePackage) {
promises.push(util.writeFile(this.paths['package.json'], JSON.stringify(this.package,"",4)));
promises.push(fs.readFile(project.paths['package.json'],"utf8").then(content => {
var currentPackage = {};
try {
currentPackage = util.parseJSON(content);
} catch(err) {
}
this.package = Object.assign(currentPackage,this.package);
return util.writeFile(this.paths['package.json'], JSON.stringify(this.package,"",4));
}));
}
return when.settle(promises).then(function(res) {
return {

View File

@ -412,7 +412,7 @@ describe("api/editor/library", function() {
throw err;
}
res.body.should.have.property('sendFile',
'node-module:example-one');
fspath.resolve('node-module') + ':example-one');
done();
});
});
@ -430,7 +430,8 @@ describe("api/editor/library", function() {
throw err;
}
res.body.should.have.property('sendFile',
'@org_scope/node_package:example-one');
fspath.resolve('@org_scope/node_package') +
':example-one');
done();
});
});