@ogygia/devtools

AllMajorMinorPatch Show pre-releases
0.14.0 minor

@ogygia/devtools

Minor Changes

  • #606 1fdd1a0 Thanks @PuruVJ! - - @ogygia/devtools: breaking: the dock no longer installs window.__ogygia_testing or loads a testing engine of its own. @ogygia/testing injects its engine into every page; list testing() from @ogygia/testing/vite in the app under test (the dock alone still feeds an injected engine).
  • #760 90a7449 Thanks @PuruVJ! - devtools: in production the profiler accepts only a secret of at least 16 bytes; a shorter one keeps its pages closed and says so (devtools_profiler_secret_short) devtools: the profiler allows ten wrong keys per address in 15 minutes (the login form, x-profiler-key and x-profile share the count), then answers 429 until the window passes devtools: a profiler login is a random session id the server signs; it expires after 12 hours, logout ends it, and any change to it is refused (everyone logs in once again after the upgrade) devtools: the profiler's beacon flag cookie belongs to one login: it ends when that session expires or logs out
  • #1192 b8d8cf0 Thanks @PuruVJ! - The profiler's /page, /reset, /replay/<id> and /logout take a POST only, so a link on another site can no longer change the profiler's state; a GET answers 405 with Allow: POST. The documented call is the same query sent as a POST: POST /__profiler/page?p=/slow/page&runs=6&format=json&key=<secret>. A run page opened from another site waits for a click before it profiles.

