Repository navigation
fix(app): align @ag-ui packages on 0.0.53 so delta patches apply - #150
Open
tbrandenburg wants to merge 1 commit into
Open
tbrandenburg wants to merge 1 commit into
tbrandenburg wants to merge 1 commit into
Conversation
@ag-ui/client 0.0.52 namespace-imports fast-json-patch, a CommonJS package whose applyPatch Node's ESM loader cannot detect, so every ACTIVITY_DELTA/STATE_DELTA patch in the externalized CopilotKit runtime failed with 'a.applyPatch is not a function'. 0.0.53 is the first release using a default import. The overrides also collapse the duplicate 0.0.48 copy. Fixes CopilotKit#146
Author
|
Extra "before" evidence on an unmodified upstream |
This branch has not been deployed
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
Aligns
@ag-ui/client,core,encoderandprotoon 0.0.53 via pnpm overrides so the Next.js runtime can apply AG-UI delta patches again.Fixes #146
Root cause
@ag-ui/client@0.0.52doesimport * as a from "fast-json-patch"and callsa.applyPatch(...).fast-json-patch@3.1.1is CommonJS, and Node's ESM loader cannot detectapplyPatchamong its exports, so under native Node ESM (the externalized@copilotkit/runtime) it isundefined:@ag-ui/client@0.0.53is the first release using a default import (bisected 0.0.52 -> 0.0.59 and 1.0.x; all later versions keep it).Changes
package.json: overrides for the four@ag-uipackages at 0.0.53 (@copilotkit/runtime@1.55.2-next.1pins them to exactly 0.0.52).pnpm-lock.yaml: regenerated; one version of each package remains, and the duplicate 0.0.48 copy is gone.Testing
Failed to apply activity patch ... a.applyPatch is not a functionlines in the Next.js log for one answer.pnpm install --frozen-lockfileis clean;pnpm --filter @repo/app test164 passed;pnpm buildandpnpm lint(no errors) pass.Notes for reviewers
@ag-ui/client; this override can be dropped then.