Changelog
@ogygia/devtools
Every release of @ogygia/devtools, newest first.
- Latest
- 0.16.0
- Versions
- 6
0.16.0 minor
Dependency updates only @ogygia/devtools
0.15.0 minor
Patch Changes
- The SSR profiler no longer fails every request on a runtime without Node's process API (
process.cpuUsage) ornode:inspector: requests are answered and logged without CPU time, recordings are refused, and the profiler says so once (devtools_profiler_runtime_unsupported).
Dependencies: @ogygia/router@0.15.0, @ogygia/compiler@0.15.0, @ogygia/core@0.15.0, @ogygia/insights@0.15.0
0.14.0 minor
Minor Changes
- -
@ogygia/devtools: breaking: the dock no longer installswindow.__ogygia_testingor loads a testing engine of its own.@ogygia/testinginjects its engine into every page; listtesting()from@ogygia/testing/vitein the app under test (the dock alone still feeds an injected engine). - 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-keyandx-profileshare 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 - The profiler's
/page,/reset,/replay/<id>and/logouttake a POST only, so a link on another site can no longer change the profiler's state; a GET answers 405 withAllow: 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
- 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. - -
@ogygia/core: the dock'sisland-barrelfinding says whybarrels()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 namesbarrels()from@ogygia/barrelswhen the app does not list it. -@ogygia/devtools: the profiler'sisland-barrelwarning quotes the same reason, recorded by the build, and its fix namesbarrels()instead of the removedogygia({ barrels }). - 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.
- 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.
- 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. - 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.
- 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.
- A hydration mismatch report drops a comment where the browser ends it (
--!>,<!-->), and keeps a<!--inside a script or a quoted value. - -
@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/compilerand@ogygia/core/internal/compiler-idsimport paths are gone. Import fromogygia/vite(or@ogygia/compiler/vite),@ogygia/compilerand@ogygia/compiler/idsinstead; the names are the same. -@ogygia/core: the types of theogygia:*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/compilerandogygia/internal/compiler-idsre-export@ogygia/compiler; apps change nothing. -@ogygia/barrels,@ogygia/cli,@ogygia/content,@ogygia/devtools,@ogygia/federation,@ogygia/flags,@ogygia/postrender,@ogygia/router: they takedefinePluginand the compiler from@ogygia/compiler, a new peer dependency (ogygiabrings it). - 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.
- The head's end is found as the browser reads it: an
app.htmlthat 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. - The devtools launcher rests above a page's fixed bottom bar (a phone layout's bottom navigation) instead of covering its buttons.
- 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. - The profiler stops unpacking an uploaded
.ogppast 256 MB and refuses it withdevtools_profiler_upload_too_large(413), instead of unpacking any size. - -
@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'shandle), 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. - 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.
- 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 withvirtual_wrong_realm. - The dock's "profile this page" waits out a busy profiler's long
Retry-Afterup to its two-minute deadline (before, a wait past ~24 days failed the profile withmachine_bad_time). @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.ogpor a posted report: 32 MB) and answers 413 past it without reading the rest.- 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. - A report POSTed gzipped to the profiler is inflated under the same 256 MB cap as an uploaded
.ogp, and refused past it withdevtools_profiler_upload_too_large(413) instead of being inflated whole. - The profiler checks its key and session in constant time on every host, with Web Crypto; on a host without
node:cryptologin works and no plain comparison is used. - The profiler login's
nextis 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. - 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.
- 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)
- 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. - -
@ogygia/core: four new runtime hooks for a plugin's browser half:regionWoke,regionMismatched,navStartedandloadStarted;navigatednow says whether the regions werereconciled, andholeFailedcarries the hole'sel. -@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. - 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. - - breaking: an app's own pass over the HTML ogygia sends is the new
@ogygia/rewritepackage.ogygia.handle({ transform })now throwshandle_transform_moved; listrewrite()(from@ogygia/rewrite/vite, no options) besideogygia(), and put arewrite()handle beforeogygia.handle()insequence().ogygia/markupis removed, andscanRegions/liftRegions/restoreRegionsleaveogygia/server. -@ogygia/rewrite:rewrite({ match, render })renders only the outermost custom elementsmatchpicks (a tag prefix, a list of tags, or a test), in onerender(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 elementrendergets 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:ctxcarrieskind,csr,url,eventandsignal, an AbortSignal that fires when the request is cancelled. -@ogygia/rewrite: a render'ssheetsgo 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 insequence()run in order on one marking of the HTML; one listed afterogygia.handle()throwsrewrite_after_ogygia, and a rewrite without the plugin throwsrewrite_plugin_missing. -@ogygia/rewrite:rewrite({ page })rewrites the whole document (held until its last chunk) or region answer, saysrewrite_page_failedwhen 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. - -
@ogygia/core: a plugin's browser half subscribes to the runtime's moments withdefineClient({ hooks: { … } })(region mounted, hydrated, failed, hole answered, navigated and the rest); a hook no plugin subscribes to is left out of the runtime, andregionMount/regionUnmountmove insidehooks. -@ogygia/devtools: the profiler's beacon is part of devtools' browser half, so an app without devtools no longer carries it in its runtime. - 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 bare1no longer turns it on - A recorded session (the Record tab,
@ogygia/testing'srecord()) 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. - Stopping a devtools recording no longer removes a
console.errorwrapper the page added while it recorded (an error reporter keeps seeing console errors). - The profiler's standalone report reads a module script's
typeandsrcas the browser does (entities decoded, any quoting) and drops every copy ofsrc, so a repeatedsrcno longer makes the inlined runtime load a file instead of its own code. - 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).
- -
@ogygia/testing:withOgygiainjects its own copy of the testing engine into each page before it loads (one bundled script, Playwright'saddInitScript), so the engine always matches the package's version.page().self.bytesis 0 then (the page downloads none of it), andpage().self.phases.engineis 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. - -
@ogygia/testing:testing()from@ogygia/testing/vite, listed besideogygia(), feeds the testing engine a test injects, sopage(),hydration(),record()andsettled()work without devtools in the app. A visitor runs nothing of it.profile()still needsdevtools({ 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 andtesting()in an app, each runtime hook call is recorded and measured once. - 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).
@ogygia/testing'srecord()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.
Dependencies: @ogygia/router@0.14.0, @ogygia/core@0.14.0, @ogygia/compiler@0.14.0, @ogygia/machine@0.14.0, @ogygia/insights@0.14.0
0.13.0 minor
Minor Changes
- The profiler's stores are classes:
new MemoryStore(),new SqliteStore(),new RedisStore()andnew PostgresStore()replacememoryStore(),sqliteStore(),redisStore()andpostgresStore()(same arguments, same entry points).
Patch Changes
- 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).
- 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.
- 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).
- The dock's button no longer sticks on "loading…" when its code fails to download: a click asks for it again (#201).
- The devtools Page tab asks the dev server for a file's
Varyheader and for the pre-bundled packages again after a failed ask, instead of hiding those findings for the rest of the session (#363). - 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. - 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). - 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). - Finding what each garbage-collection pause allocated takes time in line with the profile.
- Finding what ran at each garbage-collection pause takes time in line with the profile's pauses and timeline.
- 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.
- 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. ogygia_profileno 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).- A profiler trap or always-on sampler whose window the inspector refused now says so: the dashboard shows what the trap really caught,
stoppedwith the reason, and a window started later no longer shows a stopped trap as armed; the stop is said once asdevtools_profiler_background_stopped(#361). - 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). - A profiler that cannot start (an edge runtime without
node:inspector, a profiler module that fails to load) now printsdevtools_profiler_mount_failedonce, instead of leaving every request unprofiled without a word. - 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).
- 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.
- After the hooks run again in dev, the new profiler sees every outbound fetch and http call, and http is wrapped once (#285).
- 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).
- 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'".
- The profiler's run view lets go of its request, its queue's waits and its progress timer when it unmounts.
- 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 asdevtools_profiler_sink_undelivered(#293). - 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).
- 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.
- A durable profiler store whose
initfails once is tried again by its next use instead of being dropped for the life of the process (#289). - 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).
- 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).
- 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).
- Packages declare
sideEffects(only their.cssfiles run on import), so bundlers drop the modules an app never uses. - 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.
- The testing engine behind
__ogygia_testingthat fails to download is asked for again under a fresh URL by the next call, instead of every call failing until a reload (#241). - 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.
Dependencies: @ogygia/core@0.13.0, @ogygia/machine@0.13.0, @ogygia/router@0.13.0
0.11.0 minor
Patch Changes
- The profiler UI's display font is named Geist Serif, matching the docs site.
- The profiler's sqlite, redis and postgres stores keep a whole recording window (2000 requests per key); they kept the newest 20.
Dependencies: @ogygia/core@0.11.0, @ogygia/router@0.11.0