diff --git a/.travis.yml b/.travis.yml index f270c136c979cf20cc24360cb389dcc310c246b6..f26ab4e50623499a82035a66df8035688648c094 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ notifications: language: node_js node_js: - - '10.15.0' + - 'lts/dubnium' + - '11' sudo: false diff --git a/lib/config/validation.js b/lib/config/validation.js index c177fc1dd53624d45ca35da9b9bfdec2b15ffb3e..e542bedba3d8fb62af2801dc3479becec909f3ec 100644 --- a/lib/config/validation.js +++ b/lib/config/validation.js @@ -283,10 +283,10 @@ async function validateConfig(config, isPreset, parentPath) { } function sortAll(a, b) { if (a.depName === b.depName) { - return a.message > b.message; + return a.message > b.message ? 1 : -1; } // istanbul ignore next - return a.depName > b.depName; + return a.depName > b.depName ? 1 : -1; } errors.sort(sortAll); warnings.sort(sortAll); diff --git a/lib/versioning/ruby/index.js b/lib/versioning/ruby/index.js index 3daecc2cce7107567c6933b0c8b2090eb69e8677..d65d338d3c0aca2d61155c8fd81054bb7513601e 100644 --- a/lib/versioning/ruby/index.js +++ b/lib/versioning/ruby/index.js @@ -65,7 +65,7 @@ const getNewValue = (currentValue, rangeStrategy, fromVersion, toVersion) => { } }; -const sortVersions = (left, right) => gt(left, right); +const sortVersions = (left, right) => (gt(left, right) ? 1 : -1); module.exports = { equals, diff --git a/package.json b/package.json index 678e4c849325171a8c94c18700a0adb3d485dc67..a1c5b2f2fc89364ed9391bd493560ff674f06b54 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ }, "homepage": "https://renovatebot.com", "engines": { - "node": "^10.13.0" + "node": "^10.13.0 || ^11.0.0" }, "dependencies": { "@renovate/pep440": "0.4.1", diff --git a/test/config/__snapshots__/validation.spec.js.snap b/test/config/__snapshots__/validation.spec.js.snap index ae99ed51959b4afb941bb1bdf392f045f01b68c5..f12b690515b9ce07255f016d68844b471f37189b 100644 --- a/test/config/__snapshots__/validation.spec.js.snap +++ b/test/config/__snapshots__/validation.spec.js.snap @@ -2,10 +2,6 @@ exports[`config/validation validateConfig(config) errors for all types 1`] = ` Array [ - Object { - "depName": "Configuration Error", - "message": "extends: Invalid timezone: Europe/Brussel", - }, Object { "depName": "Configuration Error", "message": "Configuration option \`enabled\` should be boolean. Found: 1 (number)", @@ -38,6 +34,10 @@ Array [ "depName": "Configuration Error", "message": "Invalid schedule: \`Schedule \\"every 15 mins every weekday\\" should not specify minutes\`", }, + Object { + "depName": "Configuration Error", + "message": "extends: Invalid timezone: Europe/Brussel", + }, Object { "depName": "Configuration Error", "message": "packageRules must contain JSON objects",