Fetching the latest release of a GitHub package with Cloudflare Workers
There's an example of this worker up at https://mod.jpwilliams.dev/github-release-version that can be used for any package like so: https://mod.jpwilliams.dev/github-release-version/jpwilliams/midi-mixer-releases. When creating the website for MIDI…
Nullish Short-Circuit Assignment in TypeScript 4.0 (beta)
On June 26th 2020, TypeScript 4.0 Beta was announced. The update brings a myriad of useful changes, but one such addition is something you'll quickly get in to the habit of using every day: Nullish Short-Circuit Assignment. You've used a += b before…
How to unpack the return type of a Promise in TypeScript
TypeScript 4.5 (released on November 17th, 2021) introduced the Awaited type that solves this problem. If you can use Awaited, use that instead of the below method. - edited 1st December, 2021 While making @jpwilliams/distributed-promise I came…
Using EventEmitters to resolve Promises from afar in Node.js
A common-but-powerful pattern I've come to frequent is the utilisation of EventEmitter alongside a Promise, enabling me to resolve said promise from an entirely different part of my code base. To demonstrate, let's revisit the basics of both an…
Modularising GraphQL for scale
When fiddling around with GraphQL projects, I've frequently found it difficult to know where things should go. Just like naming variables, naming and placing files is hard. The simplest method here is to bundle everything in to one file, but that…
Quirk CBT
Discovered the wonderful app Quirk CBT, an open source thought diary for Cognitive Behavioural Therapy. Not only is the project itself fantastic, but the development ethos behind it is wonderful too. Check out the readme.
Spirit
Rediscovered this nifty tool for creating SVG animations. Amazing UI.
Pqina FilePond
Found a really fancy little JS file uploader. The company, Pqina, do a few nice little libs.
Unplash
Found a beautiful site for CC stock images. Some great content here.
Protobot
Project idea generator. Having great fun planning out and drawing one of these every morning.
It's all about trade-offs
I recently had a great discussion regarding WebSockets and HTTP/2 with a former colleague. During the discourse, they uttered one line so deeply-set in truth that it must be shared. Repeatedly. "It's all about trade-offs." As someone who has been…