Skip to content

docs: align adapter contribution example with the JavaScript adapter layer#2017

Open
yixin-1024 wants to merge 1 commit into
jackwener:mainfrom
yixin-1024:docs/contributing-js-adapter
Open

docs: align adapter contribution example with the JavaScript adapter layer#2017
yixin-1024 wants to merge 1 commit into
jackwener:mainfrom
yixin-1024:docs/contributing-js-adapter

Conversation

@yixin-1024

Copy link
Copy Markdown
Contributor

What

The contributing guide's adapter example still tells contributors to create a .ts file:

Create a file like clis/<site>/<command>.ts

But #928 (refactor(adapters): convert adapter layer from TypeScript to JavaScript) migrated the entire adapter layer to JS. The current tree has 0 .ts and 1259 .js built-in adapters, so anyone following the doc authors a file in a format that doesn't match any existing adapter.

Changes (docs/developer/contributing.md)

  • Adapter example → JavaScript: heading, clis/<site>/<command>.js filename, ```javascript fence, and drop the : any type annotation.
  • Add a pointer noting TypeScript adapters are still supported (→ ts-adapter), so the capability isn't lost.
  • Fix the adapter test command from npx vitest run src/<target>.test.ts to npx vitest run clis/<site>/<command>.test.js — adapter tests live under clis/, and fix: include adapter tests in default npm test #969 already wires them into npm test.

Docs-only; no code or behavior change.

…layer

The "Create a file like clis/<site>/<command>.ts" example predates jackwener#928, which
converted the entire adapter layer from TypeScript to JavaScript. The repo now
ships 0 .ts and 1259 .js built-in adapters, so a contributor following the doc
creates a file in the wrong format. Update the example to JavaScript (keeping a
pointer to the still-supported TypeScript path), and fix the adapter test
command, which pointed at src/ rather than the adapter's own clis/ test file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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