From 1179016f78e6d3bb059aab432a4c2dbeab1cb459 Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Mon, 1 Jul 2024 12:46:53 -0400 Subject: [PATCH 1/6] Add contributors check Don't return next Wait for contributors --- contributors.yml | 77 ++++++++++++++++++++++++------------------------ gulpfile.js | 71 ++++++++++++++++++++++++++++++++++---------- package.json | 3 +- yarn.lock | 35 +++++++++++++--------- 4 files changed, 117 insertions(+), 69 deletions(-) diff --git a/contributors.yml b/contributors.yml index 0632c4cf..db9a9b11 100644 --- a/contributors.yml +++ b/contributors.yml @@ -1,24 +1,25 @@ -- [ unframework, Nick Matantsev ] -- [ spenserhale, Spenser Hale ] -- [ grimer30, Michael Stout ] +- [atesgoral, Ateş Göral] +- [unframework, Nick Matantsev] +- [spenserhale, Spenser Hale] +- [grimer30, Michael Stout] - Ferwex -- [ hermanprawiro, Herman Prawiro ] +- [hermanprawiro, Herman Prawiro] - IAmWave -- [ valkum, Rudi Floren ] -- [ codejnki, Patrick Stockton ] +- [valkum, Rudi Floren] +- [codejnki, Patrick Stockton] - Patrick-Jakubowski - lzelus - CozyRocket -- [ peterfreese, Peter Freese ] -- [ polarathene, Brennan Kinney ] -- [ cowboy, Ben Alman ] -- [ ekx, Benjamin Dengler ] -- [ pyaehtetaung, Sai Pyae Htet Aung ] -- [ Otto42, Samuel Wood ] +- [peterfreese, Peter Freese] +- [polarathene, Brennan Kinney] +- [cowboy, Ben Alman] +- [ekx, Benjamin Dengler] +- [pyaehtetaung, Sai Pyae Htet Aung] +- [Otto42, Samuel Wood] - IllegallyBlind - WolfWings -- [ FireGoblin, Michael Overstreet ] -- [ AlanDeSmet, Alan De Smet ] +- [FireGoblin, Michael Overstreet] +- [AlanDeSmet, Alan De Smet] - Gimlao - szubsteru - chris18191 @@ -36,50 +37,50 @@ - jlmitch5 - ocoss - LRFLEW -- [ johanatan, Jonathan Leonard ] +- [johanatan, Jonathan Leonard] - Mygod -- [ meh2481, Mark Hutcheson ] +- [meh2481, Mark Hutcheson] - qefn - psanetra -- [ jwueller, Johannes Wüller ] +- [jwueller, Johannes Wüller] - viamodulo - 18111398 -- [ hastebrot, Benjamin Gudehus ] +- [hastebrot, Benjamin Gudehus] - lezardi - henke37 - caitsith2 -- [ viiri, x0r & jthermit ] +- [viiri, x0r & jthermit] - Eirik0 - esseger -- [ michiexile, Mikael Vejdemo-Johansson ] -- [ gillius, Jason Winnebeck ] -- [ nhowell, Nick Howell ] +- [michiexile, Mikael Vejdemo-Johansson] +- [gillius, Jason Winnebeck] +- [nhowell, Nick Howell] - sniperrifle2004 -- [ truhlikfredy, Anton Krug ] -- [ nelson-antunes, Nelson Antonio Antunes Junior ] -- [ fbastien, Florian Bastien ] -- [ jdashton, Daniel Ashton ] -- [ steambap, Weilin Shi ] -- [ riophae, Fangzhou Li ] +- [truhlikfredy, Anton Krug] +- [nelson-antunes, Nelson Antonio Antunes Junior] +- [fbastien, Florian Bastien] +- [jdashton, Daniel Ashton] +- [steambap, Weilin Shi] +- [riophae, Fangzhou Li] - eiTTio - tobeannouncd - kyanet - 837951602 - Azijn -- [ mrflip, Philip Flip Kromer ] -- [ mathiaswk, Mathias Weirsøe Klitgaard ] +- [mrflip, Philip Flip Kromer] +- [mathiaswk, Mathias Weirsøe Klitgaard] - gjareno -- [ popq, Pop Qvarnström ] +- [popq, Pop Qvarnström] - ironwallaby - ichbineinNerd -- [ landfillbaby, Lucy Phipps ] -- [ dubaaron, Aaron Wallentine ] -- [ Whathecode, Steven Jeuris ] -- [ sutch, Dennis Sutch ] -- [ azimux, Miles Georgi ] +- [landfillbaby, Lucy Phipps] +- [dubaaron, Aaron Wallentine] +- [Whathecode, Steven Jeuris] +- [sutch, Dennis Sutch] +- [azimux, Miles Georgi] - FalconX4 -- [ marcinsmu, Marcin Smulewicz ] +- [marcinsmu, Marcin Smulewicz] - ad-pro -- [ clarfonthey, Clar Fon ] +- [clarfonthey, Clar Fon] - icez - Ammmob diff --git a/gulpfile.js b/gulpfile.js index 5f8bf897..109ea82a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,7 +7,6 @@ import loadPlugins from 'gulp-load-plugins'; import extend from 'extend'; import equal from 'deep-equal'; import md5 from 'md5'; -import yaml from 'js-yaml'; import {marked} from 'marked'; import through from 'through2'; import Vinyl from 'vinyl'; @@ -32,6 +31,14 @@ levels.forEach((level) => { }); function inspect() { + const contributors = JSON.parse( + fs.readFileSync('build/data/contributors.json', 'utf8'), + ); + + const contributorMap = Object.fromEntries( + contributors.map(({username}) => [username, true]), + ); + return plugins.data((file) => { let parsedPath = null; @@ -76,6 +83,10 @@ function inspect() { throw 'Level speed par mismatch'; } + if (!contributorMap[parsedPath.author]) { + throw `Author ${parsedPath.author} not added to contributors`; + } + const source = file.contents.toString(); let program = null; @@ -222,6 +233,38 @@ async function buildClean() { return deleteSync(['build']); } +async function buildContributors() { + return gulp + .src('contributors.yml') + .pipe(plugins.yaml({json: true})) + .pipe( + through.obj(function (file, _, next) { + let contributors = JSON.parse(file.contents.toString('utf8')); + + contributors = contributors.map((contributor) => { + return contributor instanceof Array + ? { + username: String(contributor[0]), + fullName: String(contributor[1]), + } + : { + username: String(contributor), + }; + }); + + const modified = file.clone(); + modified.contents = Buffer.from(JSON.stringify(contributors, null, 2)); + + next(null, modified); + }), + ) + .pipe(gulp.dest('build/data')); +} + +function waitContributors(callback) { + setTimeout(callback, 100); +} + function buildDataPrograms() { return gulp .src('solutions/*/*.asm') @@ -275,7 +318,9 @@ function buildDataPrograms() { function buildPage() { const index = JSON.parse(fs.readFileSync('build/data/index.json', 'utf8')); - let contributors = yaml.load(fs.readFileSync('contributors.yml', 'utf8')); + const contributors = JSON.parse( + fs.readFileSync('build/data/contributors.json', 'utf8'), + ); const topScores = levels.map((level) => { if (level.cutscene) { @@ -433,17 +478,6 @@ function buildPage() { }); }); - contributors = contributors.map((contributor) => { - return contributor instanceof Array - ? { - username: contributor[0], - fullName: contributor[1], - } - : { - username: contributor, - }; - }); - return gulp .src('index.html') .pipe( @@ -546,7 +580,7 @@ function buildGraphs() { ); }); - return next(); + next(); }), ) .pipe(gulp.dest('build/graphs')); @@ -554,8 +588,15 @@ function buildGraphs() { export const build = gulp.series( buildClean, + buildContributors, + waitContributors, buildDataPrograms, gulp.parallel(buildDataJsonp, buildGraphs, buildPage), ); -export default buildDataPrograms; +export default gulp.series( + buildClean, + buildContributors, + waitContributors, + buildDataPrograms, +); diff --git a/package.json b/package.json index 3eaf7996..80ba5149 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "private": true, "description": "Human Resource Machine solutions and size/speed hacks", "type": "module", - "dependencies": {}, "engines": { "node": ">= 18.16.0" }, @@ -23,12 +22,12 @@ "gulp-tap": "^2.0.0", "gulp-template": "^5.0.0", "gulp-wrap": "^0.15.0", + "gulp-yaml": "^2.0.4", "hrm-cpu": "^0.2.3", "hrm-level-data": "^1.1.2", "hrm-level-inbox-generator": "0.0.4", "hrm-level-outbox-generator": "0.0.2", "hrm-parser": "^0.2.2", - "js-yaml": "^4.1.0", "marked": "^5.0.0", "md5": "^2.3.0", "serve": "^14.2.0", diff --git a/yarn.lock b/yarn.lock index 3226cfe1..3adcbfa6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -203,11 +203,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - arr-diff@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" @@ -466,6 +461,13 @@ bufferstreams@1.0.1: dependencies: readable-stream "^1.0.33" +bufferstreams@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-2.0.1.tgz#441b267c2fc3fee02bb1d929289da113903bd5ef" + integrity sha512-ZswyIoBfFb3cVDsnZLLj2IDJ/0ppYdil/v2EGlZXvoefO689FokEmFEldhN5dV7R2QBxFneqTJOMIpfqhj+n0g== + dependencies: + readable-stream "^2.3.6" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -1664,6 +1666,18 @@ gulp-wrap@^0.15.0: tryit "^1.0.1" vinyl-bufferstream "^1.0.1" +gulp-yaml@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/gulp-yaml/-/gulp-yaml-2.0.4.tgz#86569e2becc9f5dfc95dc92db5a71a237f4b6ab4" + integrity sha512-S/9Ib8PO+jGkCvWDwBUkmFkeW7QM0pp4PO8NNrMEfWo5Sk30P+KqpyXc4055L/vOX326T/b9MhM4nw5EenyX9g== + dependencies: + bufferstreams "^2.0.1" + js-yaml "^3.13.1" + object-assign "^4.1.1" + plugin-error "^1.0.1" + replace-ext "^1.0.0" + through2 "^3.0.0" + gulp@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" @@ -2253,7 +2267,7 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -js-yaml@^3.13.0: +js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -2261,13 +2275,6 @@ js-yaml@^3.13.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - json-schema-traverse@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" @@ -3879,7 +3886,7 @@ through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^3.0.1: +through2@^3.0.0, through2@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== From 65da34423af684cb22585e0f15d6322098356c62 Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Tue, 2 Jul 2024 00:54:23 -0400 Subject: [PATCH 2/6] Fix contributors mismatches --- contributors.yml | 8 ++++++-- .../{11.26-Nelson.asm => 11.26-nelson-antunes.asm} | 0 ...{38.93.specific-AMob.asm => 38.93.specific-Ammmob.asm} | 0 .../{13.73-antonkrug.asm => 13.73-truhlikfredy.asm} | 0 .../{19.69-whathecode.asm => 19.69-Whathecode.asm} | 0 ...2.26.exploit-lezardo.asm => 92.26.exploit-lezardi.asm} | 0 .../{19.677-falconx4.asm => 19.677-FalconX4.asm} | 0 ...-insert-dubaaron.asm => 43.621.insertion-dubaaron.asm} | 0 8 files changed, 6 insertions(+), 2 deletions(-) rename solutions/17-Exclusive-Lounge-12.28/{11.26-Nelson.asm => 11.26-nelson-antunes.asm} (100%) rename solutions/20-Multiplication-Workshop-15.109/{38.93.specific-AMob.asm => 38.93.specific-Ammmob.asm} (100%) rename solutions/23-The-Littlest-Number-13.75/{13.73-antonkrug.asm => 13.73-truhlikfredy.asm} (100%) rename solutions/23-The-Littlest-Number-13.75/{19.69-whathecode.asm => 19.69-Whathecode.asm} (100%) rename solutions/32-Inventory-Report-16.393/{92.26.exploit-lezardo.asm => 92.26.exploit-lezardi.asm} (100%) rename solutions/40-Prime-Factory-28.399/{19.677-falconx4.asm => 19.677-FalconX4.asm} (100%) rename solutions/41-Sorting-Floor-34.714/{43.621-insert-dubaaron.asm => 43.621.insertion-dubaaron.asm} (100%) diff --git a/contributors.yml b/contributors.yml index db9a9b11..fe3cc41a 100644 --- a/contributors.yml +++ b/contributors.yml @@ -30,7 +30,7 @@ - og01 - fd1e4020 - Resnox -- AndrewBoudreau +- [andrewboudreau, Andrew] - mschordan - tuxuin - skwasjer @@ -44,6 +44,7 @@ - psanetra - [jwueller, Johannes Wüller] - viamodulo +- nanashi-juanto - 18111398 - [hastebrot, Benjamin Gudehus] - lezardi @@ -83,4 +84,7 @@ - ad-pro - [clarfonthey, Clar Fon] - icez -- Ammmob +- [Ammmob, AMob] +- [szubster, Tomasz Szuba] +- [truhlikfredy, Anton Krug] +- halchihal diff --git a/solutions/17-Exclusive-Lounge-12.28/11.26-Nelson.asm b/solutions/17-Exclusive-Lounge-12.28/11.26-nelson-antunes.asm similarity index 100% rename from solutions/17-Exclusive-Lounge-12.28/11.26-Nelson.asm rename to solutions/17-Exclusive-Lounge-12.28/11.26-nelson-antunes.asm diff --git a/solutions/20-Multiplication-Workshop-15.109/38.93.specific-AMob.asm b/solutions/20-Multiplication-Workshop-15.109/38.93.specific-Ammmob.asm similarity index 100% rename from solutions/20-Multiplication-Workshop-15.109/38.93.specific-AMob.asm rename to solutions/20-Multiplication-Workshop-15.109/38.93.specific-Ammmob.asm diff --git a/solutions/23-The-Littlest-Number-13.75/13.73-antonkrug.asm b/solutions/23-The-Littlest-Number-13.75/13.73-truhlikfredy.asm similarity index 100% rename from solutions/23-The-Littlest-Number-13.75/13.73-antonkrug.asm rename to solutions/23-The-Littlest-Number-13.75/13.73-truhlikfredy.asm diff --git a/solutions/23-The-Littlest-Number-13.75/19.69-whathecode.asm b/solutions/23-The-Littlest-Number-13.75/19.69-Whathecode.asm similarity index 100% rename from solutions/23-The-Littlest-Number-13.75/19.69-whathecode.asm rename to solutions/23-The-Littlest-Number-13.75/19.69-Whathecode.asm diff --git a/solutions/32-Inventory-Report-16.393/92.26.exploit-lezardo.asm b/solutions/32-Inventory-Report-16.393/92.26.exploit-lezardi.asm similarity index 100% rename from solutions/32-Inventory-Report-16.393/92.26.exploit-lezardo.asm rename to solutions/32-Inventory-Report-16.393/92.26.exploit-lezardi.asm diff --git a/solutions/40-Prime-Factory-28.399/19.677-falconx4.asm b/solutions/40-Prime-Factory-28.399/19.677-FalconX4.asm similarity index 100% rename from solutions/40-Prime-Factory-28.399/19.677-falconx4.asm rename to solutions/40-Prime-Factory-28.399/19.677-FalconX4.asm diff --git a/solutions/41-Sorting-Floor-34.714/43.621-insert-dubaaron.asm b/solutions/41-Sorting-Floor-34.714/43.621.insertion-dubaaron.asm similarity index 100% rename from solutions/41-Sorting-Floor-34.714/43.621-insert-dubaaron.asm rename to solutions/41-Sorting-Floor-34.714/43.621.insertion-dubaaron.asm From 6bf872aeeadd53c1e832f48eaa77c924b6875cfa Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Thu, 4 Jul 2024 22:55:20 -0400 Subject: [PATCH 3/6] Turn contributors into JSON --- contributors.json | 315 ++++++++++++++++++++++++++++++++++++++++++++++ contributors.yml | 90 ------------- gulpfile.js | 42 +------ 3 files changed, 318 insertions(+), 129 deletions(-) create mode 100644 contributors.json delete mode 100644 contributors.yml diff --git a/contributors.json b/contributors.json new file mode 100644 index 00000000..0fd4b407 --- /dev/null +++ b/contributors.json @@ -0,0 +1,315 @@ +[ + { + "username": "atesgoral", + "fullName": "Ateş Göral" + }, + { + "username": "unframework", + "fullName": "Nick Matantsev" + }, + { + "username": "spenserhale", + "fullName": "Spenser Hale" + }, + { + "username": "grimer30", + "fullName": "Michael Stout" + }, + { + "username": "Ferwex" + }, + { + "username": "hermanprawiro", + "fullName": "Herman Prawiro" + }, + { + "username": "IAmWave" + }, + { + "username": "valkum", + "fullName": "Rudi Floren" + }, + { + "username": "codejnki", + "fullName": "Patrick Stockton" + }, + { + "username": "Patrick-Jakubowski" + }, + { + "username": "lzelus" + }, + { + "username": "CozyRocket" + }, + { + "username": "peterfreese", + "fullName": "Peter Freese" + }, + { + "username": "polarathene", + "fullName": "Brennan Kinney" + }, + { + "username": "cowboy", + "fullName": "Ben Alman" + }, + { + "username": "ekx", + "fullName": "Benjamin Dengler" + }, + { + "username": "pyaehtetaung", + "fullName": "Sai Pyae Htet Aung" + }, + { + "username": "Otto42", + "fullName": "Samuel Wood" + }, + { + "username": "IllegallyBlind" + }, + { + "username": "WolfWings" + }, + { + "username": "FireGoblin", + "fullName": "Michael Overstreet" + }, + { + "username": "AlanDeSmet", + "fullName": "Alan De Smet" + }, + { + "username": "Gimlao" + }, + { + "username": "szubsteru" + }, + { + "username": "chris18191" + }, + { + "username": "Multirez" + }, + { + "username": "albertferras" + }, + { + "username": "Halling69" + }, + { + "username": "AaronKnowles" + }, + { + "username": "og01" + }, + { + "username": "fd1e4020" + }, + { + "username": "Resnox" + }, + { + "username": "andrewboudreau", + "fullName": "Andrew" + }, + { + "username": "mschordan" + }, + { + "username": "tuxuin" + }, + { + "username": "skwasjer" + }, + { + "username": "jlmitch5" + }, + { + "username": "ocoss" + }, + { + "username": "LRFLEW" + }, + { + "username": "johanatan", + "fullName": "Jonathan Leonard" + }, + { + "username": "Mygod" + }, + { + "username": "meh2481", + "fullName": "Mark Hutcheson" + }, + { + "username": "qefn" + }, + { + "username": "psanetra" + }, + { + "username": "jwueller", + "fullName": "Johannes Wüller" + }, + { + "username": "viamodulo" + }, + { + "username": "nanashi-juanto" + }, + { + "username": "18111398" + }, + { + "username": "hastebrot", + "fullName": "Benjamin Gudehus" + }, + { + "username": "lezardi" + }, + { + "username": "henke37" + }, + { + "username": "caitsith2" + }, + { + "username": "viiri", + "fullName": "x0r & jthermit" + }, + { + "username": "Eirik0" + }, + { + "username": "esseger" + }, + { + "username": "michiexile", + "fullName": "Mikael Vejdemo-Johansson" + }, + { + "username": "gillius", + "fullName": "Jason Winnebeck" + }, + { + "username": "nhowell", + "fullName": "Nick Howell" + }, + { + "username": "sniperrifle2004" + }, + { + "username": "truhlikfredy", + "fullName": "Anton Krug" + }, + { + "username": "nelson-antunes", + "fullName": "Nelson Antonio Antunes Junior" + }, + { + "username": "fbastien", + "fullName": "Florian Bastien" + }, + { + "username": "jdashton", + "fullName": "Daniel Ashton" + }, + { + "username": "steambap", + "fullName": "Weilin Shi" + }, + { + "username": "riophae", + "fullName": "Fangzhou Li" + }, + { + "username": "eiTTio" + }, + { + "username": "tobeannouncd" + }, + { + "username": "kyanet" + }, + { + "username": "837951602" + }, + { + "username": "Azijn" + }, + { + "username": "mrflip", + "fullName": "Philip Flip Kromer" + }, + { + "username": "mathiaswk", + "fullName": "Mathias Weirsøe Klitgaard" + }, + { + "username": "gjareno" + }, + { + "username": "popq", + "fullName": "Pop Qvarnström" + }, + { + "username": "ironwallaby" + }, + { + "username": "ichbineinNerd" + }, + { + "username": "landfillbaby", + "fullName": "Lucy Phipps" + }, + { + "username": "dubaaron", + "fullName": "Aaron Wallentine" + }, + { + "username": "Whathecode", + "fullName": "Steven Jeuris" + }, + { + "username": "sutch", + "fullName": "Dennis Sutch" + }, + { + "username": "azimux", + "fullName": "Miles Georgi" + }, + { + "username": "FalconX4" + }, + { + "username": "marcinsmu", + "fullName": "Marcin Smulewicz" + }, + { + "username": "ad-pro" + }, + { + "username": "clarfonthey", + "fullName": "Clar Fon" + }, + { + "username": "icez" + }, + { + "username": "Ammmob", + "fullName": "AMob" + }, + { + "username": "szubster", + "fullName": "Tomasz Szuba" + }, + { + "username": "truhlikfredy", + "fullName": "Anton Krug" + }, + { + "username": "halchihal" + } +] \ No newline at end of file diff --git a/contributors.yml b/contributors.yml deleted file mode 100644 index fe3cc41a..00000000 --- a/contributors.yml +++ /dev/null @@ -1,90 +0,0 @@ -- [atesgoral, Ateş Göral] -- [unframework, Nick Matantsev] -- [spenserhale, Spenser Hale] -- [grimer30, Michael Stout] -- Ferwex -- [hermanprawiro, Herman Prawiro] -- IAmWave -- [valkum, Rudi Floren] -- [codejnki, Patrick Stockton] -- Patrick-Jakubowski -- lzelus -- CozyRocket -- [peterfreese, Peter Freese] -- [polarathene, Brennan Kinney] -- [cowboy, Ben Alman] -- [ekx, Benjamin Dengler] -- [pyaehtetaung, Sai Pyae Htet Aung] -- [Otto42, Samuel Wood] -- IllegallyBlind -- WolfWings -- [FireGoblin, Michael Overstreet] -- [AlanDeSmet, Alan De Smet] -- Gimlao -- szubsteru -- chris18191 -- Multirez -- albertferras -- Halling69 -- AaronKnowles -- og01 -- fd1e4020 -- Resnox -- [andrewboudreau, Andrew] -- mschordan -- tuxuin -- skwasjer -- jlmitch5 -- ocoss -- LRFLEW -- [johanatan, Jonathan Leonard] -- Mygod -- [meh2481, Mark Hutcheson] -- qefn -- psanetra -- [jwueller, Johannes Wüller] -- viamodulo -- nanashi-juanto -- 18111398 -- [hastebrot, Benjamin Gudehus] -- lezardi -- henke37 -- caitsith2 -- [viiri, x0r & jthermit] -- Eirik0 -- esseger -- [michiexile, Mikael Vejdemo-Johansson] -- [gillius, Jason Winnebeck] -- [nhowell, Nick Howell] -- sniperrifle2004 -- [truhlikfredy, Anton Krug] -- [nelson-antunes, Nelson Antonio Antunes Junior] -- [fbastien, Florian Bastien] -- [jdashton, Daniel Ashton] -- [steambap, Weilin Shi] -- [riophae, Fangzhou Li] -- eiTTio -- tobeannouncd -- kyanet -- 837951602 -- Azijn -- [mrflip, Philip Flip Kromer] -- [mathiaswk, Mathias Weirsøe Klitgaard] -- gjareno -- [popq, Pop Qvarnström] -- ironwallaby -- ichbineinNerd -- [landfillbaby, Lucy Phipps] -- [dubaaron, Aaron Wallentine] -- [Whathecode, Steven Jeuris] -- [sutch, Dennis Sutch] -- [azimux, Miles Georgi] -- FalconX4 -- [marcinsmu, Marcin Smulewicz] -- ad-pro -- [clarfonthey, Clar Fon] -- icez -- [Ammmob, AMob] -- [szubster, Tomasz Szuba] -- [truhlikfredy, Anton Krug] -- halchihal diff --git a/gulpfile.js b/gulpfile.js index 109ea82a..66b204c1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -31,9 +31,7 @@ levels.forEach((level) => { }); function inspect() { - const contributors = JSON.parse( - fs.readFileSync('build/data/contributors.json', 'utf8'), - ); + const contributors = JSON.parse(fs.readFileSync('contributors.json', 'utf8')); const contributorMap = Object.fromEntries( contributors.map(({username}) => [username, true]), @@ -234,35 +232,7 @@ async function buildClean() { } async function buildContributors() { - return gulp - .src('contributors.yml') - .pipe(plugins.yaml({json: true})) - .pipe( - through.obj(function (file, _, next) { - let contributors = JSON.parse(file.contents.toString('utf8')); - - contributors = contributors.map((contributor) => { - return contributor instanceof Array - ? { - username: String(contributor[0]), - fullName: String(contributor[1]), - } - : { - username: String(contributor), - }; - }); - - const modified = file.clone(); - modified.contents = Buffer.from(JSON.stringify(contributors, null, 2)); - - next(null, modified); - }), - ) - .pipe(gulp.dest('build/data')); -} - -function waitContributors(callback) { - setTimeout(callback, 100); + return gulp.src('contributors.json').pipe(gulp.dest('build/data')); } function buildDataPrograms() { @@ -589,14 +559,8 @@ function buildGraphs() { export const build = gulp.series( buildClean, buildContributors, - waitContributors, buildDataPrograms, gulp.parallel(buildDataJsonp, buildGraphs, buildPage), ); -export default gulp.series( - buildClean, - buildContributors, - waitContributors, - buildDataPrograms, -); +export default gulp.series(buildClean, buildContributors, buildDataPrograms); From ae80b261527fa17ce7bf56567b76f6fcd3dc4d72 Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Thu, 4 Jul 2024 22:55:57 -0400 Subject: [PATCH 4/6] Remove gulp-yaml --- package.json | 1 - yarn.lock | 23 ++--------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 80ba5149..61689a46 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "gulp-tap": "^2.0.0", "gulp-template": "^5.0.0", "gulp-wrap": "^0.15.0", - "gulp-yaml": "^2.0.4", "hrm-cpu": "^0.2.3", "hrm-level-data": "^1.1.2", "hrm-level-inbox-generator": "0.0.4", diff --git a/yarn.lock b/yarn.lock index 3adcbfa6..92a0643f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,13 +461,6 @@ bufferstreams@1.0.1: dependencies: readable-stream "^1.0.33" -bufferstreams@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/bufferstreams/-/bufferstreams-2.0.1.tgz#441b267c2fc3fee02bb1d929289da113903bd5ef" - integrity sha512-ZswyIoBfFb3cVDsnZLLj2IDJ/0ppYdil/v2EGlZXvoefO689FokEmFEldhN5dV7R2QBxFneqTJOMIpfqhj+n0g== - dependencies: - readable-stream "^2.3.6" - bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -1666,18 +1659,6 @@ gulp-wrap@^0.15.0: tryit "^1.0.1" vinyl-bufferstream "^1.0.1" -gulp-yaml@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/gulp-yaml/-/gulp-yaml-2.0.4.tgz#86569e2becc9f5dfc95dc92db5a71a237f4b6ab4" - integrity sha512-S/9Ib8PO+jGkCvWDwBUkmFkeW7QM0pp4PO8NNrMEfWo5Sk30P+KqpyXc4055L/vOX326T/b9MhM4nw5EenyX9g== - dependencies: - bufferstreams "^2.0.1" - js-yaml "^3.13.1" - object-assign "^4.1.1" - plugin-error "^1.0.1" - replace-ext "^1.0.0" - through2 "^3.0.0" - gulp@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" @@ -2267,7 +2248,7 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== -js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@^3.13.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -3886,7 +3867,7 @@ through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^3.0.0, through2@^3.0.1: +through2@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== From a126e292d6cff3c352868e208efa855f437e5f26 Mon Sep 17 00:00:00 2001 From: Ates Goral Date: Thu, 4 Jul 2024 23:00:07 -0400 Subject: [PATCH 5/6] Add bit about contributors.json (and also reformat the HTML) --- index.html | 554 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 383 insertions(+), 171 deletions(-) diff --git a/index.html b/index.html index c6ea46fa..415adca2 100644 --- a/index.html +++ b/index.html @@ -1,20 +1,25 @@ - - - + + + - + - - - Fork me on GitHub + + + Fork me on GitHub