update json example, add TODO

This commit is contained in:
silverwind 2020-03-08 17:13:23 +01:00
parent d492217684
commit f625635364
Signed by: silverwind
GPG Key ID: 2E62B41C93869443
2 changed files with 13 additions and 14 deletions

@ -86,20 +86,19 @@ $ updates -j | jq
{
"results": {
"dependencies": {
"string-width": {
"old": "2.1.1",
"new": "3.0.0",
"info": "https://github.com/sindresorhus/string-width"
},
"p-map": {
"old": "3.0.0",
"new": "4.0.0",
"info": "https://github.com/sindresorhus/p-map",
"age": "3 days"
}
},
"devDependencies": {
"eslint": {
"old": "5.9.0",
"new": "5.10.0",
"info": "https://github.com/eslint/eslint"
},
"eslint-config-silverwind": {
"old": "2.0.11",
"new": "2.0.12",
"info": "https://github.com/silverwind/eslint-config-silverwind"
"old": "6.7.2",
"new": "6.8.0",
"info": "https://github.com/eslint/eslint",
"age": "3 months"
}
}
}

@ -609,7 +609,7 @@ async function checkUrlDep([key, dep], {useGreatest} = {}) {
const newRange = dep.old.replace(oldRef, newRef);
return {key, newRange, user, repo, oldRef, newRef, newDate};
}
} else {
} else { // TODO: newDate support
const res = await fetch(`https://api.github.com/repos/${user}/${repo}/git/refs/tags`);
if (!res || !res.ok) return;
const data = await res.json();