Patch Changes

  • #1387 d16b921 Thanks @PuruVJ! - An island whose hydration changed only attributes is read as the browser reads its tags: a > inside a quoted value no longer cuts the tag, values in any quoting with spaces around = and names in any case are compared, and the first of two same-name attributes is the one kept.
  • #509 936654e Thanks @PuruVJ! - - @ogygia/core: the dock's island-barrel finding says why barrels() left the barrel (it runs code of its own, it is a package the plugin does not list, an import of it marks a region, and so on) with the fix for that reason, and names barrels() from @ogygia/barrels when the app does not list it. - @ogygia/devtools: the profiler's island-barrel warning quotes the same reason, recorded by the build, and its fix names barrels() instead of the removed ogygia({ barrels }).
  • #1138 ad28936 Thanks @PuruVJ! - The profiler's page beacon posts only to an address on the page's own origin, read from the head the server wrote: a beacon tag naming another origin, or one outside the head, sends nothing.
  • #1451 032d21f Thanks @PuruVJ! - A request body that breaks off mid-upload is a 400 on the profiler's login and on the federation routes (the exposed table, a thaw notice), not a thrown error and a 500.
  • #1417 f326128 Thanks @PuruVJ! - The profiler's element counts and unsized images are read as the browser makes them: no tag from a quoted value, a comment ending at <!-->, one element for nested templates.
  • #1328 e6f19d2 Thanks @PuruVJ! - The page tab no longer reports a content-named file as not cached when its cache check failed or was refused (a network error, a 405 for HEAD): such a file is left out of the finding.
  • #475 81a40ea Thanks @PuruVJ! - Durations are measured on the monotonic clock: the memory store's TTLs, a federation deploy check's retry wait, the profiler's recording window, deadlines and busy waits, the testing API's wait, and the perf CLI's waits. A wall-clock step no longer moves them.
  • #1403 891228b Thanks @PuruVJ! - A hydration mismatch report drops a comment where the browser ends it (--!>, <!-->), and keeps a <!-- inside a script or a quoted value.
  • #533 49ff074 Thanks @PuruVJ! - - @ogygia/compiler: new package, ogygia's compiler and its Vite plugin: @ogygia/compiler (the compiler), @ogygia/compiler/vite (ogygia(), definePlugin) and @ogygia/compiler/ids. It uses core only through @ogygia/core/contract; core never depends on it. - @ogygia/core: breaking: the @ogygia/core/vite, @ogygia/core/internal/compiler and @ogygia/core/internal/compiler-ids import paths are gone. Import from ogygia/vite (or @ogygia/compiler/vite), @ogygia/compiler and @ogygia/compiler/ids instead; the names are the same. - @ogygia/core: the types of the ogygia:* virtual modules and the build's switches are named in core (@ogygia/core/contract), so core's own types no longer reach into the compiler. - ogygia: ogygia/vite, ogygia/internal/compiler and ogygia/internal/compiler-ids re-export @ogygia/compiler; apps change nothing. - @ogygia/barrels, @ogygia/cli, @ogygia/content, @ogygia/devtools, @ogygia/federation, @ogygia/flags, @ogygia/postrender, @ogygia/router: they take definePlugin and the compiler from @ogygia/compiler, a new peer dependency (ogygia brings it).
  • #457 1d836ac Thanks @PuruVJ! - The dev dock keeps the profiles of the 64 most recently profiled pages in memory, and the source-line tables of 256 app files, instead of one per page or file a long session ever touched.
  • #1457 620d27e Thanks @PuruVJ! - The head's end is found as the browser reads it: an app.html that writes </HEAD> gets ogygia's head injections, and a </head> inside a head script's text (a JSON-LD string) no longer takes them into the script. The body's end is found in any case.
  • #1523 682f539 Thanks @PuruVJ! - The devtools launcher rests above a page's fixed bottom bar (a phone layout's bottom navigation) instead of covering its buttons.
  • #878 08fd293 Thanks @PuruVJ! - The profiler's byte breakdown, page seed and standalone export read the page as a browser does: tags inside comments are ignored, and quoted >, single quotes and upper-case attributes no longer mislead them.
  • #871 38a5f65 Thanks @PuruVJ! - The profiler stops unpacking an uploaded .ogp past 256 MB and refuses it with devtools_profiler_upload_too_large (413), instead of unpacking any size.
  • #526 f7a51c3 Thanks @PuruVJ! - - @ogygia/devtools: one page beacon measures every profiled or dock-measured page, with or without the runtime: a Kit-hydrated page now reports the same visit an islands page does (long frames, the slowest interaction with its scripts, fonts, images, the CPU of an interaction), and the runtime's chunk no longer carries the page's vitals, long tasks or CPU sampler. - @ogygia/devtools: the dock starts the page beacon itself when the server did not put one in the page (an app without ogygia's handle), so its findings work there too: in dev at once, in a build (devtools switched on) as a small chunk loaded only then. - @ogygia/devtools: when that chunk fails to download, the page says so once (devtools_page_beacon_load_failed) instead of going unmeasured in silence.
  • #1332 7bcf458 Thanks @PuruVJ! - The Page tab no longer says "this page load was not measured" when reading the measurements failed: it says the read failed, with the error's message.
  • #2046 c2890d3 Thanks @PuruVJ! - An app with the profiler on (devtools({ profiler: true })) builds for production again: the profiler's islands no longer import a server module, which failed the browser build with virtual_wrong_realm.
  • #1097 47b5ba7 Thanks @PuruVJ! - The dock's "profile this page" waits out a busy profiler's long Retry-After up to its two-minute deadline (before, a wait past ~24 days failed the profile with machine_bad_time).
  • #1152 6eacf8b Thanks @PuruVJ! - @ogygia/devtools: the profiler reads each request body up to a cap that fits its route (the login, open before sign-in: 16 KB; the beacon: 6 MB; an uploaded .ogp or a posted report: 32 MB) and answers 413 past it without reading the rest.
  • #1383 782344d Thanks @PuruVJ! - The profiler's render diff and DOM diff cut markup at the tags the browser reads: a < or > inside an attribute value, a comment or a script no longer splits a tag, and single-quoted and unquoted attribute values are compared too.
  • #1108 6ddd1f2 Thanks @PuruVJ! - A report POSTed gzipped to the profiler is inflated under the same 256 MB cap as an uploaded .ogp, and refused past it with devtools_profiler_upload_too_large (413) instead of being inflated whole.
  • #868 c4ea513 Thanks @PuruVJ! - The profiler checks its key and session in constant time on every host, with Web Crypto; on a host without node:crypto login works and no plain comparison is used.
  • #1112 6315434 Thanks @PuruVJ! - The profiler login's next is read as a URL and kept only on the app's origin and under the profiler's path, so a profiler mounted at the root (path: '') no longer sends a logged-in user to another site.
  • #1330 56df4b8 Thanks @PuruVJ! - The profiler's browser store closes its database connection when a read or write fails, so a failed one no longer blocks later opens of the store.
  • #773 671c6ec Thanks @PuruVJ! - devtools: a profiler window id is a signed capability: it expires after 10 minutes, is signed under a key derived for window ids alone, and is checked in constant time; dev with no secret signs under a key of its own process (ids from before this release no longer check)
  • #773 671c6ec Thanks @PuruVJ! - A production profiler with no secret takes no window id (x-og-window): it writes no request to the store under one. The fixed dev key is used in dev only.
  • #529 32177c7 Thanks @PuruVJ! - - @ogygia/core: four new runtime hooks for a plugin's browser half: regionWoke, regionMismatched, navStarted and loadStarted; navigated now says whether the regions were reconciled, and holeFailed carries the hole's el. - @ogygia/devtools: the dock's Page, Hydration and Session readers and the testing API read the runtime hooks instead of core's event layer. - @ogygia/insights: a recorded session holds the runtime hook calls (SessionData.hooks, HookEntry) instead of core's events.
  • #1377 68b8253 Thanks @PuruVJ! - The profiler follows a prerendered redirect page however its meta refresh is written (single quotes, no quotes, spaces around =), and no longer takes text that only names one for a redirect.
  • #1707 b20ae04 Thanks @PuruVJ! - - breaking: an app's own pass over the HTML ogygia sends is the new @ogygia/rewrite package. ogygia.handle({ transform }) now throws handle_transform_moved; list rewrite() (from @ogygia/rewrite/vite, no options) beside ogygia(), and put a rewrite() handle before ogygia.handle() in sequence(). ogygia/markup is removed, and scanRegions / liftRegions / restoreRegions leave ogygia/server. - @ogygia/rewrite: rewrite({ match, render }) renders only the outermost custom elements match picks (a tag prefix, a list of tags, or a test), in one render(elements, ctx) call per chunk of the page and per region answer, so a streamed page keeps streaming and its later chunks are rendered too. - @ogygia/rewrite: each element render gets has ogygia's marks numbered from 0, so a cache can key on its bytes; equal elements in one call are rendered once. - @ogygia/rewrite: ctx carries kind, csr, url, event and signal, an AbortSignal that fires when the request is cancelled. - @ogygia/rewrite: a render's sheets go out once per key per response, into the head while it is open and inline before the first element that needs them after. - @ogygia/rewrite: a failed batch is retried one element at a time; an element that still fails, drops ogygia's marks, or returns HTML that does not close what it opens goes out as ogygia rendered it, with a warning in every build (rewrite_element_failed, rewrite_marks_lost), never thrown. - @ogygia/rewrite: an element split across streamed chunks goes out unrendered, said in dev (rewrite_element_split). - @ogygia/rewrite: several rewrites in sequence() run in order on one marking of the HTML; one listed after ogygia.handle() throws rewrite_after_ogygia, and a rewrite without the plugin throws rewrite_plugin_missing. - @ogygia/rewrite: rewrite({ page }) rewrites the whole document (held until its last chunk) or region answer, says rewrite_page_failed when it throws (thrown in dev), and has .html(str) for a plain string. - @ogygia/rewrite: .check(html, { kind, csr }) runs the whole round trip on one piece of markup for a test, listing failures and, with a DOM, every restored element that differs from Svelte's. - @ogygia/rewrite: a page where nothing was restored ships no restorer, and each streamed chunk that restored something ends with one short restore call. - @ogygia/devtools: the profiler reads a page's regions itself and no longer depends on @ogygia/rewrite.
  • #524 9df2941 Thanks @PuruVJ! - - @ogygia/core: a plugin's browser half subscribes to the runtime's moments with defineClient({ hooks: { … } }) (region mounted, hydrated, failed, hole answered, navigated and the rest); a hook no plugin subscribes to is left out of the runtime, and regionMount / regionUnmount move inside hooks. - @ogygia/devtools: the profiler's beacon is part of devtools' browser half, so an app without devtools no longer carries it in its runtime.
  • #721 a9072b3 Thanks @PuruVJ! - A region answer's server-timing (queue and render time) goes only to dev, a browser that turned devtools on, or the profiler's logged-in user; the profiler's beacon flag cookie now carries a value signed under the profiler secret, and a bare 1 no longer turns it on
  • #1148 addb6e5 Thanks @PuruVJ! - A recorded session (the Record tab, @ogygia/testing's record()) goes on across a full page load when the browser keeps the page it left in its back-forward cache, and a page restored from that cache records on.
  • #1464 e731728 Thanks @PuruVJ! - Stopping a devtools recording no longer removes a console.error wrapper the page added while it recorded (an error reporter keeps seeing console errors).
  • #1380 b41d12f Thanks @PuruVJ! - The profiler's standalone report reads a module script's type and src as the browser does (entities decoded, any quoting) and drops every copy of src, so a repeated src no longer makes the inlined runtime load a file instead of its own code.
  • #1167 562960d Thanks @PuruVJ! - The profiler's standalone HTML export sends the profiler secret only with the report page's own fetch, never with the stylesheets and chunks it inlines (which may be on another host, such as a CDN).
  • #531 dc985cf Thanks @PuruVJ! - - @ogygia/testing: withOgygia injects its own copy of the testing engine into each page before it loads (one bundled script, Playwright's addInitScript), so the engine always matches the package's version. page().self.bytes is 0 then (the page downloads none of it), and page().self.phases.engine is the engine's own start. - @ogygia/devtools: the dock's realm lends the injected engine what only the app's build knows (dev or not, the regions' names, the props lookup), and the leftovers watch keeps one record per page that any copy of the readers can read.
  • #605 ec75d61 Thanks @PuruVJ! - - @ogygia/testing: testing() from @ogygia/testing/vite, listed beside ogygia(), feeds the testing engine a test injects, so page(), hydration(), record() and settled() work without devtools in the app. A visitor runs nothing of it. profile() still needs devtools({ profiler }). - @ogygia/testing: the injected engine starts the page beacon itself, so a page without the devtools server is measured too. - @ogygia/devtools: with both the dock and testing() in an app, each runtime hook call is recorded and measured once.
  • #863 622b5c7 Thanks @PuruVJ! - The profiler's beacon keeps each visit inside one post's bounds however many posts of that visit arrive (before, every post naming new islands grew the kept visit).
  • #1153 b121951 Thanks @PuruVJ! - @ogygia/testing's record() keeps one session across a full page load in WebKit (Safari): the testing engine no longer throws on the new page when it picks up the session the old page saved.

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]

