chore: update biome to 2.4.14 & apply lint fixes

This commit is contained in:
M. George Hansen 2026-05-03 09:37:53 -07:00
parent 0e26241e4a
commit f08a99ccb1
Signed by: mgeorgehansen
SSH key fingerprint: SHA256:JlIGiQLPyQ2RHTH3a2oVlb20Xkh9Glr8DUF4YTXHJxM
17 changed files with 491 additions and 461 deletions

View file

@ -1,16 +1,21 @@
{ {
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", "$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
"organizeImports": { "files": {
"includes": ["**", "!dist", "!node_modules", "!.temp"]
},
"assist": {
"enabled": true, "enabled": true,
"ignore": ["dist", "node_modules", ".temp"] "actions": {
"source": {
"organizeImports": "on"
}
}
}, },
"formatter": { "formatter": {
"enabled": true, "enabled": true
"ignore": ["dist", "node_modules", ".temp"]
}, },
"linter": { "linter": {
"enabled": true, "enabled": true,
"ignore": ["dist", "node_modules", ".temp"],
"rules": { "rules": {
"recommended": true, "recommended": true,
"style": { "style": {
@ -23,7 +28,7 @@
}, },
"overrides": [ "overrides": [
{ {
"include": ["test"], "includes": ["test/**"],
"linter": { "linter": {
"rules": { "rules": {
"a11y": { "a11y": {

View file

@ -1,5 +1,9 @@
import { stylesheet } from "typestyle"; import { stylesheet } from "typestyle";
import { type Component, createElement } from "websnacks"; import {
type Component,
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
createElement,
} from "websnacks";
const styles = stylesheet({ const styles = stylesheet({
header: { header: {

View file

@ -1,6 +1,10 @@
import { normalize } from "csstips"; import { normalize } from "csstips";
import { stylesheet } from "typestyle"; import { stylesheet } from "typestyle";
import { type Component, createElement } from "websnacks"; import {
type Component,
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
createElement,
} from "websnacks";
import { stylesheetPath } from "../config"; import { stylesheetPath } from "../config";
import { Header } from "./header"; import { Header } from "./header";

View file

@ -1,5 +1,9 @@
import { stylesheet } from "typestyle"; import { stylesheet } from "typestyle";
import { type Component, createElement } from "websnacks"; import {
type Component,
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
createElement,
} from "websnacks";
const styles = stylesheet({ const styles = stylesheet({
navbar: { navbar: {

View file

@ -20,7 +20,7 @@
"websnacks": "bin/websnacks.js" "websnacks": "bin/websnacks.js"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.3", "@biomejs/biome": "2.4.14",
"@types/node": "~18", "@types/node": "~18",
"@types/ws": "^7.4.0", "@types/ws": "^7.4.0",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",

View file

@ -1,4 +1,8 @@
import { type Component, createElement } from "websnacks"; import {
type Component,
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
createElement,
} from "websnacks";
import { Layout } from "../components/layout"; import { Layout } from "../components/layout";

View file

@ -1,5 +1,9 @@
import { stylesheet } from "typestyle"; import { stylesheet } from "typestyle";
import { type Component, createElement } from "websnacks"; import {
type Component,
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
createElement,
} from "websnacks";
import { Layout } from "../components/layout"; import { Layout } from "../components/layout";

View file

@ -4,7 +4,7 @@ import type { Config } from "websnacks";
import { stylesheetPath } from "./config"; import { stylesheetPath } from "./config";
const config: Config = { const _config: Config = {
// Watch additional files and folders for changes when the dev server is // Watch additional files and folders for changes when the dev server is
// running. // running.
watch: ["components/", "config.ts"], watch: ["components/", "config.ts"],

872
package-lock.json generated
View file

@ -1,434 +1,442 @@
{ {
"name": "@websnacksjs/websnacks", "name": "@websnacksjs/websnacks",
"version": "0.2.0", "version": "0.2.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@websnacksjs/websnacks", "name": "@websnacksjs/websnacks",
"version": "0.2.0", "version": "0.2.0",
"license": "MPL-2.0", "license": "MPL-2.0",
"bin": { "bin": {
"websnacks": "bin/websnacks.js" "websnacks": "bin/websnacks.js"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.3", "@biomejs/biome": "2.4.14",
"@types/node": "~18", "@types/node": "~18",
"@types/ws": "^7.4.0", "@types/ws": "^7.4.0",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "~4.9.5" "typescript": "~4.9.5"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
"optionalDependencies": { "optionalDependencies": {
"node-watch": "^0.7.1", "node-watch": "^0.7.1",
"ws": "^7.4.3" "ws": "^7.4.3"
} }
}, },
"node_modules/@biomejs/biome": { "node_modules/@biomejs/biome": {
"version": "1.8.3", "version": "2.4.14",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.8.3.tgz", "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.14.tgz",
"integrity": "sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==", "integrity": "sha512-TmAvxOEgrpLypzVGJ8FulIZnlyA9TxrO1hyqYrCz9r+bwma9xXxuLA5IuYnj55XQneFx460KjRbx6SWGLkg3bQ==",
"dev": true, "dev": true,
"hasInstallScript": true, "license": "MIT OR Apache-2.0",
"bin": { "bin": {
"biome": "bin/biome" "biome": "bin/biome"
}, },
"engines": { "engines": {
"node": ">=14.21.3" "node": ">=14.21.3"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/biome" "url": "https://opencollective.com/biome"
}, },
"optionalDependencies": { "optionalDependencies": {
"@biomejs/cli-darwin-arm64": "1.8.3", "@biomejs/cli-darwin-arm64": "2.4.14",
"@biomejs/cli-darwin-x64": "1.8.3", "@biomejs/cli-darwin-x64": "2.4.14",
"@biomejs/cli-linux-arm64": "1.8.3", "@biomejs/cli-linux-arm64": "2.4.14",
"@biomejs/cli-linux-arm64-musl": "1.8.3", "@biomejs/cli-linux-arm64-musl": "2.4.14",
"@biomejs/cli-linux-x64": "1.8.3", "@biomejs/cli-linux-x64": "2.4.14",
"@biomejs/cli-linux-x64-musl": "1.8.3", "@biomejs/cli-linux-x64-musl": "2.4.14",
"@biomejs/cli-win32-arm64": "1.8.3", "@biomejs/cli-win32-arm64": "2.4.14",
"@biomejs/cli-win32-x64": "1.8.3" "@biomejs/cli-win32-x64": "2.4.14"
} }
}, },
"node_modules/@biomejs/cli-darwin-arm64": { "node_modules/@biomejs/cli-darwin-arm64": {
"version": "1.8.3", "version": "2.4.14",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.3.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.14.tgz",
"integrity": "sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==", "integrity": "sha512-XvgoE9XOawUOQPdmvs4J7wPhi/DLwSCGks3AlPJDmh34O0awRTqCED1HRcRDdpf1Zrp4us4MGOOdIxNpbqNF5Q==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
"dev": true, "dev": true,
"optional": true, "license": "MIT OR Apache-2.0",
"os": [ "optional": true,
"darwin" "os": [
], "darwin"
"engines": { ],
"node": ">=14.21.3" "engines": {
} "node": ">=14.21.3"
}, }
"node_modules/@biomejs/cli-darwin-x64": { },
"version": "1.8.3", "node_modules/@biomejs/cli-darwin-x64": {
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.3.tgz", "version": "2.4.14",
"integrity": "sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==", "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.14.tgz",
"cpu": [ "integrity": "sha512-jE7hKBCFhOx3uUh+ZkWBfOHxAcILPfhFplNkuID/eZeSTLHzfZzoZxW8fbqY9xXRnPi7jGNAf1iPVR+0yWsM/Q==",
"x64" "cpu": [
], "x64"
"dev": true, ],
"optional": true, "dev": true,
"os": [ "license": "MIT OR Apache-2.0",
"darwin" "optional": true,
], "os": [
"engines": { "darwin"
"node": ">=14.21.3" ],
} "engines": {
}, "node": ">=14.21.3"
"node_modules/@biomejs/cli-linux-arm64": { }
"version": "1.8.3", },
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.3.tgz", "node_modules/@biomejs/cli-linux-arm64": {
"integrity": "sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==", "version": "2.4.14",
"cpu": [ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.14.tgz",
"arm64" "integrity": "sha512-2TELhZnW5RSLL063l9rc5xLpA0ZIw0Ccwy/0q384rvNAgFw3yI76bd59547yxowdQr5MNPET/xDLrLuvgSeeWQ==",
], "cpu": [
"dev": true, "arm64"
"optional": true, ],
"os": [ "dev": true,
"linux" "license": "MIT OR Apache-2.0",
], "optional": true,
"engines": { "os": [
"node": ">=14.21.3" "linux"
} ],
}, "engines": {
"node_modules/@biomejs/cli-linux-arm64-musl": { "node": ">=14.21.3"
"version": "1.8.3", }
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.3.tgz", },
"integrity": "sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==", "node_modules/@biomejs/cli-linux-arm64-musl": {
"cpu": [ "version": "2.4.14",
"arm64" "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.14.tgz",
], "integrity": "sha512-/z+6gqAqqUQTHazwStxSXKHg9b8UvqBmDFRp+c4wYbq2KXhELQDon9EoC9RpmQ8JWkqQx/lIUy/cs+MhzDZp6A==",
"dev": true, "cpu": [
"optional": true, "arm64"
"os": [ ],
"linux" "dev": true,
], "license": "MIT OR Apache-2.0",
"engines": { "optional": true,
"node": ">=14.21.3" "os": [
} "linux"
}, ],
"node_modules/@biomejs/cli-linux-x64": { "engines": {
"version": "1.8.3", "node": ">=14.21.3"
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.3.tgz", }
"integrity": "sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==", },
"cpu": [ "node_modules/@biomejs/cli-linux-x64": {
"x64" "version": "2.4.14",
], "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.14.tgz",
"dev": true, "integrity": "sha512-zHrlQZDBDUz4OLAraYpWKcnLS6HOewBFWYOzY91d1ZjdqZwibOyb6BEu6WuWLugyo0P3riCmsbV9UqV1cSXwQg==",
"optional": true, "cpu": [
"os": [ "x64"
"linux" ],
], "dev": true,
"engines": { "license": "MIT OR Apache-2.0",
"node": ">=14.21.3" "optional": true,
} "os": [
}, "linux"
"node_modules/@biomejs/cli-linux-x64-musl": { ],
"version": "1.8.3", "engines": {
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.3.tgz", "node": ">=14.21.3"
"integrity": "sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==", }
"cpu": [ },
"x64" "node_modules/@biomejs/cli-linux-x64-musl": {
], "version": "2.4.14",
"dev": true, "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.14.tgz",
"optional": true, "integrity": "sha512-R6BWgJdQOwW9ulJatuTVrQkjnODjqHZkKNOqb1sz++3Noe5LYd0i3PchnOBUCYAPHoPWHhjJqbdZlHEu0hpjdA==",
"os": [ "cpu": [
"linux" "x64"
], ],
"engines": { "dev": true,
"node": ">=14.21.3" "license": "MIT OR Apache-2.0",
} "optional": true,
}, "os": [
"node_modules/@biomejs/cli-win32-arm64": { "linux"
"version": "1.8.3", ],
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.3.tgz", "engines": {
"integrity": "sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==", "node": ">=14.21.3"
"cpu": [ }
"arm64" },
], "node_modules/@biomejs/cli-win32-arm64": {
"dev": true, "version": "2.4.14",
"optional": true, "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.14.tgz",
"os": [ "integrity": "sha512-M3EH5hqOI/F/FUA2u4xcLoUgmxd218mvuj/6JL7Hv2toQvr2/AdOvKSpGkoRuWFCtQPVa+ZqkEV3Q5xBA9+XSA==",
"win32" "cpu": [
], "arm64"
"engines": { ],
"node": ">=14.21.3" "dev": true,
} "license": "MIT OR Apache-2.0",
}, "optional": true,
"node_modules/@biomejs/cli-win32-x64": { "os": [
"version": "1.8.3", "win32"
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.3.tgz", ],
"integrity": "sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==", "engines": {
"cpu": [ "node": ">=14.21.3"
"x64" }
], },
"dev": true, "node_modules/@biomejs/cli-win32-x64": {
"optional": true, "version": "2.4.14",
"os": [ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.14.tgz",
"win32" "integrity": "sha512-WL0EG5qE+EAKomGXbf2g6VnSKJhTL3tXC0QRzWRwA5VpjxNYa6H4P7ZWfymbGE4IhZZQi1KXQ2R0YjwInmz2fA==",
], "cpu": [
"engines": { "x64"
"node": ">=14.21.3" ],
} "dev": true,
}, "license": "MIT OR Apache-2.0",
"node_modules/@cspotcode/source-map-support": { "optional": true,
"version": "0.8.1", "os": [
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "win32"
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", ],
"dev": true, "engines": {
"dependencies": { "node": ">=14.21.3"
"@jridgewell/trace-mapping": "0.3.9" }
}, },
"engines": { "node_modules/@cspotcode/source-map-support": {
"node": ">=12" "version": "0.8.1",
} "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
}, "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"node_modules/@jridgewell/resolve-uri": { "dev": true,
"version": "3.1.2", "dependencies": {
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "@jridgewell/trace-mapping": "0.3.9"
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", },
"dev": true, "engines": {
"engines": { "node": ">=12"
"node": ">=6.0.0" }
} },
}, "node_modules/@jridgewell/resolve-uri": {
"node_modules/@jridgewell/sourcemap-codec": { "version": "3.1.2",
"version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true,
"dev": true "engines": {
}, "node": ">=6.0.0"
"node_modules/@jridgewell/trace-mapping": { }
"version": "0.3.9", },
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "node_modules/@jridgewell/sourcemap-codec": {
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "version": "1.5.0",
"dev": true, "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"dependencies": { "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
"@jridgewell/resolve-uri": "^3.0.3", "dev": true
"@jridgewell/sourcemap-codec": "^1.4.10" },
} "node_modules/@jridgewell/trace-mapping": {
}, "version": "0.3.9",
"node_modules/@tsconfig/node10": { "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"version": "1.0.11", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "dev": true,
"integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", "dependencies": {
"dev": true "@jridgewell/resolve-uri": "^3.0.3",
}, "@jridgewell/sourcemap-codec": "^1.4.10"
"node_modules/@tsconfig/node12": { }
"version": "1.0.11", },
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "node_modules/@tsconfig/node10": {
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "version": "1.0.11",
"dev": true "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
}, "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
"node_modules/@tsconfig/node14": { "dev": true
"version": "1.0.3", },
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "node_modules/@tsconfig/node12": {
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "version": "1.0.11",
"dev": true "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
}, "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"node_modules/@tsconfig/node16": { "dev": true
"version": "1.0.4", },
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "node_modules/@tsconfig/node14": {
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "version": "1.0.3",
"dev": true "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
}, "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"node_modules/@types/node": { "dev": true
"version": "18.19.39", },
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz", "node_modules/@tsconfig/node16": {
"integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==", "version": "1.0.4",
"dev": true, "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
"dependencies": { "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
"undici-types": "~5.26.4" "dev": true
} },
}, "node_modules/@types/node": {
"node_modules/@types/ws": { "version": "18.19.39",
"version": "7.4.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.39.tgz",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.0.tgz", "integrity": "sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==",
"integrity": "sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw==", "dev": true,
"dev": true, "dependencies": {
"dependencies": { "undici-types": "~5.26.4"
"@types/node": "*" }
} },
}, "node_modules/@types/ws": {
"node_modules/acorn-walk": { "version": "7.4.0",
"version": "8.3.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.0.tgz",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", "integrity": "sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw==",
"integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true,
"dev": true, "dependencies": {
"dependencies": { "@types/node": "*"
"acorn": "^8.11.0" }
}, },
"engines": { "node_modules/acorn-walk": {
"node": ">=0.4.0" "version": "8.3.3",
} "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
}, "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
"node_modules/acorn-walk/node_modules/acorn": { "dev": true,
"version": "8.12.1", "dependencies": {
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "acorn": "^8.11.0"
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", },
"dev": true, "engines": {
"bin": { "node": ">=0.4.0"
"acorn": "bin/acorn" }
}, },
"engines": { "node_modules/acorn-walk/node_modules/acorn": {
"node": ">=0.4.0" "version": "8.12.1",
} "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
}, "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"node_modules/arg": { "dev": true,
"version": "4.1.3", "bin": {
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "acorn": "bin/acorn"
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", },
"dev": true "engines": {
}, "node": ">=0.4.0"
"node_modules/create-require": { }
"version": "1.1.1", },
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "node_modules/arg": {
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "version": "4.1.3",
"dev": true "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
}, "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"node_modules/diff": { "dev": true
"version": "4.0.2", },
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "node_modules/create-require": {
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "version": "1.1.1",
"dev": true, "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"engines": { "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"node": ">=0.3.1" "dev": true
} },
}, "node_modules/diff": {
"node_modules/make-error": { "version": "4.0.2",
"version": "1.3.6", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true,
"dev": true "engines": {
}, "node": ">=0.3.1"
"node_modules/node-watch": { }
"version": "0.7.1", },
"resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.7.1.tgz", "node_modules/make-error": {
"integrity": "sha512-UWblPYuZYrkCQCW5PxAwYSxaELNBLUckrTBBk8xr1/bUgyOkYYTsUcV4e3ytcazFEOyiRyiUrsG37pu6I0I05g==", "version": "1.3.6",
"optional": true, "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"engines": { "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"node": ">=6" "dev": true
} },
}, "node_modules/node-watch": {
"node_modules/ts-node": { "version": "0.7.1",
"version": "10.9.2", "resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.7.1.tgz",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-UWblPYuZYrkCQCW5PxAwYSxaELNBLUckrTBBk8xr1/bUgyOkYYTsUcV4e3ytcazFEOyiRyiUrsG37pu6I0I05g==",
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "optional": true,
"dev": true, "engines": {
"dependencies": { "node": ">=6"
"@cspotcode/source-map-support": "^0.8.0", }
"@tsconfig/node10": "^1.0.7", },
"@tsconfig/node12": "^1.0.7", "node_modules/ts-node": {
"@tsconfig/node14": "^1.0.0", "version": "10.9.2",
"@tsconfig/node16": "^1.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
"acorn": "^8.4.1", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
"acorn-walk": "^8.1.1", "dev": true,
"arg": "^4.1.0", "dependencies": {
"create-require": "^1.1.0", "@cspotcode/source-map-support": "^0.8.0",
"diff": "^4.0.1", "@tsconfig/node10": "^1.0.7",
"make-error": "^1.1.1", "@tsconfig/node12": "^1.0.7",
"v8-compile-cache-lib": "^3.0.1", "@tsconfig/node14": "^1.0.0",
"yn": "3.1.1" "@tsconfig/node16": "^1.0.2",
}, "acorn": "^8.4.1",
"bin": { "acorn-walk": "^8.1.1",
"ts-node": "dist/bin.js", "arg": "^4.1.0",
"ts-node-cwd": "dist/bin-cwd.js", "create-require": "^1.1.0",
"ts-node-esm": "dist/bin-esm.js", "diff": "^4.0.1",
"ts-node-script": "dist/bin-script.js", "make-error": "^1.1.1",
"ts-node-transpile-only": "dist/bin-transpile.js", "v8-compile-cache-lib": "^3.0.1",
"ts-script": "dist/bin-script-deprecated.js" "yn": "3.1.1"
}, },
"peerDependencies": { "bin": {
"@swc/core": ">=1.2.50", "ts-node": "dist/bin.js",
"@swc/wasm": ">=1.2.50", "ts-node-cwd": "dist/bin-cwd.js",
"@types/node": "*", "ts-node-esm": "dist/bin-esm.js",
"typescript": ">=2.7" "ts-node-script": "dist/bin-script.js",
}, "ts-node-transpile-only": "dist/bin-transpile.js",
"peerDependenciesMeta": { "ts-script": "dist/bin-script-deprecated.js"
"@swc/core": { },
"optional": true "peerDependencies": {
}, "@swc/core": ">=1.2.50",
"@swc/wasm": { "@swc/wasm": ">=1.2.50",
"optional": true "@types/node": "*",
} "typescript": ">=2.7"
} },
}, "peerDependenciesMeta": {
"node_modules/ts-node/node_modules/acorn": { "@swc/core": {
"version": "8.12.1", "optional": true
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", },
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "@swc/wasm": {
"dev": true, "optional": true
"bin": { }
"acorn": "bin/acorn" }
}, },
"engines": { "node_modules/ts-node/node_modules/acorn": {
"node": ">=0.4.0" "version": "8.12.1",
} "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
}, "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"node_modules/typescript": { "dev": true,
"version": "4.9.5", "bin": {
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "acorn": "bin/acorn"
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", },
"dev": true, "engines": {
"bin": { "node": ">=0.4.0"
"tsc": "bin/tsc", }
"tsserver": "bin/tsserver" },
}, "node_modules/typescript": {
"engines": { "version": "4.9.5",
"node": ">=4.2.0" "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
} "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
}, "dev": true,
"node_modules/undici-types": { "bin": {
"version": "5.26.5", "tsc": "bin/tsc",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "tsserver": "bin/tsserver"
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", },
"dev": true "engines": {
}, "node": ">=4.2.0"
"node_modules/v8-compile-cache-lib": { }
"version": "3.0.1", },
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "node_modules/undici-types": {
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "version": "5.26.5",
"dev": true "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
}, "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"node_modules/ws": { "dev": true
"version": "7.4.3", },
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", "node_modules/v8-compile-cache-lib": {
"integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==", "version": "3.0.1",
"optional": true, "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"engines": { "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"node": ">=8.3.0" "dev": true
}, },
"peerDependencies": { "node_modules/ws": {
"bufferutil": "^4.0.1", "version": "7.4.3",
"utf-8-validate": "^5.0.2" "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz",
}, "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==",
"peerDependenciesMeta": { "optional": true,
"bufferutil": { "engines": {
"optional": true "node": ">=8.3.0"
}, },
"utf-8-validate": { "peerDependencies": {
"optional": true "bufferutil": "^4.0.1",
} "utf-8-validate": "^5.0.2"
} },
}, "peerDependenciesMeta": {
"node_modules/yn": { "bufferutil": {
"version": "3.1.1", "optional": true
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", },
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "utf-8-validate": {
"dev": true, "optional": true
"engines": { }
"node": ">=6" }
} },
} "node_modules/yn": {
} "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true,
"engines": {
"node": ">=6"
}
}
}
} }

View file

@ -36,7 +36,7 @@
"test:e2e": "cd test && ts-node --script-mode ./run-e2e.ts" "test:e2e": "cd test && ts-node --script-mode ./run-e2e.ts"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.3", "@biomejs/biome": "2.4.14",
"@types/node": "~18", "@types/node": "~18",
"@types/ws": "^7.4.0", "@types/ws": "^7.4.0",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",

View file

@ -58,7 +58,7 @@ const copyStaticAssets = async ({
}: ConfigPaths): Promise<void> => { }: ConfigPaths): Promise<void> => {
try { try {
await fs.access(staticAssetsDir); await fs.access(staticAssetsDir);
} catch (error) { } catch (_error) {
// Static assets folder doesn't exist, so no-op. // Static assets folder doesn't exist, so no-op.
return; return;
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/ */
import { promises as fs, existsSync, watch } from "node:fs"; import { existsSync, promises as fs, watch } from "node:fs";
import * as http from "node:http"; import * as http from "node:http";
import * as path from "node:path"; import * as path from "node:path";
@ -152,7 +152,7 @@ const startHttpServer = async (publicDir: string): Promise<http.Server> => {
let contents: Buffer | string; let contents: Buffer | string;
try { try {
contents = await fs.readFile(path.join(publicDir, reqPath)); contents = await fs.readFile(path.join(publicDir, reqPath));
} catch (error) { } catch (_error) {
console.error(`unable to load file ${reqPath}`); console.error(`unable to load file ${reqPath}`);
res.writeHead(404); res.writeHead(404);
res.end(); res.end();

View file

@ -66,7 +66,7 @@ export const loadConfig = async (rootDir: string): Promise<Config> => {
decacheModule(configPath); decacheModule(configPath);
// TODO: validate user config. // TODO: validate user config.
userConfig = await import(configPath); userConfig = await import(configPath);
} catch (error) { } catch (_error) {
// Use default config; // Use default config;
} }
const outDir = path.join(rootDir, "public"); const outDir = path.join(rootDir, "public");

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/ */
export { HTMLElement, Component, Fragment } from "./component"; export { Component, Fragment, HTMLElement } from "./component";
export { UserConfig as Config, defineConfig } from "./config"; export { defineConfig, UserConfig as Config } from "./config";
export { createElement } from "./create-element"; export { createElement } from "./create-element";
export * from "./jsx"; export * from "./jsx";

View file

@ -7,10 +7,10 @@ import { promises as fs } from "node:fs";
import * as path from "node:path"; import * as path from "node:path";
import { import {
WEBSNACKS_BIN_PATH,
WEBSNACKS_REPO_ROOT,
npmCmd, npmCmd,
runCommand, runCommand,
WEBSNACKS_BIN_PATH,
WEBSNACKS_REPO_ROOT,
withTempDir, withTempDir,
} from "../helpers/e2e"; } from "../helpers/e2e";
import { testSuite } from "../lib"; import { testSuite } from "../lib";

View file

@ -7,10 +7,10 @@ import { promises as fs } from "node:fs";
import * as path from "node:path"; import * as path from "node:path";
import { import {
WEBSNACKS_BIN_PATH,
WEBSNACKS_REPO_ROOT,
npmCmd, npmCmd,
runCommand, runCommand,
WEBSNACKS_BIN_PATH,
WEBSNACKS_REPO_ROOT,
wait, wait,
withTempDir, withTempDir,
} from "../helpers/e2e"; } from "../helpers/e2e";

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/ */
import { type Component, Fragment, createElement } from "../../dist"; import { type Component, createElement, Fragment } from "../../dist";
import { renderPage } from "../../dist/render"; import { renderPage } from "../../dist/render";
import { testSuite } from "../lib"; import { testSuite } from "../lib";
@ -118,7 +118,6 @@ testSuite("renderPage", ({ test, expect }) => {
const html = renderPage( const html = renderPage(
<html> <html>
<div <div
// biome-ignore lint/security/noDangerouslySetInnerHtml: explicit test
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: "<div>red alert!</div>", __html: "<div>red alert!</div>",
}} }}
@ -135,8 +134,6 @@ testSuite("renderPage", ({ test, expect }) => {
renderPage( renderPage(
<html> <html>
<div <div
// biome-ignore lint/security/noDangerouslySetInnerHtml: explicit test
// biome-ignore lint/security/noDangerouslySetInnerHtmlWithChildren: explicit test
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: "<div>set phasers to kill</div>", __html: "<div>set phasers to kill</div>",
}} }}