2019-01-19 19:05:26 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const assert = require("assert");
|
|
|
|
const process = require("process");
|
|
|
|
const execa = require("execa");
|
|
|
|
|
|
|
|
function exit(err) {
|
|
|
|
if (err) {
|
|
|
|
console.info(err);
|
|
|
|
}
|
|
|
|
process.exit(err ? 1 : 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
async function run(args) {
|
2019-06-27 20:11:39 +00:00
|
|
|
const {stdout} = await execa("./updates.js", args.split(/\s+/));
|
|
|
|
return JSON.parse(stdout);
|
2019-01-19 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
async function main() {
|
|
|
|
assert.deepStrictEqual(await run("-j -f test.json"), {
|
|
|
|
results: {
|
|
|
|
"gulp-sourcemaps": {
|
|
|
|
old: "2.0.0",
|
2019-02-25 20:50:12 +00:00
|
|
|
new: "2.6.5",
|
2019-02-03 15:26:24 +00:00
|
|
|
info: "https://github.com/gulp-sourcemaps/gulp-sourcemaps",
|
2019-01-19 19:05:26 +00:00
|
|
|
},
|
|
|
|
"prismjs": {
|
|
|
|
old: "1.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
new: "1.16.0",
|
2019-01-20 21:26:30 +00:00
|
|
|
info: "https://github.com/LeaVerou/prism",
|
|
|
|
},
|
|
|
|
"svgstore": {
|
|
|
|
old: "^3.0.0",
|
|
|
|
new: "^3.0.0-2",
|
|
|
|
info: "https://github.com/svgstore/svgstore",
|
2019-02-25 20:50:12 +00:00
|
|
|
},
|
|
|
|
"html-webpack-plugin": {
|
|
|
|
old: "4.0.0-alpha.2",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "4.0.0-beta.7",
|
2019-02-25 20:50:12 +00:00
|
|
|
info: "https://github.com/jantimon/html-webpack-plugin",
|
2019-02-25 21:46:39 +00:00
|
|
|
},
|
|
|
|
"noty": {
|
|
|
|
old: "3.1.0",
|
|
|
|
new: "3.2.0-beta",
|
|
|
|
info: "https://github.com/needim/noty",
|
2019-03-28 20:22:49 +00:00
|
|
|
},
|
|
|
|
"jpeg-buffer-orientation": {
|
|
|
|
old: "0.0.0",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "2.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
info: "https://github.com/fisker/jpeg-buffer-orientation",
|
2019-04-25 17:50:03 +00:00
|
|
|
},
|
|
|
|
"styled-components": {
|
|
|
|
old: "2.5.0-1",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "5.0.0-beta.8",
|
2019-04-25 17:50:03 +00:00
|
|
|
info: "https://github.com/styled-components/styled-components",
|
|
|
|
},
|
2019-06-27 17:25:12 +00:00
|
|
|
"@babel/preset-env": {
|
|
|
|
old: "7.0.0",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "7.5.4",
|
2019-06-27 17:25:12 +00:00
|
|
|
info: "https://babeljs.io/",
|
|
|
|
}
|
2019-01-19 19:05:26 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
assert.deepStrictEqual(await run("-j -g -f test.json"), {
|
|
|
|
results: {
|
|
|
|
"gulp-sourcemaps": {
|
|
|
|
old: "2.0.0",
|
2019-02-25 20:50:12 +00:00
|
|
|
new: "2.6.5",
|
2019-02-03 15:26:24 +00:00
|
|
|
info: "https://github.com/gulp-sourcemaps/gulp-sourcemaps",
|
2019-01-19 19:05:26 +00:00
|
|
|
},
|
|
|
|
"prismjs": {
|
|
|
|
old: "1.0.0",
|
2019-06-27 17:15:01 +00:00
|
|
|
new: "9000.0.1",
|
2019-01-20 21:26:30 +00:00
|
|
|
info: "https://github.com/LeaVerou/prism",
|
2019-02-25 20:50:12 +00:00
|
|
|
},
|
|
|
|
"html-webpack-plugin": {
|
|
|
|
old: "4.0.0-alpha.2",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "4.0.0-beta.7",
|
2019-02-25 20:50:12 +00:00
|
|
|
info: "https://github.com/jantimon/html-webpack-plugin",
|
2019-02-25 21:46:39 +00:00
|
|
|
},
|
|
|
|
"noty": {
|
|
|
|
old: "3.1.0",
|
|
|
|
new: "3.1.4",
|
|
|
|
info: "https://github.com/needim/noty",
|
2019-03-28 20:22:49 +00:00
|
|
|
},
|
|
|
|
"jpeg-buffer-orientation": {
|
|
|
|
old: "0.0.0",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "2.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
info: "https://github.com/fisker/jpeg-buffer-orientation",
|
2019-04-25 17:50:03 +00:00
|
|
|
},
|
|
|
|
"styled-components": {
|
|
|
|
old: "2.5.0-1",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "5.0.0-beta.8",
|
2019-04-25 17:50:03 +00:00
|
|
|
info: "https://github.com/styled-components/styled-components",
|
|
|
|
},
|
2019-06-27 17:25:12 +00:00
|
|
|
"@babel/preset-env": {
|
|
|
|
old: "7.0.0",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "7.5.4",
|
2019-06-27 17:25:12 +00:00
|
|
|
info: "https://babeljs.io/",
|
|
|
|
}
|
2019-01-19 19:05:26 +00:00
|
|
|
}
|
|
|
|
});
|
2019-01-20 21:34:40 +00:00
|
|
|
|
|
|
|
assert.deepStrictEqual(await run("-j -g -p -f test.json"), {
|
|
|
|
results: {
|
|
|
|
"gulp-sourcemaps": {
|
|
|
|
old: "2.0.0",
|
2019-02-25 20:50:12 +00:00
|
|
|
new: "2.6.5",
|
2019-02-03 15:26:24 +00:00
|
|
|
info: "https://github.com/gulp-sourcemaps/gulp-sourcemaps",
|
2019-01-20 21:34:40 +00:00
|
|
|
},
|
|
|
|
"prismjs": {
|
|
|
|
old: "1.0.0",
|
2019-06-27 17:15:01 +00:00
|
|
|
new: "9000.0.1",
|
2019-01-20 21:34:40 +00:00
|
|
|
info: "https://github.com/LeaVerou/prism",
|
|
|
|
},
|
|
|
|
"svgstore": {
|
|
|
|
old: "^3.0.0",
|
|
|
|
new: "^3.0.0-2",
|
|
|
|
info: "https://github.com/svgstore/svgstore",
|
2019-02-25 20:50:12 +00:00
|
|
|
},
|
|
|
|
"html-webpack-plugin": {
|
|
|
|
old: "4.0.0-alpha.2",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "4.0.0-beta.7",
|
2019-02-25 20:50:12 +00:00
|
|
|
info: "https://github.com/jantimon/html-webpack-plugin",
|
2019-02-25 21:46:39 +00:00
|
|
|
},
|
|
|
|
"noty": {
|
|
|
|
old: "3.1.0",
|
|
|
|
new: "3.2.0-beta",
|
|
|
|
info: "https://github.com/needim/noty",
|
2019-03-28 20:22:49 +00:00
|
|
|
},
|
|
|
|
"jpeg-buffer-orientation": {
|
|
|
|
old: "0.0.0",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "2.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
info: "https://github.com/fisker/jpeg-buffer-orientation",
|
2019-04-25 17:50:03 +00:00
|
|
|
},
|
|
|
|
"styled-components": {
|
|
|
|
old: "2.5.0-1",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "5.0.0-beta.8",
|
2019-04-25 17:50:03 +00:00
|
|
|
info: "https://github.com/styled-components/styled-components",
|
|
|
|
},
|
2019-06-27 17:25:12 +00:00
|
|
|
"@babel/preset-env": {
|
|
|
|
old: "7.0.0",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "7.5.4",
|
2019-06-27 17:25:12 +00:00
|
|
|
info: "https://babeljs.io/",
|
|
|
|
}
|
2019-02-25 21:46:39 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
assert.deepStrictEqual(await run("-j -R -f test.json"), {
|
|
|
|
results: {
|
|
|
|
"gulp-sourcemaps": {
|
|
|
|
old: "2.0.0",
|
|
|
|
new: "2.6.5",
|
|
|
|
info: "https://github.com/gulp-sourcemaps/gulp-sourcemaps",
|
|
|
|
},
|
|
|
|
"prismjs": {
|
|
|
|
old: "1.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
new: "1.16.0",
|
2019-02-25 21:46:39 +00:00
|
|
|
info: "https://github.com/LeaVerou/prism",
|
|
|
|
},
|
|
|
|
"svgstore": {
|
|
|
|
old: "^3.0.0",
|
|
|
|
new: "^2.0.3",
|
|
|
|
info: "https://github.com/svgstore/svgstore",
|
|
|
|
},
|
|
|
|
"html-webpack-plugin": {
|
|
|
|
old: "4.0.0-alpha.2",
|
|
|
|
new: "3.2.0",
|
|
|
|
info: "https://github.com/jantimon/html-webpack-plugin",
|
|
|
|
},
|
|
|
|
"noty": {
|
|
|
|
old: "3.1.0",
|
|
|
|
new: "3.1.4",
|
|
|
|
info: "https://github.com/needim/noty",
|
2019-03-28 20:22:49 +00:00
|
|
|
},
|
|
|
|
"jpeg-buffer-orientation": {
|
|
|
|
old: "0.0.0",
|
2019-07-05 16:39:05 +00:00
|
|
|
new: "2.0.0",
|
2019-03-28 20:22:49 +00:00
|
|
|
info: "https://github.com/fisker/jpeg-buffer-orientation",
|
2019-04-25 17:50:03 +00:00
|
|
|
},
|
|
|
|
"styled-components": {
|
|
|
|
old: "2.5.0-1",
|
2019-06-27 17:15:01 +00:00
|
|
|
new: "4.3.2",
|
2019-04-25 17:50:03 +00:00
|
|
|
info: "https://github.com/styled-components/styled-components",
|
|
|
|
},
|
2019-06-27 17:25:12 +00:00
|
|
|
"@babel/preset-env": {
|
|
|
|
old: "7.0.0",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "7.5.4",
|
2019-06-27 17:25:12 +00:00
|
|
|
info: "https://babeljs.io/",
|
|
|
|
}
|
2019-01-20 21:34:40 +00:00
|
|
|
}
|
|
|
|
});
|
2019-03-28 20:22:49 +00:00
|
|
|
|
|
|
|
assert.deepStrictEqual(await run("-j -P -f test.json"), {
|
|
|
|
results: {
|
|
|
|
"gulp-sourcemaps": {
|
|
|
|
old: "2.0.0",
|
|
|
|
new: "2.0.1",
|
|
|
|
info: "https://github.com/floridoo/gulp-sourcemaps",
|
|
|
|
},
|
|
|
|
"svgstore": {
|
|
|
|
old: "^3.0.0",
|
|
|
|
new: "^3.0.0-2",
|
|
|
|
info: "https://github.com/svgstore/svgstore",
|
|
|
|
},
|
|
|
|
"html-webpack-plugin": {
|
|
|
|
old: "4.0.0-alpha.2",
|
2019-07-12 14:18:50 +00:00
|
|
|
new: "4.0.0-beta.7",
|
2019-03-28 20:22:49 +00:00
|
|
|
info: "https://github.com/jantimon/html-webpack-plugin",
|
|
|
|
},
|
|
|
|
"noty": {
|
|
|
|
old: "3.1.0",
|
|
|
|
new: "3.1.4",
|
|
|
|
info: "https://github.com/needim/noty",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
});
|
2019-01-19 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main().then(exit).catch(exit);
|