feat(devframe): expose devframe/rpc/dump sub-export#16
Merged
Conversation
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.
✅ 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
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/dumpto package exports and tsdown entries. - Re-exports dump error/static helpers from the dump entry.
- Re-declares dump exports on
devframe/rpcwith@deprecatedJSDoc 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' |
# 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.
| } 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.
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
devframe/rpc/dumpsub-export so consumers can import dump helpers (dumpFunctions,createClientFromDump,getDefinitionsWithDumps,serializeDumpError,reviveDumpError,collectStaticRpcDump, plus theStaticRpcDump*types) from a focused entry.devframe/rpcfor backward compatibility, marked@deprecatedso editors light up a migration hint; each symbol gets its own re-declaration so the JSDoc survives tsdown's dts bundling.Test plan
pnpm lintpnpm typecheckpnpm --filter devframe buildemitsdist/rpc/dump.{mjs,d.mts}and re-uses the chunk fordist/rpc/index.{mjs,d.mts}pnpm vitest run— 29 files, 319 tests green; newtests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.{d.ts,js}written, existingrpc.snapshot.d.tsunchanged@deprecatedJSDoc is present in the bundled chunk poweringdevframe/rpc