Skip to content

fix: ship culori's types with the package; CONTRIBUTING gaps; test the Cursor manifest against its schema - #266

Merged
dgesteves merged 3 commits into
mainfrom
fix/os2-59-package-polish
Oct 30, 2026
Merged

dgesteves merged 3 commits into
mainfrom
fix/os2-59-package-polish

Conversation

@dgesteves

@dgesteves dgesteves commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Part of the OS2-59 polish bundle: the package and contributor area. The CLI and Action area is #264, the message and ESLint area #265. None of them share a file.

What was wrong

  • The published dist/index.d.ts starts with import { Oklch } from "culori", used in public types. culori ships no types, and @types/culori was a devDependency, so a project with skipLibCheck: false failed on import { defineConfig } from 'onsystem'. I reproduced it with the built declarations in a consumer folder that has culori but not @types/culori (strict, skipLibCheck: false, TypeScript 6.0.3): error TS7016: Could not find a declaration file for module 'culori'. With skipLibCheck: true, those types are any.
  • CONTRIBUTING did not list the Website job or the examples' typecheck that CI runs, did not say how to preview the docs, offered no way to get pnpm without Corepack, left the Failed to create bin at site/node_modules/.bin/onsystem warning from a first pnpm install unexplained, and did not point to good first issues.

What changed

  • package.json: @types/culori moves from devDependencies to dependencies (same range, ^4.0.1; it has no dependencies of its own). pnpm-lock.yaml moves the same entry and nothing else. The finding also offered a local Oklch interface in src/tokens/color.ts; that file is outside this bundle, and the dependency keeps the API's types exactly culori's.
  • CONTRIBUTING.md: the good first issue label; npm install -g pnpm@11 without Corepack; why the bin warning appears before the first build and that it is harmless; pnpm --filter "./examples/*" typecheck in the list of checks; a paragraph on the Website job, with pnpm build then pnpm --filter site dev (port 3300) to see a docs page as the site shows it; and Node 26 next to 22 and 24 for the test job, as ci.yml already runs it.

How it was tested

  • test/published-types.test.ts (new): builds the declarations of src/index.ts and src/eslint/index.ts with tsdown, as they ship, collects every package they import (@modelcontextprotocol/server, culori, eslint, typescript, zod), and checks that each is a dependency or peer and brings its types, or that its @types package is a dependency. It fails on main with culori ships no types: @types/culori.
  • test/plugin.test.ts: the Cursor manifest may hold only the properties of Cursor's manifest schema (github.com/cursor/plugins, schemas/plugin.schema.json, which sets additionalProperties: false). displayName is one of them, so the manifest keeps it.
  • The consumer check above: TS7016 without @types/culori, no error with it.

Gate: pnpm install --frozen-lockfile --prefer-offline, pnpm format:check, pnpm lint, pnpm typecheck, pnpm test (111 files, 1440 tests passed, 3 skipped), pnpm build and pnpm smoke all pass. pnpm corpus on all 25 runs: "Counts match corpus/snapshot.json".

Left for later (outside this bundle's files)

  • scripts/pack-test.mjs: typecheck a consumer of the installed tarball with skipLibCheck: false, as the finding proposes.
  • tsdown.config.ts: emit declarations only for src/index.ts and src/eslint/index.ts (dist/cli.d.ts and dist/eslint-worker.d.ts ship unused), and build for node20.19, the engines floor, instead of node22.18.
  • Not done: typesVersions for onsystem/eslint under moduleResolution: node10, which TypeScript 6 deprecates.
  • A Claude Desktop extension (.mcpb) is a new integration, which CONTRIBUTING holds back until 2026-11-19.

Roadmap item: OS2-59 (os-perf-pkg/dts-culori-types, os-docs-community/contributing-gaps, os-adopt-clients/clients-plugins-polish (1), os-perf-pkg/package-polish (part)).

…BUTING gaps

- @types/culori moves from devDependencies to dependencies: the
  published index.d.ts imports Oklch from culori, which ships no types,
  so a project with skipLibCheck off failed with TS7016 on
  `import { defineConfig } from 'onsystem'`. A test builds the
  declarations and checks that every package they import comes with
  its types from dependencies or peers.
- The Cursor plugin manifest drops displayName, which Cursor's manifest
  reference does not have; the plugin test holds it to those fields.
- CONTRIBUTING links the good first issue label, gives an npm fallback
  for Corepack, explains the site bin warning before the first build,
  and lists the examples typecheck and the Website job with how to
  preview the docs.

Roadmap item OS2-59.
…ists

Cursor's manifest schema (cursor/plugins, schemas/plugin.schema.json) has
displayName, so the test now holds the manifest to that schema's properties.
@dgesteves dgesteves changed the title fix: ship culori's types with the package; Cursor manifest and CONTRIBUTING gaps fix: ship culori's types with the package; CONTRIBUTING gaps; test the Cursor manifest against its schema Oct 30, 2026
@dgesteves
dgesteves merged commit d848735 into main Oct 30, 2026
19 checks passed
@dgesteves
dgesteves deleted the fix/os2-59-package-polish branch October 30, 2026 18:23
@dgesteves-release dgesteves-release Bot mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant