1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Bump dependencies

This commit is contained in:
Nick O'Leary 2018-12-07 14:13:59 +00:00
parent bc014fec9b
commit 98616e772c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
9 changed files with 76 additions and 44 deletions

View File

@ -526,12 +526,15 @@ module.exports = function(grunt) {
}); });
grunt.registerTask('verifyPackageDependencies', function() { grunt.registerTask('verifyPackageDependencies', function() {
var done = this.async();
var verifyDependencies = require("./scripts/verify-package-dependencies.js"); var verifyDependencies = require("./scripts/verify-package-dependencies.js");
var failures = verifyDependencies(); verifyDependencies().then(function(failures) {
if (failures.length > 0) { if (failures.length > 0) {
failures.forEach(f => grunt.log.error(f)); failures.forEach(f => grunt.log.error(f));
grunt.fail.fatal("Failed to verify package dependencies"); grunt.fail.fatal("Failed to verify package dependencies");
} }
done();
});
}); });
grunt.registerTask('setDevEnv', grunt.registerTask('setDevEnv',

View File

@ -24,7 +24,7 @@
} }
], ],
"dependencies": { "dependencies": {
"ajv": "6.5.4", "ajv": "6.6.1",
"basic-auth": "2.0.1", "basic-auth": "2.0.1",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"body-parser": "1.18.3", "body-parser": "1.18.3",
@ -32,28 +32,28 @@
"clone": "2.1.2", "clone": "2.1.2",
"cookie": "0.3.1", "cookie": "0.3.1",
"cookie-parser": "1.4.3", "cookie-parser": "1.4.3",
"cors": "2.8.4", "cors": "2.8.5",
"cron": "1.5.0", "cron": "1.5.1",
"denque": "1.3.0", "denque": "1.4.0",
"express": "4.16.4", "express": "4.16.4",
"express-session": "1.15.6", "express-session": "1.15.6",
"fs-extra": "5.0.0", "fs-extra": "7.0.1",
"fs.notify": "0.0.4", "fs.notify": "0.0.4",
"hash-sum": "1.0.2", "hash-sum": "1.0.2",
"https-proxy-agent": "2.2.1", "https-proxy-agent": "2.2.1",
"i18next": "11.6.0", "i18next": "12.1.0",
"is-utf8": "0.2.1", "is-utf8": "0.2.1",
"js-yaml": "3.12.0", "js-yaml": "3.12.0",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"jsonata": "1.5.4", "jsonata": "1.5.4",
"media-typer": "0.3.0", "media-typer": "1.0.1",
"memorystore": "1.6.0", "memorystore": "1.6.0",
"mime": "1.4.1", "mime": "2.4.0",
"mqtt": "2.18.8", "mqtt": "2.18.8",
"multer": "1.4.1", "multer": "1.4.1",
"mustache": "2.3.2", "mustache": "3.0.1",
"node-red-node-email": "0.1.*", "node-red-node-email": "1.0.*",
"node-red-node-feedparser": "^0.1.12", "node-red-node-feedparser": "^0.1.14",
"node-red-node-rbe": "0.2.*", "node-red-node-rbe": "0.2.*",
"node-red-node-twitter": "^1.1.0", "node-red-node-twitter": "^1.1.0",
"nopt": "4.0.1", "nopt": "4.0.1",
@ -78,7 +78,7 @@
"chromedriver": "2.43.1", "chromedriver": "2.43.1",
"grunt": "~1.0.3", "grunt": "~1.0.3",
"grunt-chmod": "~1.1.1", "grunt-chmod": "~1.1.1",
"grunt-cli": "~1.3.1", "grunt-cli": "~1.3.2",
"grunt-concurrent": "~2.3.1", "grunt-concurrent": "~2.3.1",
"grunt-contrib-clean": "~1.1.0", "grunt-contrib-clean": "~1.1.0",
"grunt-contrib-compress": "~1.4.0", "grunt-contrib-compress": "~1.4.0",
@ -104,12 +104,12 @@
"mosca": "^2.8.3", "mosca": "^2.8.3",
"should": "^8.4.0", "should": "^8.4.0",
"sinon": "1.17.7", "sinon": "1.17.7",
"stoppable": "^1.0.7", "stoppable": "^1.1.0",
"supertest": "3.3.0", "supertest": "3.3.0",
"wdio-chromedriver-service": "^0.1.3", "wdio-chromedriver-service": "^0.1.5",
"wdio-mocha-framework": "^0.6.2", "wdio-mocha-framework": "^0.6.4",
"wdio-spec-reporter": "^0.1.5", "wdio-spec-reporter": "^0.1.5",
"webdriverio": "^4.13.1", "webdriverio": "^4.14.1",
"node-red-node-test-helper": "node-red/node-red-node-test-helper", "node-red-node-test-helper": "node-red/node-red-node-test-helper",
"jsdoc-nr-template": "node-red/jsdoc-nr-template" "jsdoc-nr-template": "node-red/jsdoc-nr-template"
}, },

