onsystem 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/cli.js +5 -4
- package/dist/{design-system-D53Jxybo.js → design-system-CPH4C7-1.js} +302 -107
- package/dist/eslint-worker.js +2 -2
- package/dist/eslint.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{stdio-ha4IF0CU.js → stdio-BK2kMN1x.js} +660 -332
- package/dist/{workspace-DAa_08uB.js → workspace-BINqxi7p.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ npx -y onsystem check . # the same check the agent and CI run
|
|
|
69
69
|
npx -y onsystem init # write the config, and offer a baseline
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
At a [monorepo root](https://onsystem.vercel.app/docs/configuration#monorepo-roots), `inspect` lists every app and design-system package, and `check` checks each file by its own project's design system. In a [design-system package](https://onsystem.vercel.app/docs/design-system-packages), `init` sets it up for every app that depends on it, with no config in the apps: as a workspace package, or installed from npm when it publishes
|
|
72
|
+
At a [monorepo root](https://onsystem.vercel.app/docs/configuration#monorepo-roots), `inspect` lists every app and design-system package, and `check` checks each file by its own project's design system. In a [design-system package](https://onsystem.vercel.app/docs/design-system-packages), `init` sets it up for every app that depends on it, with no config in the apps: as a workspace package, or installed from npm. Installed apps read the components from the sources the package publishes, or from its type declarations (`.d.ts`) when it publishes only compiled `dist/`, and get every rule either way (`init` checks its `files` list). From a package that publishes compiled code and no type declarations, they get the token rules but no component, prop, variant or native-element checks.
|
|
73
73
|
|
|
74
74
|
In a new create-next-app, the template page's hardcoded colors already make the first `check .` fail; `init` offers to record them as a baseline, so only new findings fail. Folders installed from a shadcn registry, such as `components/ai-elements`, are someone else's code: [Code from shadcn registries](https://onsystem.vercel.app/docs/configuration#code-from-shadcn-registries) says how to check them or leave them out.
|
|
75
75
|
|
|
@@ -128,6 +128,21 @@ steps:
|
|
|
128
128
|
|
|
129
129
|
That count is onsystem's own, and the MCP server and the hook show the agent the same errors to fix. In tasks that ask for a green status label in a design system with no success token, agents with onsystem often used `chart-*` tokens, which it counts as clean. The blind labels by an AI reviewer, 12 files per arm, are too few to confirm the count either way, and every violation they found with the hook or all three is a palette color in Dub, whose tokens 0.5.0 did not read. The [benchmark page](https://onsystem.vercel.app/benchmark) has every table, and [bench/v2](bench/v2) the method, the per-run data and every generated file.
|
|
130
130
|
|
|
131
|
+
## Compatibility
|
|
132
|
+
|
|
133
|
+
What `package.json` declares and CI runs:
|
|
134
|
+
|
|
135
|
+
| With | Supported |
|
|
136
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
137
|
+
| Node.js | Node.js 20.19 or later (`engines`). CI runs the tests on Node.js 22, 24 and 26, and the built package on 20.19 |
|
|
138
|
+
| Operating system | Linux, macOS and Windows: CI runs the tests and the pack test on each |
|
|
139
|
+
| ESLint | ESLint 8.57, 9 and 10, for the ESLint plugin only: `eslint` is an optional peer, and the CLI, the MCP server, the hook and the Action do not need it |
|
|
140
|
+
| TypeScript | Your project's TypeScript is not used, and a JavaScript project needs none: onsystem reads `.tsx` and `.jsx` with its own TypeScript 6.0, a dependency, not a peer |
|
|
141
|
+
| React | Components written for React 18 (`forwardRef`) or React 19 (`ref` as a prop), read from source or type declarations. onsystem does not depend on React |
|
|
142
|
+
| Tailwind CSS | v4 (`@theme`) and v3 (`tailwind.config`, read without running it). Without Tailwind, tokens come from CSS custom properties, DTCG files or a DESIGN.md |
|
|
143
|
+
| shadcn/ui | Both bases, Radix (`asChild`) and Base UI (`render`), on Tailwind v3 or v4, with no config |
|
|
144
|
+
| MCP clients | Any client that starts a stdio server; CI connects on the 2025-11-25 and 2026-07-28 protocols. [Set up your agent](https://onsystem.vercel.app/docs/clients) has each client's config and support tier |
|
|
145
|
+
|
|
131
146
|
## Docs
|
|
132
147
|
|
|
133
148
|
On the [website](https://onsystem.vercel.app/docs), and as Markdown in [docs/](docs):
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as DEFAULT_TOKENS, A as unrecordedRules, At as
|
|
3
|
-
import { a as notReadNotices, i as missingDependencies, o as explainProject, s as librariesLeftOut, t as serveStdio } from "./stdio-
|
|
4
|
-
import { r as loadTarget } from "./workspace-
|
|
2
|
+
import { $ as DEFAULT_TOKENS, A as unrecordedRules, At as toPosix, B as statusKinds, C as countBaseline, D as pruneBaseline, Dt as matchesGlob, E as onLines, Et as isInside, Ft as unique, J as ConfigError, L as toDesignMd, Lt as readProjectConfig, M as writeBaseline, Nt as plural, O as readBaseline, R as toDtcg, S as applyBaseline, T as goneFiles, Tt as SCRIPT_FILE, Y as DEFAULT_DOCS, _ as formatDiagnostics, at as excludedBy, b as BASELINE_FILE, c as silentLogger, et as FALLBACK_TOKENS, g as escapeData, gt as PACKAGE_FIELD, h as uncheckedNotice, ht as notReadYet, i as componentFiles, j as updateBaseline, k as rulesRun, kt as relativePath, l as stderrLogger, lt as rulesFor, mt as libraryTitle, nt as RULE_IDS, o as loadDesignSystem, q as CONFIG_FILES, s as tokenFiles, tt as LEGACY_CONFIG_FILES, v as NAME, vt as declaredConfig, w as findMoves, x as LEGACY_BASELINE_FILE, xt as isDesignSystemName, y as VERSION, yt as detectProject } from "./design-system-CPH4C7-1.js";
|
|
3
|
+
import { a as notReadNotices, i as missingDependencies, o as explainProject, s as librariesLeftOut, t as serveStdio } from "./stdio-BK2kMN1x.js";
|
|
4
|
+
import { r as loadTarget } from "./workspace-BINqxi7p.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { escapePath, glob } from "tinyglobby";
|
|
@@ -944,7 +944,8 @@ async function main(argv, io = defaultIo) {
|
|
|
944
944
|
io.stderr(error.message);
|
|
945
945
|
return 2;
|
|
946
946
|
}
|
|
947
|
-
|
|
947
|
+
io.stderr(error.stack ?? String(error));
|
|
948
|
+
return 2;
|
|
948
949
|
}
|
|
949
950
|
}
|
|
950
951
|
async function check(patterns, configOptions, values, io) {
|