Fix time formatting in different node versions

This commit is contained in:
Cadence Ember
2026-10-13 23:46:04 +13:00
parent c196bef0ba
commit 7902b91c38
5 changed files with 9 additions and 8 deletions
+2 -4
View File
@@ -1,10 +1,8 @@
#!/usr/bin/env node
// @ts-check
// Temporal API stabilised in Node.js 26. Previous versions can use `--harmony-temporal`, but that's jank, so have a polyfill.
if (!("Temporal" in globalThis)) {
require("temporal-polyfill-lite/global")
}
// Ensure consistent output from the Intl and Temporal API across Node.js versions
require("temporal-polyfill-lite/global")
const fs = require("fs")
const sqlite = require("better-sqlite3")