0.13.0 minor

@ogygia/devtools

Minor Changes

  • #177 d9e8e2f Thanks @PuruVJ! - The profiler's stores are classes: new MemoryStore(), new SqliteStore(), new RedisStore() and new PostgresStore() replace memoryStore(), sqliteStore(), redisStore() and postgresStore() (same arguments, same entry points).

Patch Changes

  • #225 29d8553 Thanks @PuruVJ! - The profiler's visit beacons no longer take the first tab switch for the page leaving: coming back to the tab or a back/forward cache restore opens the visit again, so later navigations, interactions and shifts go out with the next hide, and the standalone beacon sends no copy after its final visit (#209).
  • #187 b46798f Thanks @PuruVJ! - Finding a load's constant work takes time in line with the load's lines: the functions it also calls elsewhere are read from one pass.
  • #255 fc35032 Thanks @PuruVJ! - Turning devtools off in a build now takes the whole dock with it: the app, its observers and its Alt+O listener go, a dock still downloading never mounts, and turning it on again runs one dock (#239).
  • #215 a7ce10d Thanks @PuruVJ! - The dock's button no longer sticks on "loading…" when its code fails to download: a click asks for it again (#201).
  • #370 9272db9 Thanks @PuruVJ! - The devtools Page tab asks the dev server for a file's Vary header and for the pre-bundled packages again after a failed ask, instead of hiding those findings for the rest of the session (#363).
  • #409 44b3016 Thanks @PuruVJ! - The dock's save as a page goes (pagehide) no longer starts a request to the dev server, which WebKit reported as a page error.
  • #370 9272db9 Thanks @PuruVJ! - The devtools dock's server profile stops asking a busy profiler once its tab is left or the dock closes, follows the busy answer's Retry-After, and waits as long as the profiler's run page does (one shared wait) (#368).
  • #255 fc35032 Thanks @PuruVJ! - The dock's failed download is now logged as a message code with its page, devtools_dock_load_failed, like every other devtools message (#239).
  • #222 ff827ab Thanks @PuruVJ! - Finding what each garbage-collection pause allocated takes time in line with the profile.
  • #187 b46798f Thanks @PuruVJ! - Finding what ran at each garbage-collection pause takes time in line with the profile's pauses and timeline.
  • #187 b46798f Thanks @PuruVJ! - Finding a load's constant work takes time in line with the file's helpers: a helper that answers per call marks the helpers that call it, with no pass over every helper again.
  • #175 a99a49a Thanks @PuruVJ! - Every ogygia error and warning has a code and a page at ogygiajs.dev/e/<code>: dev prints the wording and the link, a production build prints the link alone ([ogygia] https://ogygiajs.dev/e/<code>?<args>), so the wording stays out of the client and server bundles.
  • #340 24c6592 Thanks @PuruVJ! - ogygia_profile no longer takes over someone else's live recording: the profiler's 409 says who holds the recorder and whether that holder is stale, and the tool resets only a stale one; a live one gets a "busy" message (#290).
  • #370 9272db9 Thanks @PuruVJ! - A profiler trap or always-on sampler whose window the inspector refused now says so: the dashboard shows what the trap really caught, stopped with the reason, and a window started later no longer shows a stopped trap as armed; the stop is said once as devtools_profiler_background_stopped (#361).
  • #370 9272db9 Thanks @PuruVJ! - A profiler mark() made before the page's beacon loads now waits for it however late it comes, instead of being dropped after 10 s; the beacon takes the waiting marks as it loads (#369).
  • #321 17e009a Thanks @PuruVJ! - A profiler that cannot start (an edge runtime without node:inspector, a profiler module that fails to load) now prints devtools_profiler_mount_failed once, instead of leaving every request unprofiled without a word.
  • #255 fc35032 Thanks @PuruVJ! - The server's first requests that arrive together now mount one profiler instead of one each, and a profiler that failed to load is tried again by the next request instead of staying off until a restart (#242).
  • #306 8b33368 Thanks @PuruVJ! - The profiler stops reading the copy of an outbound body it counts when the request that made the call ends, so a body that never ends is not read for good.
  • #306 8b33368 Thanks @PuruVJ! - After the hooks run again in dev, the new profiler sees every outbound fetch and http call, and http is wrapped once (#285).
  • #225 29d8553 Thanks @PuruVJ! - The profiler's recorder has one owner: a recording that a reset, a second stop or another profiler outlived no longer frees the next one's lock or switches off its spans, call stacks, network log or kept answers, a reset clears the background window too, and a window past its cap that fails leaves no unhandled rejection (#196).
  • #321 17e009a Thanks @PuruVJ! - The profiler's Redis store, given a URL, fails with node-redis's own connection error (a wrong password, an unreachable host) instead of "Cannot find package 'ioredis'".
  • #306 8b33368 Thanks @PuruVJ! - The profiler's run view lets go of its request, its queue's waits and its progress timer when it unmounts.
  • #323 7a53a56 Thanks @PuruVJ! - The profiler's sink posts go through an outbox, one at a time in order: rows read while a post is out are sent even when the profiler stands down meanwhile, a failed post is tried again before newer rows go (so a full buffer drops the oldest rows, not the newest), each post carries an idempotency-key, and a post never taken is said as devtools_profiler_sink_undelivered (#293).
  • #323 7a53a56 Thanks @PuruVJ! - A profiler sink that is down holds one post at a time: the rows read meanwhile wait in the capped buffer (which drops the oldest when full) and go in one post after it, instead of a post queued per tick without a bound (#376).
  • #321 17e009a Thanks @PuruVJ! - The profiler's SQLite store fails with the driver's own error when it cannot open its file, instead of saying it needs Node 22.5+ or better-sqlite3.
  • #305 e605070 Thanks @PuruVJ! - A durable profiler store whose init fails once is tried again by its next use instead of being dropped for the life of the process (#289).
  • #225 29d8553 Thanks @PuruVJ! - The profiler's Postgres and Redis stores connect and set up once: a setup that fails at the first write is tried again by the next one instead of breaking the store until a restart, and two first calls at once share one client (#197).
  • #370 9272db9 Thanks @PuruVJ! - A file the static host could not answer once (a 5xx, a timeout, a network blip) is weighed again by the next profiler report instead of being left out for the life of the process, and reports weighing a file at once share one fetch (#362).
  • #255 fc35032 Thanks @PuruVJ! - Stopping a session recording a second time no longer ends the recording started after it, nor takes back its console patch: a recording's stop runs once and touches only its own run (#240).
  • #184 1767110 Thanks @PuruVJ! - Packages declare sideEffects (only their .css files run on import), so bundlers drop the modules an app never uses.
  • #401 3ec7cfe Thanks @PuruVJ! - The profiler's SQLite store prunes a page's visits by walking its index past the kept ones, instead of rebuilding the whole kept set on every write.
  • #254 346c692 Thanks @PuruVJ! - The testing engine behind __ogygia_testing that fails to download is asked for again under a fresh URL by the next call, instead of every call failing until a reload (#241).
  • #187 b46798f Thanks @PuruVJ! - Finding the waits in a row of a line takes time in line with its calls: the calls that started together are found from one sort.

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]

0.12.0 minor

@ogygia/devtools

Patch Changes

  • #157 a217b91 Thanks @PuruVJ! - The profiler's standalone report inlines each island by the file its src names, so its islands wake offline.

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]

0.11.0 minor

@ogygia/devtools

Patch Changes

  • #88 24c2845 Thanks @PuruVJ! - The profiler UI's display font is named Geist Serif, matching the docs site.
  • #83 e229a9a Thanks @PuruVJ! - The profiler's sqlite, redis and postgres stores keep a whole recording window (2000 requests per key); they kept the newest 20.

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]

0.0.0 minor

@ogygia/devtools