Repository navigation
fix: ship culori's types with the package; CONTRIBUTING gaps; test the Cursor manifest against its schema - #266
Merged
Merged
Conversation
…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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
dist/index.d.tsstarts withimport { Oklch } from "culori", used in public types. culori ships no types, and@types/culoriwas a devDependency, so a project withskipLibCheck: falsefailed onimport { 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'. WithskipLibCheck: true, those types areany.Failed to create bin at site/node_modules/.bin/onsystemwarning from a firstpnpm installunexplained, and did not point to good first issues.What changed
package.json:@types/culorimoves from devDependencies to dependencies (same range,^4.0.1; it has no dependencies of its own).pnpm-lock.yamlmoves the same entry and nothing else. The finding also offered a localOklchinterface insrc/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@11without Corepack; why the bin warning appears before the first build and that it is harmless;pnpm --filter "./examples/*" typecheckin the list of checks; a paragraph on the Website job, withpnpm buildthenpnpm --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, asci.ymlalready runs it.How it was tested
test/published-types.test.ts(new): builds the declarations ofsrc/index.tsandsrc/eslint/index.tswith 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@typespackage is a dependency. It fails on main withculori 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 setsadditionalProperties: false).displayNameis one of them, so the manifest keeps it.@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 buildandpnpm smokeall pass.pnpm corpuson 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 withskipLibCheck: false, as the finding proposes.tsdown.config.ts: emit declarations only forsrc/index.tsandsrc/eslint/index.ts(dist/cli.d.tsanddist/eslint-worker.d.tsship unused), and build fornode20.19, the engines floor, instead ofnode22.18.typesVersionsforonsystem/eslintundermoduleResolution: node10, which TypeScript 6 deprecates..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)).