diff --git a/.changeset/cli-and-action-edges.md b/.changeset/cli-and-action-edges.md deleted file mode 100644 index 0b9cb1ca..00000000 --- a/.changeset/cli-and-action-edges.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'onsystem': minor ---- - -Upgrading: three changes can fail a CI run that passed before. An option of another command, such as `check . --out report.json` or `inspect --max-warnings 0`, now exits 2: drop it, or give it to the command it belongs to. An empty `--max-warnings=`, as an unset variable gives, now exits 2 instead of being read as 0: set the variable, or leave the option out. And `check` run from a folder inside a project that has no config, `components.json`, `package.json` or `project.json` of its own (`app/settings`) now checks against the project above it, so it can report findings where it reported none: fix them, record them with `--update-baseline`, or pass `--root .` to check that folder on its own as before. - -`check --max-warnings=-1` is no limit, as in ESLint: it failed a clean file with "Too many warnings (0, max -1)". An empty value, or one that is not a whole number, exits 2 with one line; an empty one was read as 0. - -An option of another command exits 2 with one line instead of being ignored: `check . --out report.json` wrote no file and exited as if it had, and `check . --explain` explained nothing. `onsystem` (the MCP server) only says on stderr that it ignores such an option, and starts, so a stale argument in an agent's MCP config does not stop the server. - -`check`, `inspect`, `export` and `init` run from a folder inside a project with none of those files (`app/settings`) work on the nearest folder above it with one, as the Claude Code hook does, and `check` says which: `Checking the project in ../..` (on stderr with `--format json`, `sarif` or `github`). From there, zero config found no design system, so a file with errors gave "No problems in 1 file." and exit 0. With `--root`, `--config`, `--components`, `--tokens` or `--docs`, from a folder with a baseline, or from the home folder, the root is what it was; the home folder is never the project. So is it from a folder with a `components/ui` or `src/components/ui` folder of its own, as a design system without a `package.json`, unless that folder is the project's `src` or `app` folder, or the project has a `components.json` or a config. At a monorepo root, the notices name the projects relative to the working directory, as the files are named. - -`inspect` says when the design system has no color tokens, or no components, which `check` said only after it ran: `No color tokens found: check will not run no-hardcoded-color.` At a monorepo root, each project's entry says what it is missing, and `check --require-design-system` names the projects and what each one lacks. - -Ctrl+D or Ctrl+C at one of `init`'s questions now says it cancelled, on a line of its own, and exits 130, instead of printing an `AbortError` stack trace. `init` run from a folder below the project names the baseline it records as it names the config (`../../onsystem.baseline.json`). - -`check --format github` titles its annotations `onsystem: `, as the GitHub Action does. - -The GitHub Action no longer drops a file's later changes when an added line starts with `++ ` (which the diff shows as `+++ `, like a file header), so their findings are reported. It also reads the checkout in a `container:` job, where git refused the workspace as another user's ("dubious ownership") and every pull request failed; when git still refuses it, the error says to add it to `safe.directory` rather than to check out with `fetch-depth: 0`. The CLI it runs gets the same `safe.directory` entries, so it leaves out what git ignores there too. diff --git a/.changeset/culori-types.md b/.changeset/culori-types.md deleted file mode 100644 index b4c3a58a..00000000 --- a/.changeset/culori-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'onsystem': patch ---- - -The published types no longer fail a TypeScript project that checks library types (`skipLibCheck: false`) with TS7016, "Could not find a declaration file for module 'culori'", as soon as it imports `onsystem`, as an `onsystem.config.ts` with `defineConfig` does. The color types the API uses come from `@types/culori`, which is now a dependency rather than a devDependency; with `skipLibCheck: true`, those types were read as `any`. diff --git a/CHANGELOG.md b/CHANGELOG.md index dc976094..7403f5e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # onsystem (formerly @dgesteves/design-system-mcp) +## 0.12.0 + +### Minor Changes + +- [#264](https://github.com/dgesteves/onsystem/pull/264) [`9a19ed7`](https://github.com/dgesteves/onsystem/commit/9a19ed76d08e05a330a4458583c8bd00dfc4b18f) - Upgrading: three changes can fail a CI run that passed before. An option of another command, such as `check . --out report.json` or `inspect --max-warnings 0`, now exits 2: drop it, or give it to the command it belongs to. An empty `--max-warnings=`, as an unset variable gives, now exits 2 instead of being read as 0: set the variable, or leave the option out. And `check` run from a folder inside a project that has no config, `components.json`, `package.json` or `project.json` of its own (`app/settings`) now checks against the project above it, so it can report findings where it reported none: fix them, record them with `--update-baseline`, or pass `--root .` to check that folder on its own as before. + + `check --max-warnings=-1` is no limit, as in ESLint: it failed a clean file with "Too many warnings (0, max -1)". An empty value, or one that is not a whole number, exits 2 with one line; an empty one was read as 0. + + An option of another command exits 2 with one line instead of being ignored: `check . --out report.json` wrote no file and exited as if it had, and `check . --explain` explained nothing. `onsystem` (the MCP server) only says on stderr that it ignores such an option, and starts, so a stale argument in an agent's MCP config does not stop the server. + + `check`, `inspect`, `export` and `init` run from a folder inside a project with none of those files (`app/settings`) work on the nearest folder above it with one, as the Claude Code hook does, and `check` says which: `Checking the project in ../..` (on stderr with `--format json`, `sarif` or `github`). From there, zero config found no design system, so a file with errors gave "No problems in 1 file." and exit 0. With `--root`, `--config`, `--components`, `--tokens` or `--docs`, from a folder with a baseline, or from the home folder, the root is what it was; the home folder is never the project. So is it from a folder with a `components/ui` or `src/components/ui` folder of its own, as a design system without a `package.json`, unless that folder is the project's `src` or `app` folder, or the project has a `components.json` or a config. At a monorepo root, the notices name the projects relative to the working directory, as the files are named. + + `inspect` says when the design system has no color tokens, or no components, which `check` said only after it ran: `No color tokens found: check will not run no-hardcoded-color.` At a monorepo root, each project's entry says what it is missing, and `check --require-design-system` names the projects and what each one lacks. + + Ctrl+D or Ctrl+C at one of `init`'s questions now says it cancelled, on a line of its own, and exits 130, instead of printing an `AbortError` stack trace. `init` run from a folder below the project names the baseline it records as it names the config (`../../onsystem.baseline.json`). + + `check --format github` titles its annotations `onsystem: `, as the GitHub Action does. + + The GitHub Action no longer drops a file's later changes when an added line starts with `++ ` (which the diff shows as `+++ `, like a file header), so their findings are reported. It also reads the checkout in a `container:` job, where git refused the workspace as another user's ("dubious ownership") and every pull request failed; when git still refuses it, the error says to add it to `safe.directory` rather than to check out with `fetch-depth: 0`. The CLI it runs gets the same `safe.directory` entries, so it leaves out what git ignores there too. + +### Patch Changes + +- [#266](https://github.com/dgesteves/onsystem/pull/266) [`c6cc74d`](https://github.com/dgesteves/onsystem/commit/c6cc74d5c720f4244e5dd7cd853077c7a783ebff) - The published types no longer fail a TypeScript project that checks library types (`skipLibCheck: false`) with TS7016, "Could not find a declaration file for module 'culori'", as soon as it imports `onsystem`, as an `onsystem.config.ts` with `defineConfig` does. The color types the API uses come from `@types/culori`, which is now a dependency rather than a devDependency; with `skipLibCheck: true`, those types were read as `any`. + ## 0.11.2 ### Patch Changes diff --git a/package.json b/package.json index fc6fb55b..df5c3147 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onsystem", - "version": "0.11.2", + "version": "0.12.0", "mcpName": "io.github.dgesteves/onsystem", "description": "Keeps coding agents on your design system: catches palette colors, native elements and APIs your system lacks, at every edit and pull request, with the fix. Set it up once in your design-system package; every app in your monorepo gets it.", "keywords": [ diff --git a/plugins/onsystem-agent/mcp.json b/plugins/onsystem-agent/mcp.json index a304d643..155a9d15 100644 --- a/plugins/onsystem-agent/mcp.json +++ b/plugins/onsystem-agent/mcp.json @@ -4,7 +4,7 @@ "onsystem": { "type": "stdio", "command": "npx", - "args": ["-y", "onsystem@0.11.2"] + "args": ["-y", "onsystem@0.12.0"] } } } diff --git a/plugins/onsystem-agent/plugin.json b/plugins/onsystem-agent/plugin.json index 9bbe6a10..3599d687 100644 --- a/plugins/onsystem-agent/plugin.json +++ b/plugins/onsystem-agent/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "onsystem", - "version": "0.11.2", + "version": "0.12.0", "description": "Keeps coding agents on your design system: catches palette colors, native elements and APIs your system lacks, at every edit and pull request, with the fix. Set it up once in your design-system package; every app in your monorepo gets it.", "author": { "name": "Diogo Esteves", diff --git a/plugins/onsystem-cursor/.cursor-plugin/plugin.json b/plugins/onsystem-cursor/.cursor-plugin/plugin.json index 11effe9c..af4d460d 100644 --- a/plugins/onsystem-cursor/.cursor-plugin/plugin.json +++ b/plugins/onsystem-cursor/.cursor-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "onsystem", "displayName": "onsystem", - "version": "0.11.2", + "version": "0.12.0", "description": "Keeps coding agents on your design system: catches palette colors, native elements and APIs your system lacks, at every edit and pull request, with the fix. Set it up once in your design-system package; every app in your monorepo gets it.", "author": { "name": "Diogo Esteves" diff --git a/plugins/onsystem-cursor/mcp.json b/plugins/onsystem-cursor/mcp.json index 9c47e930..d1b7416b 100644 --- a/plugins/onsystem-cursor/mcp.json +++ b/plugins/onsystem-cursor/mcp.json @@ -2,7 +2,7 @@ "mcpServers": { "onsystem": { "command": "npx", - "args": ["-y", "onsystem@0.11.2"] + "args": ["-y", "onsystem@0.12.0"] } } } diff --git a/plugins/onsystem/.claude-plugin/plugin.json b/plugins/onsystem/.claude-plugin/plugin.json index 5a7752a3..7f478987 100644 --- a/plugins/onsystem/.claude-plugin/plugin.json +++ b/plugins/onsystem/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "onsystem", "displayName": "onsystem", - "version": "0.11.2", + "version": "0.12.0", "description": "Keeps coding agents on your design system: catches palette colors, native elements and APIs your system lacks, at every edit and pull request, with the fix. Set it up once in your design-system package; every app in your monorepo gets it.", "author": { "name": "Diogo Esteves", diff --git a/plugins/onsystem/.mcp.json b/plugins/onsystem/.mcp.json index 9c47e930..d1b7416b 100644 --- a/plugins/onsystem/.mcp.json +++ b/plugins/onsystem/.mcp.json @@ -2,7 +2,7 @@ "mcpServers": { "onsystem": { "command": "npx", - "args": ["-y", "onsystem@0.11.2"] + "args": ["-y", "onsystem@0.12.0"] } } } diff --git a/plugins/onsystem/hooks/check-ui.mjs b/plugins/onsystem/hooks/check-ui.mjs index 953077c6..d567dd7b 100644 --- a/plugins/onsystem/hooks/check-ui.mjs +++ b/plugins/onsystem/hooks/check-ui.mjs @@ -61,7 +61,7 @@ import path from 'node:path'; const PACKAGE = 'onsystem'; // The exact release this plugin runs; scripts/sync-versions.mjs sets it with each release. -const VERSION = '0.11.2'; +const VERSION = '0.12.0'; const UI_FILE = /\.[jt]sx$/i; const MAX_FINDINGS = 30; // Both runs together, within the 60 seconds hooks.json gives the hook. Tests shorten it. diff --git a/server.json b/server.json index 9083829d..73b4753e 100644 --- a/server.json +++ b/server.json @@ -20,12 +20,12 @@ "sizes": ["180x180"] } ], - "version": "0.11.2", + "version": "0.12.0", "packages": [ { "registryType": "npm", "identifier": "onsystem", - "version": "0.11.2", + "version": "0.12.0", "transport": { "type": "stdio" }