Skip to content

feat(devframe): expose devframe/rpc/dump sub-export#16

Merged
antfu merged 4 commits into
mainfrom
antfu/update-docs-skills
May 15, 2026
Merged

feat(devframe): expose devframe/rpc/dump sub-export#16
antfu merged 4 commits into
mainfrom
antfu/update-docs-skills

Conversation

@antfu
Copy link
Copy Markdown
Contributor

@antfu antfu commented May 15, 2026

Summary

  • Add a dedicated devframe/rpc/dump sub-export so consumers can import dump helpers (dumpFunctions, createClientFromDump, getDefinitionsWithDumps, serializeDumpError, reviveDumpError, collectStaticRpcDump, plus the StaticRpcDump* types) from a focused entry.
  • Keep the same symbols on devframe/rpc for backward compatibility, marked @deprecated so editors light up a migration hint; each symbol gets its own re-declaration so the JSDoc survives tsdown's dts bundling.
  • Runtime shares a single chunk between the two entries — no duplication.

Test plan

  • pnpm lint
  • pnpm typecheck
  • pnpm --filter devframe build emits dist/rpc/dump.{mjs,d.mts} and re-uses the chunk for dist/rpc/index.{mjs,d.mts}
  • pnpm vitest run — 29 files, 319 tests green; new tests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.{d.ts,js} written, existing rpc.snapshot.d.ts unchanged
  • Verified @deprecated JSDoc is present in the bundled chunk powering devframe/rpc

Lift dump helpers (`dumpFunctions`, `createClientFromDump`,
`collectStaticRpcDump`, `serializeDumpError`, `reviveDumpError`, the
`StaticRpcDump*` types, …) into a dedicated `devframe/rpc/dump` entry.
The same symbols stay re-exported from `devframe/rpc` and are now flagged
`@deprecated` so consumers see the migration hint in their editor; the
deprecation JSDoc is re-declared per symbol so it survives tsdown's dts
bundling.
Copilot AI review requested due to automatic review settings May 15, 2026 01:18
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 7b7e4ef
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a067b154f7ddb00088ef7e2
😎 Deploy Preview https://deploy-preview-16--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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new focused devframe/rpc/dump public sub-export while keeping existing dump-related symbols available from devframe/rpc with deprecation guidance.

Changes:

  • Adds rpc/dump to package exports and tsdown entries.
  • Re-exports dump error/static helpers from the dump entry.
  • Re-declares dump exports on devframe/rpc with @deprecated JSDoc and adds API snapshots for the new subpath.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/devframe/package.json Adds the ./rpc/dump package export.
packages/devframe/tsdown.config.ts Adds the rpc/dump build entry.
packages/devframe/src/rpc/dump/index.ts Exposes dump error/static exports from the dump entry.
packages/devframe/src/rpc/index.ts Keeps dump symbols on the old RPC barrel with deprecation annotations.
tests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.d.ts Adds TypeScript API snapshot for the new sub-export.
tests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.js Adds runtime API snapshot for the new sub-export.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"./recipes/open-helpers": "./dist/recipes/open-helpers.mjs",
"./rpc": "./dist/rpc/index.mjs",
"./rpc/client": "./dist/rpc/client.mjs",
"./rpc/dump": "./dist/rpc/dump.mjs",
import { reviveDumpError, serializeDumpError } from './error'

export * from './error'
export * from './static'
antfu added 2 commits May 15, 2026 10:27
# Conflicts:
#	packages/devframe/tsdown.config.ts
- Add `devframe/rpc/dump` to `alias.ts` so monorepo source/tests/examples
  resolve the new subpath directly without falling back to `dist/`.
- Switch `rpc/dump/static.ts` to import `getRpcHandler` from `../handler`
  and `dumpFunctions` from `./index`, removing the cycle
  `rpc/dump → dump/static → devframe/rpc → rpc/dump`.
- Refresh the `devframe/rpc` runtime tsnapi snapshot to reflect that the
  deprecated dump re-exports are now plain `const` re-declarations.
Copilot AI review requested due to automatic review settings May 15, 2026 01:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

} from 'devframe/constants'
import { dumpFunctions, getRpcHandler } from 'devframe/rpc'
import { getRpcHandler } from '../handler'
import { dumpFunctions } from './index'
Comment on lines +16 to +17
export * from './error'
export * from './static'
…index.ts` as barrel

Move `dumpFunctions`, `createClientFromDump`, `getDefinitionsWithDumps`
and their private helpers from `rpc/dump/index.ts` into a new
`rpc/dump/collect.ts`. `index.ts` is now a three-line barrel re-exporting
`./collect`, `./error`, `./static`. Repoint `static.ts` at `./collect` so
the barrel does not reintroduce a `dump/static → dump → dump/static`
cycle.
@antfu antfu merged commit 17fbcfd into main May 15, 2026
12 checks passed
@antfu antfu deleted the antfu/update-docs-skills branch May 15, 2026 01:51
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