chore: Update deps & check for removed version

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
Richie Bendall 2019-07-29 16:36:06 +12:00
parent 4a7e289d33
commit 921100429e
No known key found for this signature in database
GPG key ID: 1C6A99DFA9D306FC
7 changed files with 9 additions and 9 deletions

View file

@ -27,8 +27,13 @@ function report(content, fix) {
try { try {
const data = await readFile(path.join('users', user), "utf8") const data = await readFile(path.join('users', user), "utf8")
try { try {
const u = JSON.parse(data); let u = JSON.parse(data);
if (!u.locked && !u.copyright) report(`Copyright not specified in ${user}`) if (!u.locked && !u.copyright) report(`Copyright not specified in ${user}`)
if (u.version) report(`Version tag found in ${user}`, () => {
delete u.version
const stringified = `${JSON.stringify(u, 0, 2)}\n`
fs.writeFile(path.join('users', user), stringified, () => { })
})
const stringified = `${JSON.stringify(u, 0, 2)}\n` const stringified = `${JSON.stringify(u, 0, 2)}\n`
if (data !== stringified) report(`Non-regular formatting in ${user}`, () => fs.writeFile(path.join('users', user), stringified, () => {})) if (data !== stringified) report(`Non-regular formatting in ${user}`, () => fs.writeFile(path.join('users', user), stringified, () => {}))
} catch ({ } catch ({

View file

@ -1,6 +1,5 @@
{ {
"copyright": "Code Clarity", "copyright": "Code Clarity",
"theme": "double-windsor", "theme": "double-windsor",
"email": "support@icodeclarity.com", "email": "support@icodeclarity.com"
"version": "a526bf7ad1"
} }

View file

@ -1,6 +1,5 @@
{ {
"copyright": "Peter D Johnson", "copyright": "Peter D Johnson",
"url": "http://delphidabbler.com/", "url": "http://delphidabbler.com/",
"format": "text", "format": "text"
"version": "fdcf640"
} }

View file

@ -4,6 +4,5 @@
"email": "me@harryscheiner.com", "email": "me@harryscheiner.com",
"format": "html", "format": "html",
"gravatar": true, "gravatar": true,
"version": "6d33a046",
"theme": "default" "theme": "default"
} }

View file

@ -2,7 +2,6 @@
"copyright": "Jesús Urrutia", "copyright": "Jesús Urrutia",
"url": "http://jesusurrutia.com", "url": "http://jesusurrutia.com",
"email": "jesus.urrutia@gmail.com", "email": "jesus.urrutia@gmail.com",
"version": "html",
"gravatar": true, "gravatar": true,
"theme": "default" "theme": "default"
} }

View file

@ -3,6 +3,5 @@
"url": "http://mdag.my", "url": "http://mdag.my",
"email": "info+mitlicense@mdag.my", "email": "info+mitlicense@mdag.my",
"format": "html", "format": "html",
"theme": "double-windsor", "theme": "double-windsor"
"version": "a526bf7ad1"
} }

BIN
yarn.lock

Binary file not shown.