@ogygia/devtools
0.14.0 minor
@ogygia/devtools
Minor Changes
- #606
1fdd1a0Thanks @PuruVJ! - -@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). - #760
90a7449Thanks @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-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 - #1192
b8d8cf0Thanks @PuruVJ! - 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
- #1387
d16b921Thanks @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
936654eThanks @PuruVJ! - -@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 }). - #1138
ad28936Thanks @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
032d21fThanks @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
f326128Thanks @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
e6f19d2Thanks @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
81a40eaThanks @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
891228bThanks @PuruVJ! - A hydration mismatch report drops a comment where the browser ends it (--!>,<!-->), and keeps a<!--inside a script or a quoted value. - #533
49ff074Thanks @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/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). - #457
1d836acThanks @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
620d27eThanks @PuruVJ! - The head's end is found as the browser reads it: anapp.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. - #1523
682f539Thanks @PuruVJ! - The devtools launcher rests above a page's fixed bottom bar (a phone layout's bottom navigation) instead of covering its buttons. - #878
08fd293Thanks @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
38a5f65Thanks @PuruVJ! - The profiler stops unpacking an uploaded.ogppast 256 MB and refuses it withdevtools_profiler_upload_too_large(413), instead of unpacking any size. - #526
f7a51c3Thanks @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'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. - #1332
7bcf458Thanks @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
c2890d3Thanks @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 withvirtual_wrong_realm. - #1097
47b5ba7Thanks @PuruVJ! - The dock's "profile this page" waits out a busy profiler's longRetry-Afterup to its two-minute deadline (before, a wait past ~24 days failed the profile withmachine_bad_time). - #1152
6eacf8bThanks @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.ogpor a posted report: 32 MB) and answers 413 past it without reading the rest. - #1383
782344dThanks @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
6ddd1f2Thanks @PuruVJ! - 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. - #868
c4ea513Thanks @PuruVJ! - The profiler checks its key and session in constant time on every host, with Web Crypto; on a host withoutnode:cryptologin works and no plain comparison is used. - #1112
6315434Thanks @PuruVJ! - The profiler login'snextis 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
56df4b8Thanks @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
671c6ecThanks @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
671c6ecThanks @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
32177c7Thanks @PuruVJ! - -@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. - #1377
68b8253Thanks @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
b20ae04Thanks @PuruVJ! - - 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. - #524
9df2941Thanks @PuruVJ! - -@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. - #721
a9072b3Thanks @PuruVJ! - A region answer'sserver-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 - #1148
addb6e5Thanks @PuruVJ! - 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. - #1464
e731728Thanks @PuruVJ! - Stopping a devtools recording no longer removes aconsole.errorwrapper the page added while it recorded (an error reporter keeps seeing console errors). - #1380
b41d12fThanks @PuruVJ! - The profiler's standalone report reads a module script'stypeandsrcas 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. - #1167
562960dThanks @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
dc985cfThanks @PuruVJ! - -@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. - #605
ec75d61Thanks @PuruVJ! - -@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. - #863
622b5c7Thanks @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
b121951Thanks @PuruVJ! -@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.
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
d9e8e2fThanks @PuruVJ! - 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
- #225
29d8553Thanks @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
b46798fThanks @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
fc35032Thanks @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
a7ce10dThanks @PuruVJ! - The dock's button no longer sticks on "loading…" when its code fails to download: a click asks for it again (#201). - #370
9272db9Thanks @PuruVJ! - The devtools Page tab asks the dev server for a file'sVaryheader and for the pre-bundled packages again after a failed ask, instead of hiding those findings for the rest of the session (#363). - #409
44b3016Thanks @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
9272db9Thanks @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'sRetry-After, and waits as long as the profiler's run page does (one shared wait) (#368). - #255
fc35032Thanks @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
ff827abThanks @PuruVJ! - Finding what each garbage-collection pause allocated takes time in line with the profile. - #187
b46798fThanks @PuruVJ! - Finding what ran at each garbage-collection pause takes time in line with the profile's pauses and timeline. - #187
b46798fThanks @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
a99a49aThanks @PuruVJ! - Every ogygia error and warning has a code and a page atogygiajs.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
24c6592Thanks @PuruVJ! -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). - #370
9272db9Thanks @PuruVJ! - 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). - #370
9272db9Thanks @PuruVJ! - A profilermark()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
17e009aThanks @PuruVJ! - A profiler that cannot start (an edge runtime withoutnode:inspector, a profiler module that fails to load) now printsdevtools_profiler_mount_failedonce, instead of leaving every request unprofiled without a word. - #255
fc35032Thanks @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
8b33368Thanks @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
8b33368Thanks @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
29d8553Thanks @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
17e009aThanks @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
8b33368Thanks @PuruVJ! - The profiler's run view lets go of its request, its queue's waits and its progress timer when it unmounts. - #323
7a53a56Thanks @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 anidempotency-key, and a post never taken is said asdevtools_profiler_sink_undelivered(#293). - #323
7a53a56Thanks @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
17e009aThanks @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
e605070Thanks @PuruVJ! - A durable profiler store whoseinitfails once is tried again by its next use instead of being dropped for the life of the process (#289). - #225
29d8553Thanks @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
9272db9Thanks @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
fc35032Thanks @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
1767110Thanks @PuruVJ! - Packages declaresideEffects(only their.cssfiles run on import), so bundlers drop the modules an app never uses. - #401
3ec7cfeThanks @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
346c692Thanks @PuruVJ! - 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). - #187
b46798fThanks @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
a217b91Thanks @PuruVJ! - The profiler's standalone report inlines each island by the file itssrcnames, so its islands wake offline.
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]
0.11.0 minor
@ogygia/devtools
Patch Changes
- #88
24c2845Thanks @PuruVJ! - The profiler UI's display font is named Geist Serif, matching the docs site. - #83
e229a9aThanks @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]