Skip to content

Commit 4eeafa1

Browse files
fixup(d1-base): dedupe InMemoryTransport export; adapt C5 compat test to A1 concrete Protocol
1 parent 2e7a1f2 commit 4eeafa1

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

packages/core/src/exports/public/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ export { deserializeMessage, ReadBuffer, serializeMessage } from '../../shared/s
7979
export type { FetchLike, Transport, TransportSendOptions } from '../../shared/transport.js';
8080
export { createFetchWithInit } from '../../shared/transport.js';
8181

82-
// In-memory transport (for testing client/server in the same process)
83-
export { InMemoryTransport } from '../../util/inMemory.js';
84-
8582
// URI Template
8683
export type { Variables } from '../../shared/uriTemplate.js';
8784
export { UriTemplate } from '../../shared/uriTemplate.js';

packages/core/test/shared/protocol.compat.test.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ import type { Transport } from '../../src/shared/transport.js';
77
import type { JSONRPCMessage } from '../../src/types/index.js';
88
import { _resetDeprecationWarnings } from '../../src/util/deprecate.js';
99

10-
class TestProtocolImpl extends Protocol<BaseContext> {
11-
protected assertCapabilityForMethod(): void {}
12-
protected assertNotificationCapability(): void {}
13-
protected assertRequestHandlerCapability(): void {}
14-
protected assertTaskCapability(): void {}
15-
protected assertTaskHandlerCapability(): void {}
16-
protected buildContext(ctx: BaseContext): BaseContext {
17-
return ctx;
18-
}
19-
}
10+
// Protocol is concrete in v2; alias keeps the rest of the test unchanged.
11+
const TestProtocolImpl = Protocol;
2012

2113
class MockTransport implements Transport {
2214
onclose?: () => void;
@@ -31,7 +23,7 @@ class MockTransport implements Transport {
3123
}
3224

3325
describe('v1-compat: flat ctx.* getters', () => {
34-
let protocol: Protocol<BaseContext>;
26+
let protocol: Protocol;
3527
let transport: MockTransport;
3628
let warnSpy: ReturnType<typeof vi.spyOn>;
3729

0 commit comments

Comments
 (0)