From 60c23e5f39e9bb253c6f68b6b8fd9c256b9e420e Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Sat, 7 Sep 2024 17:23:03 +0100 Subject: [PATCH] add script to update authors --- AUTHORS.txt | 3 +++ package-lock.json | 16 ++++++++++++++++ package.json | 9 +++++---- scripts/update-authors.js | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 scripts/update-authors.js diff --git a/AUTHORS.txt b/AUTHORS.txt index 7e5a858a..99bd17aa 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -31,3 +31,6 @@ i2p-lbt Andrew Ettinger Joshua Benuck Eric Dobbs +Andrew Shell +Matthew B. Gray +decaffeinate diff --git a/package-lock.json b/package-lock.json index a9502346..51782d25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "async": "^3.2.1", "esbuild": "^0.23.1", "expect.js": "^0.3.1", + "grunt-git-authors": "^3.2.0", "localforage": "^1.7.3", "minisearch": "^7.1.0", "mocha": "^10.2.0", @@ -484,6 +485,21 @@ "integrity": "sha512-okDF/FAPEul1ZFLae4hrgpIqAeapoo5TRdcg/lD0iN9S3GWrBFIJwNezGH1DMtIz+RxU4RrFmMq7WUUvDg3J6A==", "dev": true }, + "node_modules/grunt-git-authors": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/grunt-git-authors/-/grunt-git-authors-3.2.0.tgz", + "integrity": "sha512-uDJGPKoO7H93wUnnDPsNIdIrfhifyhQln2tG1ulH25ceFeKuKTrTKYytzTUuxeaspss2t66amQlgaqUS9yo+2w==", + "dev": true, + "dependencies": { + "spawnback": "~1.0.0" + } + }, + "node_modules/grunt-git-authors/node_modules/spawnback": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/spawnback/-/spawnback-1.0.1.tgz", + "integrity": "sha512-340ZqtqJzWAZtHwaCC2gx4mdQOnkUWAWNDp7y0bCEatdjmgQ4j7b0qQ7qO5WIJWx/luNrKcrYzpKbH3NTR030A==", + "dev": true + }, "node_modules/localforage": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", diff --git a/package.json b/package.json index 1a6e339c..ee8f43c5 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "url": "https://rodwell.me" } ], - "dependencies": {}, "scripts": { "build": "npm run build:client && npm run build:test", "build:client": "npm run clean:client; node --no-warnings scripts/build-client.mjs", @@ -33,17 +32,19 @@ "clean:client": "rm client/client.js client/client.js.map meta-client.json", "clean:test": "rm client/test/testclient.js", "test": "mocha test/util.js test/random.js test/page.js test/lineup.js test/drop.js test/revision.js test/resolve.js test/wiki.js", - "runtests": "npm run build:test && ((sleep 1; open 'http://localhost:3000/runtests.html')&) && echo '\nBrowser will open to run tests.' && serve client" + "runtests": "npm run build:test && ((sleep 1; open 'http://localhost:3000/runtests.html')&) && echo '\nBrowser will open to run tests.' && serve client", + "update-authors": "node scripts/update-authors.js" }, "devDependencies": { + "async": "^3.2.1", "esbuild": "^0.23.1", "expect.js": "^0.3.1", + "grunt-git-authors": "^3.2.0", + "localforage": "^1.7.3", "minisearch": "^7.1.0", "mocha": "^10.2.0", "serve": "^14.2.3", "sinon": "^18.0.0", - "async": "^3.2.1", - "localforage": "^1.7.3", "underscore": "^1.13.6" }, "license": "MIT", diff --git a/scripts/update-authors.js b/scripts/update-authors.js new file mode 100644 index 00000000..95916717 --- /dev/null +++ b/scripts/update-authors.js @@ -0,0 +1,38 @@ +const gitAuthors = require('grunt-git-authors') + +// list of contributers from prior the split out of Smallest Federated Wiki repo. +const priorAuthors = [ + "Ward Cunningham ", + "Stephen Judkins ", + "Sam Goldstein ", + "Steven Black ", + "Don Park ", + "Sven Dowideit ", + "Adam Solove ", + "Nick Niemeir ", + "Erkan Yilmaz ", + "Matt Niemeir ", + "Daan van Berkel ", + "Nicholas Hallahan ", + "Ola Bini ", + "Danilo Sato ", + "Henning Schumann ", + "Michael Deardeuff ", + "Pete Hodgson ", + "Marcin Cieslak ", + "M. Kelley Harris (http://www.kelleyharris.com)", + "Ryan Bennett ", + "Paul Rodwell ", + "David Turnbull ", + "Austin King " +] + +gitAuthors.updateAuthors({ + priorAuthors: priorAuthors +}, (error, filename) => { + if (error) { + console.log('Error: ', error) + } else { + console.log(filename, 'updated') + } +})