feat(devframe)!: migrate from logs-sdk to nostics#19
Merged
Conversation
Adopts nostics 0.1.0 (the renamed-and-redesigned logs-sdk):
`message`/`hint`/`level` become `why`/`fix`/per-call reporter method;
`createLogger`/`Logger` are gone (each `defineDiagnostics()` returns
its own callable handles); emit shape is `code.throw({...})` /
`code.report({...}, { method })` instead of `code({...}).method()`.
The `DevToolsDiagnosticsHost` keeps `register()` and `host.logger.CODE`
via a Proxy over an internal registry, and `host.defineDiagnostics()`
pre-wires the shared ANSI console reporter. `host.createLogger` is
dropped (no nostics equivalent — use the typed return of
`defineDiagnostics` directly).
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Migrates Devframe’s structured diagnostics layer from logs-sdk to nostics, updating runtime emit sites, public diagnostics host types, docs, package metadata, and API snapshots.
Changes:
- Replaces
logs-sdkwithnosticsin dependencies and diagnostics definitions. - Updates diagnostics emit sites to use
diagnostics.CODE.throw(...)/.report(...). - Redesigns
DevToolsDiagnosticsHostaround a proxy-backed registry and updates documentation/snapshots.
Reviewed changes
Copilot reviewed 27 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/devframe/src/utils/diagnostics-reporter.ts |
Adds shared ANSI console reporter for nostics diagnostics. |
packages/devframe/src/types/diagnostics.ts |
Updates public diagnostics host and option types for nostics. |
packages/devframe/src/types/context.ts |
Updates diagnostics host documentation wording. |
packages/devframe/src/rpc/diagnostics.ts |
Migrates RPC diagnostic definitions to nostics. |
packages/devframe/src/rpc/collector.ts |
Updates RPC collector diagnostic emit calls. |
packages/devframe/src/rpc/handler.ts |
Updates missing-handler diagnostic emit call. |
packages/devframe/src/rpc/serialization.ts |
Updates JSON serialization diagnostic emit call. |
packages/devframe/src/rpc/validation.ts |
Updates RPC validation diagnostic emit calls. |
packages/devframe/src/rpc/dump/collect.ts |
Updates dump collection diagnostic emit calls. |
packages/devframe/src/node/diagnostics.ts |
Migrates node diagnostic definitions to nostics. |
packages/devframe/src/node/host-diagnostics.ts |
Reworks diagnostics host registry/logger implementation. |
packages/devframe/src/node/host-agent.ts |
Updates agent diagnostic emit calls. |
packages/devframe/src/node/host-functions.ts |
Updates RPC host diagnostic emit calls. |
packages/devframe/src/node/host-views.ts |
Updates static view diagnostic emit call. |
packages/devframe/src/node/rpc-shared-state.ts |
Updates shared-state diagnostic emit call. |
packages/devframe/src/node/rpc-streaming.ts |
Updates streaming diagnostic emit/report calls. |
packages/devframe/src/node/storage.ts |
Updates storage parse warning report call. |
packages/devframe/src/helpers/vite.ts |
Updates Vite bridge warning report call. |
packages/devframe/src/adapters/mcp/build-server.ts |
Updates MCP adapter diagnostic emit calls. |
packages/devframe/package.json |
Replaces runtime dependency with nostics. |
pnpm-workspace.yaml |
Updates dependency catalog entry. |
pnpm-lock.yaml |
Regenerates lockfile for nostics and transitive changes. |
docs/guide/diagnostics.md |
Rewrites diagnostics guide for nostics API. |
docs/guide/index.md |
Updates diagnostics overview wording. |
docs/errors/index.md |
Updates diagnostics backend description. |
docs/adapters/cli.md |
Updates CLI diagnostics wording. |
skills/devframe/SKILL.md |
Updates diagnostics host wording. |
AGENTS.md |
Updates contributor diagnostics guidance. |
tests/__snapshots__/tsnapi/devframe/index.snapshot.d.ts |
Updates public API snapshot exports. |
tests/__snapshots__/tsnapi/devframe/types.snapshot.d.ts |
Updates types snapshot exports. |
tests/__snapshots__/tsnapi/devframe/node.snapshot.d.ts |
Updates node API snapshot for diagnostics host shape. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
logs-sdk@^0.0.6withnostics@^0.1.0(renamed-and-redesigned successor). Updates all 28 emit sites to the new shape (code.throw({...})/code.report({...}, { method })) and renames definition fields (message/hint/level→why/fix+ per-call reporter method).DevToolsDiagnosticsHostas a shim: keepsregister()andhost.logger.CODEvia aProxyover an internal registry, andhost.defineDiagnostics()pre-wires the shared ANSI console reporter. Dropshost.createLogger(no nostics equivalent — use the typed return ofdefineDiagnostics()directly).src/utils/diagnostics-reporter.tsexposes the shared ANSI reporter sorpc/andnode/diagnostics modules can both consume it without crossing the browser/server build boundary. Docs (docs/guide/diagnostics.md,AGENTS.md/CLAUDE.md, error/adapter pages, skill) updated for the new API;tsnapisnapshots regenerated.Test plan
pnpm lintpnpm typecheckpnpm test(319/319 passing — 3 snapshot updates:index,node,typesreflectingDevToolsDiagnosticsHostshape change and newDevToolsDefineDiagnosticsOptionsexport)pnpm buildgrep -r logs-sdkreturns zero hits (including lockfile)