diff --git a/framework/incremental.ts b/framework/incremental.ts index 7846fa6..ef36367 100644 --- a/framework/incremental.ts +++ b/framework/incremental.ts @@ -318,14 +318,10 @@ export class Incremental { async compressImpl({ algo, buffer, hash }: CompressJob) { let out; - switch (algo) { - case "zstd": - out = await zstd(buffer); - break; - case "gzip": - out = await gzip(buffer, { level: 9 }); - break; - } + if (algo === "zstd") out = await zstd(buffer); + else if (algo === "gzip") out = await gzip(buffer, { level: 9 }); + else algo satisfies never; + let entry = this.compress.get(hash); if (!entry) { this.compress.set( diff --git a/package-lock.json b/package-lock.json index 4091726..2541db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "paperclover.net", + "name": "sitegen", "lockfileVersion": 3, "requires": true, "packages": { @@ -22,7 +22,7 @@ "vscode-textmate": "^9.2.0" }, "devDependencies": { - "@types/node": "^22.15.29", + "@types/node": "^24.0.10", "typescript": "^5.8.3" } }, @@ -1568,13 +1568,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.30.tgz", - "integrity": "sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==", + "version": "24.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.10.tgz", + "integrity": "sha512-ENHwaH+JIRTDIEEbDK6QSQntAYGtbvdDXnMXnZaZ6k13Du1dPMmprkEHIL7ok2Wl2aZevetwTAb5S+7yIF+enA==", "devOptional": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.8.0" } }, "node_modules/@types/unist": { @@ -4509,9 +4509,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "devOptional": true, "license": "MIT" }, diff --git a/package.json b/package.json index 9673939..6f7c941 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "vscode-textmate": "^9.2.0" }, "devDependencies": { - "@types/node": "^22.15.29", + "@types/node": "^24.0.10", "typescript": "^5.8.3" }, "imports": { diff --git a/readme.md b/readme.md index be4ae24..e28c480 100644 --- a/readme.md +++ b/readme.md @@ -25,7 +25,7 @@ that assist building websites. these tools power https://paperclover.net. - Databases with a typed SQLite wrapper. (`import "#sitegen/sqlite"`) - TODO: Meta and Open Graph generation. (`export const meta`) - TODO: Font subsetting tools to reduce bytes downloaded by fonts. -- **Built on the battle-tested Node.js runtime.** Partial support for Deno and Bun. +- **Built on the battle-tested Node.js runtime.** [1]: https://next.markojs.com diff --git a/run.js b/run.js index f7668cf..39c310f 100644 --- a/run.js +++ b/run.js @@ -1,8 +1,26 @@ // This file allows using Node.js in combination with // all available plugins. Usage: "node run