Summary
The first code sample on the docs introduction page imports plugins directly from the corsair package, but corsair does not export plugins. The snippet fails both at TypeScript compile time and at runtime.
Location
docs/getting-started/introduction.mdx:12
import { createCorsair, slack, github, gmail, linear } from 'corsair';
Why it's broken
packages/corsair/index.ts exports createCorsair, setupCorsair, processWebhook, etc. — but no slack / github / gmail / linear, and there is no export * wildcard.
packages/corsair/package.json has zero @corsair-dev/* dependencies, so it can't re-export plugins indirectly either.
- Plugins are published as separate packages (e.g.
@corsair-dev/slack in packages/slack/package.json).
Result:
- TypeScript:
Module '"corsair"' has no exported member 'slack'.
- Runtime JS:
slack resolves to undefined, so slack() throws slack is not a function.
This is the most-viewed page, so a broken first example undermines trust in every later snippet — even though the rest of the docs get this right (e.g. docs/getting-started/quick-start.mdx:434-436 and every plugin overview import plugins from their own package).
Suggested fix
import { createCorsair } from 'corsair';
import { slack } from '@corsair-dev/slack';
import { github } from '@corsair-dev/github';
import { gmail } from '@corsair-dev/gmail';
import { linear } from '@corsair-dev/linear';
export const corsair = createCorsair({
plugins: [slack(), github(), gmail(), linear()],
database: db,
kek: process.env.CORSAIR_KEK!,
});
It would also help to add the corresponding install line (pnpm add corsair @corsair-dev/slack @corsair-dev/github @corsair-dev/gmail @corsair-dev/linear).
Prevention
A docs lint check that fails when a plugin name is imported from "corsair" would catch this class of regression.
Summary
The first code sample on the docs introduction page imports plugins directly from the
corsairpackage, butcorsairdoes not export plugins. The snippet fails both at TypeScript compile time and at runtime.Location
docs/getting-started/introduction.mdx:12Why it's broken
packages/corsair/index.tsexportscreateCorsair,setupCorsair,processWebhook, etc. — but noslack/github/gmail/linear, and there is noexport *wildcard.packages/corsair/package.jsonhas zero@corsair-dev/*dependencies, so it can't re-export plugins indirectly either.@corsair-dev/slackinpackages/slack/package.json).Result:
Module '"corsair"' has no exported member 'slack'.slackresolves toundefined, soslack()throwsslack is not a function.This is the most-viewed page, so a broken first example undermines trust in every later snippet — even though the rest of the docs get this right (e.g.
docs/getting-started/quick-start.mdx:434-436and every plugin overview import plugins from their own package).Suggested fix
It would also help to add the corresponding install line (
pnpm add corsair @corsair-dev/slack @corsair-dev/github @corsair-dev/gmail @corsair-dev/linear).Prevention
A docs lint check that fails when a plugin name is imported from
"corsair"would catch this class of regression.