Skip to content

Commit

Permalink
Rename and Unexport isRuntimeMessage Task 10256 (#22567)
Browse files Browse the repository at this point in the history
## Description

Rename and unexport `isRuntimeMessage` function from containerRuntime.ts
isRuntimeMessage was renamed to isUnpackedRuntimeMessage
  • Loading branch information
MarioJGMsoft committed Sep 20, 2024
1 parent 7991bef commit 2f7a9d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion packages/runtime/container-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@
"typescript": "~5.4.5"
},
"typeValidation": {
"broken": {},
"broken": {
"Function_isRuntimeMessage": {
"backCompat": false
}
},
"entrypoint": "internal"
}
}
6 changes: 2 additions & 4 deletions packages/runtime/container-runtime/src/containerRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,8 @@ const defaultCloseSummarizerDelayMs = 5000; // 5 seconds

/**
* Checks whether a message.type is one of the values in ContainerMessageType
* @deprecated please use version in driver-utils
* @internal
*/
export function isRuntimeMessage(message: ISequencedDocumentMessage): boolean {
export function isUnpackedRuntimeMessage(message: ISequencedDocumentMessage): boolean {
return (Object.values(ContainerMessageType) as string[]).includes(message.type);
}

Expand Down Expand Up @@ -2808,7 +2806,7 @@ export class ContainerRuntime
{ batchStart: true, batchEnd: true }, // Single message
local,
savedOp,
isRuntimeMessage(messageCopy) /* runtimeBatch */,
isUnpackedRuntimeMessage(messageCopy) /* runtimeBatch */,
);
}

Expand Down
1 change: 0 additions & 1 deletion packages/runtime/container-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export {
IContainerRuntimeOptions,
loadContainerRuntime,
LoadContainerRuntimeParams,
isRuntimeMessage,
agentSchedulerId,
ContainerRuntime,
DeletedResponseHeaderKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ declare type current_as_old_for_Function_detectOutboundReferences = requireAssig
* typeValidation.broken:
* "Function_isRuntimeMessage": {"backCompat": false}
*/
// @ts-expect-error compatibility expected to be broken
declare type current_as_old_for_Function_isRuntimeMessage = requireAssignableTo<TypeOnly<typeof current.isRuntimeMessage>, TypeOnly<typeof old.isRuntimeMessage>>

/*
Expand Down

0 comments on commit 2f7a9d0

Please sign in to comment.