Skip to content

feat(devframe): re-export nostics via devframe/utils/nostics - #243

Merged
antfu merged 3 commits into
mainfrom
cuddly-emus-lose
Aug 17, 2026
Merged

feat(devframe): re-export nostics via devframe/utils/nostics#243
antfu merged 3 commits into
mainfrom
cuddly-emus-lose

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

Adds devframe/utils/nostics as a thin re-export of nostics's public API (defineDiagnostics, defineProdDiagnostics, createConsoleReporter, formatDiagnostic, the Diagnostic class, its supporting types, and ansiFormatter), so integrations that build their own coded diagnostics.ts no longer need a direct dependency on nosticsdevframe is already required as a peer.

Changes

  • New devframe/utils/nostics export (packages/devframe/src/utils/nostics.ts), wired into package.json exports, tsdown.config.ts (node-only, matching nostics' node-side scope), alias.ts, and tsconfig.base.json.
  • Every built-in plugin's diagnostics.ts (assets, code-server, data-inspector, inspect, messages, og, terminals) now imports from devframe/utils/nostics instead of nostics directly, and drops the now-unneeded nostics dependency from package.json.
  • @devframes/hub and @devframes/json-render get the same treatment.
  • devframe's own internal diagnostics modules (node/diagnostics.ts, rpc/diagnostics.ts, types/diagnostics.ts, utils/diagnostics-reporter.ts, node/host-diagnostics.ts, adapters/mcp/stringify.ts, cli/connect.ts) switch to the same self-referenced import for consistency with the rest of the codebase's devframe/utils/* convention.
  • Updated AGENTS.md to document the new convention.
  • Refreshed tsnapi API snapshots — a few downstream .d.mts outputs now inline the nostics types (via the resolved devframe/utils/nostics path) instead of referencing import("nostics"), which fully decouples those packages from nostics even at the type level.

🤖 Generated with the help of an agent.

Add devframe/utils/nostics as a thin re-export of nostics's public API
(defineDiagnostics, the Diagnostic class, its supporting types, and
ansiFormatter). Route every built-in plugin diagnostics.ts (assets,
code-server, data-inspector, inspect, messages, og, terminals) plus
@devframes/hub and @devframes/json-render through it, and drop their
direct nostics dependency now that devframe (already a peer) supplies
it. devframe's own internal diagnostics modules switch to the same
self-referenced import for consistency.
@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 1221ae0
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a82602db7cc0b0008e69fdb
😎 Deploy Preview https://deploy-preview-243--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…/nostics

Move the ANSI console reporter registration into the shared
`devframe/utils/nostics` `defineDiagnostics` wrapper, which pre-wires it
ahead of any caller-supplied reporters. Every module-level
`diagnostics.ts` (devframe core, @devframes/hub, @devframes/json-render,
and the built-in plugins) now just calls `defineDiagnostics({ docsBase,
codes })` — no local reporter, no `colors`/`ansiFormatter` imports.

Delete the per-package `diagnostics-reporter.ts` files and collapse the
host's `defineDiagnostics` to the shared wrapper (it already prepends the
reporter, so no extra merging is needed).
Resolve dependency conflicts in plugins/inspect and plugins/messages
package.json: keep main's #238 layout (which moved @devframes/vite to
devDependencies) and drop the now-unused nostics dependency, since these
plugins reach nostics through devframe/utils/nostics.
@antfu
antfu merged commit 0b19df3 into main Aug 17, 2026
12 checks passed
@antfu
antfu deleted the cuddly-emus-lose branch August 17, 2026 01:34
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.

2 participants