Repository navigation
onsystem@0.12.1
onsystem 0.12.1 makes the Claude Code hook start faster on each edit, and gives better suggestions for unknown component parts.
- On one file,
checkwent from 470 to 311 ms on midday's dashboard and from 712 to 415 ms on dub's web app. Node's compile cache is used, and a design system found through a dependency is kept until its files change.--no-cacheskips both. - Without a project install, the hook runs npx on the first edit in a project, then runs the CLI npx installed directly. If that CLI breaks, the hook goes back to npx in the same edit.
- Everything kept on disk lives in a folder that only you can write to. A folder that others can write to is skipped with a warning. SECURITY.md lists each file.
- An unknown part such as
DialogContenton a React Aria design system gets the family's component and its parts, not the nearest spelling (DialogFooter). Real typos (DialogTitel) still get the rename. - React Aria triggers say they take the element that opens them as a child, and React Aria components no longer get Base UI's
renderadvice. - If the ESLint plugin's loader stops (for example,
process.exitin a config written in code), every file of the run fails at once with the reason, instead of waiting two minutes each.
Patch Changes
-
#263
fe63cfe-checkon one file starts sooner, which the Claude Code hook does on every edit. The CLI turns on Node's compile cache (Node.js 22.1 and later), so the CLI and TypeScript are not compiled again on each run; it is kept in the user's own folder in the system temp folder,onsystem-<uid>, in acompile-cachefolder onsystem creates for the user alone. An app whose design system zero config finds in a package'sexportskeeps what it found beside the cached model, and reads it from there until a file in that package, or the app'spackage.jsonorcomponents.json, changes, or another build of onsystem runs: following the package's barrels parsed every file they lead to, on every run.--no-cachefinds it again. On midday's dashboard and dub's web app,checkon one file went from 0.51 s to 0.33 s and from 0.77 s to 0.43 s.In a project without onsystem installed, the hook runs it through npx on the first edit in that project only: the CLI npx started says where it is, and the next edits there run it with Node directly, without starting npm, while it is still the plugin's release. When that CLI gives no results, as when part of npm's copy was removed, the hook forgets it and runs npx in that same edit.
onsystem-<uid>is used only while it is the user's alone. One that others can write to is now skipped, for the cached model too, rather than closed and used, and on Windows the folder is used only inside the user's home folder. SECURITY.md lists what is kept there. -
#265
3cc1fe0- An unknown component that looks like a part of a family the design system has, but is like none of its parts, is no longer taken for the part spelled closest.DialogContentin a design system on React Aria, whoseDialogis the content, got "Did you mean ?"; it now gets "Did you mean , or one of its parts: DialogTrigger, DialogHeader, DialogFooter, DialogTitle?", with no rename. So doDropdownMenuContentandContextMenuContentthere, which were taken for the submenu'sDropdownMenuSubContentandContextMenuSubContent. A misspelled part (DialogTitel,AvatarImg) is still taken for that part, while a part unlike the one spelled closest no longer is:SidebarDividerwas taken forSidebarProvider,CardToggleforCardTitleandCarouselProviderforCarouselPrevious.asChildon a React Aria trigger (<DialogTrigger asChild>), which renders no element of its own, now says that the trigger takes the element that opens it as a child: a button, a menu item for a submenu's trigger, and the area you right-click for a context menu's. On a React Aria component, whoserenderis a function,asChild,as,componentandhrefno longer get Base UI's advice (render={<Link href="…" />}), which React Aria'srenderdoes not take: they say to use a link component for a link, or to passhrefto a component that takes it (SidebarMenuButton,BreadcrumbLink). Arenderfunction of the design system's own keeps the old advice.The ESLint plugin no longer waits two minutes on a file when its loader worker stopped before it answered, as
process.exit()in anonsystem.config.mjs, an uncaught error or an unhandled rejection makes it: every file of the run, a file sent to it while it was busy too, fails at once with "the design system's loader stopped before it answered", and why.