View File

@ -57,7 +57,7 @@ module.exports = {
} }
runtimeAPI.nodes.getIcon(opts).then(function(data) { runtimeAPI.nodes.getIcon(opts).then(function(data) {
if (data) { if (data) {
var contentType = mime.lookup(icon); var contentType = mime.getType(icon);
res.set("Content-Type", contentType); res.set("Content-Type", contentType);
res.send(data); res.send(data);
} else { } else {

View File

@ -21,12 +21,12 @@
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"body-parser": "1.18.3", "body-parser": "1.18.3",
"clone": "2.1.2", "clone": "2.1.2",
"cors": "2.8.4", "cors": "2.8.5",
"express-session": "1.15.6", "express-session": "1.15.6",
"express": "4.16.4", "express": "4.16.4",
"memorystore": "1.6.0", "memorystore": "1.6.0",
"mime": "1.4.1", "mime": "2.4.0",
"mustache": "2.3.2", "mustache": "3.0.1",
"oauth2orize": "1.11.0", "oauth2orize": "1.11.0",
"passport-http-bearer": "1.0.1", "passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2", "passport-oauth2-client-password": "0.1.2",

View File

@ -15,24 +15,24 @@
} }
], ],
"dependencies": { "dependencies": {
"ajv": "6.5.4", "ajv": "6.6.1",
"body-parser": "1.18.3", "body-parser": "1.18.3",
"cheerio": "0.22.0", "cheerio": "0.22.0",
"cookie-parser": "1.4.3", "cookie-parser": "1.4.3",
"cookie": "0.3.1", "cookie": "0.3.1",
"cors": "2.8.4", "cors": "2.8.5",
"cron": "1.5.0", "cron": "1.5.1",
"denque": "1.3.0", "denque": "1.4.0",
"fs-extra": "5.0.0", "fs-extra": "7.0.1",
"fs.notify": "0.0.4", "fs.notify": "0.0.4",
"hash-sum": "1.0.2", "hash-sum": "1.0.2",
"https-proxy-agent": "2.2.1", "https-proxy-agent": "2.2.1",
"is-utf8": "0.2.1", "is-utf8": "0.2.1",
"js-yaml": "3.12.0", "js-yaml": "3.12.0",
"media-typer": "0.3.0", "media-typer": "1.0.1",
"mqtt": "2.18.8", "mqtt": "2.18.8",
"multer": "1.4.1", "multer": "1.4.1",
"mustache": "2.3.2", "mustache": "3.0.1",
"on-headers": "1.0.1", "on-headers": "1.0.1",
"raw-body": "2.3.3", "raw-body": "2.3.3",
"request": "2.88.0", "request": "2.88.0",

View File

@ -20,7 +20,7 @@
"@node-red/util": "0.20.0-beta.1", "@node-red/util": "0.20.0-beta.1",
"clone": "2.1.2", "clone": "2.1.2",
"express": "4.16.4", "express": "4.16.4",
"fs-extra": "5.0.0", "fs-extra": "7.0.1",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"when": "3.7.8" "when": "3.7.8"
} }

View File

@ -16,7 +16,7 @@
], ],
"dependencies": { "dependencies": {
"clone": "2.1.2", "clone": "2.1.2",
"i18next": "11.6.0", "i18next": "12.1.0",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"jsonata": "1.5.4", "jsonata": "1.5.4",
"when": "3.7.8" "when": "3.7.8"

View File

@ -38,9 +38,9 @@
"basic-auth": "2.0.1", "basic-auth": "2.0.1",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"express": "4.16.4", "express": "4.16.4",
"fs-extra": "5.0.0", "fs-extra": "7.0.1",
"node-red-node-email": "0.1.*", "node-red-node-email": "1.0.*",
"node-red-node-feedparser": "^0.1.12", "node-red-node-feedparser": "^0.1.14",
"node-red-node-rbe": "0.2.*", "node-red-node-rbe": "0.2.*",
"node-red-node-twitter": "^1.1.0", "node-red-node-twitter": "^1.1.0",
"nopt": "4.0.1", "nopt": "4.0.1",

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
const path = require("path"); const path = require("path");
const fs = require("fs"); const fs = require("fs-extra");
const should = require("should"); const should = require("should");
const rootPackage = require(path.join("..","package.json")); const rootPackage = require(path.join("..","package.json"));
@ -16,8 +16,11 @@ const packages = [
"@node-red/util" "@node-red/util"
]; ];
const fixFlag = process.argv[2] === '--fix';
function verifyDependencies() { function verifyDependencies() {
let failures = []; let failures = [];
let packageUpdates = {};
packages.forEach(package => { packages.forEach(package => {
let modulePackage = require(path.join("../packages/node_modules",package,"package.json")); let modulePackage = require(path.join("../packages/node_modules",package,"package.json"));
let dependencies = Object.keys(modulePackage.dependencies||{}); let dependencies = Object.keys(modulePackage.dependencies||{});
@ -25,22 +28,48 @@ function verifyDependencies() {
try { try {
if (!/^@node-red\//.test(module)) { if (!/^@node-red\//.test(module)) {
should.exist(rootDependencies[module],`[${package}] '${module}' missing from root package.json`); should.exist(rootDependencies[module],`[${package}] '${module}' missing from root package.json`);
rootDependencies[module].should.eql(modulePackage.dependencies[module],`[${package}] '${module}' version mismatch. Expected '${modulePackage.dependencies[module]}' (got '${rootDependencies[module]}') `); try {
rootDependencies[module].should.eql(modulePackage.dependencies[module],`[${package}] '${module}' version mismatch. Expected '${modulePackage.dependencies[module]}' (got '${rootDependencies[module]}') `);
} catch(err) {
if (fixFlag) {
modulePackage.dependencies[module] = rootDependencies[module];
packageUpdates[package] = modulePackage;
} else {
failures.push(err.toString());
}
}
} }
} catch(err) { } catch(err) {
failures.push(err.toString()); failures.push(err.toString());
} }
}); });
}) })
return failures; if (failures.length === 0 && fixFlag) {
var promises = [];
packages.forEach(package => {
if (packageUpdates.hasOwnProperty(package)) {
promises.push(fs.writeJSON(path.join(__dirname,"../packages/node_modules",package,"package.json"),packageUpdates[package],{spaces:4}));
}
});
return Promise.all(promises).then(r => []).catch(e => {
console.log(e);
process.exit(1);
})
} else {
return Promise.resolve(failures);
}
} }
if (require.main === module) { if (require.main === module) {
let failures = verifyDependencies(); verifyDependencies().then(failures => {
if (failures.length > 0) { if (failures.length > 0) {
failures.forEach(f => console.log(` - ${f}`)); failures.forEach(f => console.log(` - ${f}`));
process.exit(1);
}
}).catch(e => {
console.log(e);
process.exit(1); process.exit(1);
} });
} else { } else {
module.exports = verifyDependencies; module.exports = verifyDependencies;
} }