chore(site): update strobe to 0.16.0 (#62521)

This commit is contained in:
Adam
2026-11-06 23:36:32 -06:00
committed by GitHub
Unverified
parent e5aeb2bce6
commit 2b3a0d4410
3 changed files with 16 additions and 22 deletions
+7 -7
View File
@@ -1034,7 +1034,7 @@
"@effect/platform-node-shared": "4.1.0",
"@effect/sql-sqlite-bun": "4.1.0",
"@effect/sql-sqlite-node": "4.1.0",
"@hona/strobe": "0.15.0",
"@hona/strobe": "0.16.0",
"@kobalte/core": "0.13.13",
"@lydell/node-pty": "1.2.0-beta.12",
"@npmcli/arborist": "9.4.0",
@@ -1684,17 +1684,17 @@
"@happy-dom/global-registrator": ["@happy-dom/global-registrator@20.0.11", "", { "dependencies": { "@types/node": "^20.0.0", "happy-dom": "^20.0.11" } }, "sha512-GqNqiShBT/lzkHTMC/slKBrvN0DsD4Di8ssBk4aDaVgEn+2WMzE6DXxq701ndSXj7/0cJ8mNT71pM7Bnrr6JRw=="],
"@hona/strobe": ["@hona/strobe@0.15.0", "", { "optionalDependencies": { "@hona/strobe-darwin-arm64": "0.15.0", "@hona/strobe-darwin-x64": "0.15.0", "@hona/strobe-linux-arm64": "0.15.0", "@hona/strobe-linux-x64": "0.15.0", "@hona/strobe-win32-x64": "0.15.0" }, "bin": { "strobe": "bin/strobe.js" } }, "sha512-XkFTIkwHJ5xA+BhgH4SMwp7qRGgJRsSC8HKIUfGew636gOYoZ8VRjMR9HacI/rtudjMEsgXThNUtZuWxaDVKzA=="],
"@hona/strobe": ["@hona/strobe@0.16.0", "", { "optionalDependencies": { "@hona/strobe-darwin-arm64": "0.16.0", "@hona/strobe-darwin-x64": "0.16.0", "@hona/strobe-linux-arm64": "0.16.0", "@hona/strobe-linux-x64": "0.16.0", "@hona/strobe-win32-x64": "0.16.0" }, "bin": { "strobe": "bin/strobe.js" } }, "sha512-G2EoecbtwiWPzGiPs+kj2r0FAfnOl7YIUhL3e3Cmn9cKQ4MFJ9oziMV3WL9MdB9xbSQDvBsxM2phRORQ8GzkGg=="],
"@hona/strobe-darwin-arm64": ["@hona/strobe-darwin-arm64@0.15.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WJ1igXPrRILxOunJQy/l1J9gH1PRzTLDTC9okuG1WPBDI922nwwp/MAm2VHE+wfFiG4q4QMZk3z/Gg7D2/6Rfg=="],
"@hona/strobe-darwin-arm64": ["@hona/strobe-darwin-arm64@0.16.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-yYG5YFuBmiIhbGAgInNZ9Z7DwDjhBtLcpWItSHk28fpRe1QcBZHdyHtgMCSYiuXUadOAWCOzD9e3MFUjA81yPA=="],
"@hona/strobe-darwin-x64": ["@hona/strobe-darwin-x64@0.15.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-XWQnJrovJKfHPd3XuuRN3byyJCAE4mNQL8WslLqlzpuLafJWs22T3xC8N8uqneE8xDSXaM7uqzLEMIsAZXh/sw=="],
"@hona/strobe-darwin-x64": ["@hona/strobe-darwin-x64@0.16.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-/idrUVcg2OnSrFWs9hQN5P3lZYhrlEKoea5d6evVKWSP0TQ7URdRoeQbF/A9xv8wbj0oAxx+FYao4lhi4ECrtQ=="],
"@hona/strobe-linux-arm64": ["@hona/strobe-linux-arm64@0.15.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-SJbOJpfCEN/nE9hfwvbhIMse4jnUhntYidmNqE8z26EAdkpwfWrwDE12ix2jkVD6u0iSj3Kq19wzGNPILwnggA=="],
"@hona/strobe-linux-arm64": ["@hona/strobe-linux-arm64@0.16.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-XvgYQ+AKjTHrRG3vyxJQSznqVY/jtFL837EW+MkLGQFLDLpZgf80CTz9QfxnFFVFSWA8Ttqrvhu3fvrdZo8EEA=="],
"@hona/strobe-linux-x64": ["@hona/strobe-linux-x64@0.15.0", "", { "os": "linux", "cpu": "x64" }, "sha512-bFKNJTDgNNV7zpcE8hbTUFeeBuNKSQOaNJR2D4hB7ipe3F/3XwknSDYPnHgpI7L+ywxzzWdtUbzcxfXqGewtMQ=="],
"@hona/strobe-linux-x64": ["@hona/strobe-linux-x64@0.16.0", "", { "os": "linux", "cpu": "x64" }, "sha512-d5SAEc1KT/s5UQT+xrR1IONGeVbaPza0NjvhEdCIurYri/gLYExWIAsJflUefcJh5z74MRKl5vBnn71JtNIAvg=="],
"@hona/strobe-win32-x64": ["@hona/strobe-win32-x64@0.15.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ZPIXk9t97NE7EBjuZVFm0a0TTr5x33nNsGtjE7hcYNzIXb376kSZATA05jumLr854/Yew1pyOtgqI+5lq0dBgA=="],
"@hona/strobe-win32-x64": ["@hona/strobe-win32-x64@0.16.0", "", { "os": "win32", "cpu": "x64" }, "sha512-xXMFlWa4zUR/jsnlqc3ZW0P0mfXqjEp2+sqw7JyxLXtTJnjt+M+FvmlnjZUwKpnN4AZ1+e2CutNKNJg+QC+UgA=="],
"@hono/node-server": ["@hono/node-server@2.1.5", "", { "peerDependencies": { "hono": "^4 || ^5.0.0-0" } }, "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q=="],
+1 -1
View File
@@ -49,7 +49,7 @@
"@effect/sql-sqlite-node": "4.1.0",
"@npmcli/arborist": "9.4.0",
"@types/bun": "1.4.3",
"@hona/strobe": "0.15.0",
"@hona/strobe": "0.16.0",
"@types/cross-spawn": "6.0.6",
"@octokit/rest": "22.0.0",
"@opentui/core": "0.8.1",
+8 -14
View File
@@ -6,10 +6,9 @@
// Loads are returning visits: each run navigates from about:blank with the HTTP cache warm, so they
// measure parsing, running and hydrating the page's code, not the network. Interactions start from a
// fresh load of the home page, so each run is the first ⌘K, hover or click after a load.
import { bench, url, web, type Context, type PrepareContext, type RunCase } from "@hona/strobe"
import { bench, url, web, type Context, type RunCase } from "@hona/strobe"
const desktop = { width: 1440, height: 900 }
const phone = { width: 390, height: 844 }
const card = '[data-component="products"][data-layout="carousel"] [data-component="product-card"] [data-slot="media"]'
// Absolute: page.goto resolves a relative path against about:blank after the reset.
@@ -23,16 +22,10 @@ const load = (path: string): RunCase<unknown> => ({
})
// Each target's input: a desktop has a mouse, a phone a touch screen, and the site takes different
// paths for each (preloading links as they scroll into view, autoplaying card videos). Headless
// Chromium as strobe 0.14 launches it has neither and matches (hover: none), so until strobe gives it
// a mouse, point STROBE_BROWSER at a wrapper that runs Chrome with
// --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4.
// The phone target turns touch emulation on, and setup refuses a page with the wrong input.
const touch = async (ctx: PrepareContext<unknown>) => {
const session = await ctx.playwright.context.newCDPSession(ctx.playwright.page)
await session.send("Emulation.setTouchEmulationEnabled", { enabled: true, maxTouchPoints: 5 })
}
// paths for each (preloading links as they scroll into view, autoplaying card videos), so setup
// refuses a page with the wrong input. strobe 0.16 refuses pointer input (scrolls, taps) on an
// emulated phone until its touch input lands, and a mouse wheel or click on a touch page isn't what a
// phone visitor does, so for now the phone times its load only and the pointer cases run on a desktop.
const reload = async (ctx: Context<unknown>) => {
await ctx.page.goto(new URL("/", ctx.url).href)
await ctx.page.idle()
@@ -41,7 +34,7 @@ const reload = async (ctx: Context<unknown>) => {
export default bench({
targets: {
desktop: web({ url: "/", viewport: desktop }),
phone: web({ url: "/", viewport: phone, scale: 3, prepare: touch }),
phone: web({ url: "/", emulate: "mobile" }),
// The live site, for reference only: `--target production --blocks 5 --head .` (nothing to build).
production: url("https://opencode.ai/", { viewport: desktop }),
},
@@ -58,7 +51,7 @@ export default bench({
"load-docs": { ...load("/docs/"), targets: ["desktop", "production"] },
"scroll-home": {
primary: "main.work",
targets: ["desktop", "phone", "production"],
targets: ["desktop", "production"],
run: ({ page }) => page.scroll("main", { by: 12000, speed: 6000 }),
reset: reload,
},
@@ -85,6 +78,7 @@ export default bench({
},
"card-open": {
primary: "main.work",
targets: ["desktop", "production"],
run: async ({ page }) => {
await page.click(card, { until: '[data-component="product-hero"]' })
await page.idle()