Evaluate maintained Cardinal types in @refinedev/cli
Context
packages/cli/package.json currently declares cardinal@^2.1.1. The CLI imports it in:
packages/cli/src/utils/swizzle/renderCodeMarkdown.ts, includinghighlight(rawCode, { jsx: true })packages/cli/src/commands/devtools/index.ts, for the displayedpackage.jsonsnippet
The package also carries a local ambient declaration at packages/cli/src/definitions/cardinal.d.ts for highlight, jsx, theme, and linenos because Cardinal 2.1.1 does not ship types.
Would the maintainers prefer to evaluate the exact alias below in @refinedev/cli?
"cardinal": "npm:@stackline/[email protected]"The alias preserves both existing import sites while moving them to a maintained compatibility implementation. It supports the used jsx option and ships first-party CJS/ESM types, including string or object themes. I maintain @stackline/cardinal; its source and compatibility notes are at alexandroit/stackline-cardinal.
The policy decision is mainly about the local declaration: should a migration remove cardinal.d.ts and rely on the package types, retain the narrower local declaration for now, or keep the current dependency/select a different highlighter? If the alias is preferred, I would expect the focused verification to cover CLI typechecking/build plus the two rendering paths above.
This is a maintenance and type-ownership question, not a vulnerability report.
Source: refinedev/refine