You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forward-port #1984 to main for the SvelteKit V2 builder path.
This keeps the main branch from retaining stale Workflow queue triggers on the shared SvelteKit __data.json.func/.vc-config.json source config after the dedicated Workflow function is copied out.
Changes
Reuses WORKFLOW_QUEUE_TRIGGER from @workflow/builders instead of duplicating queue trigger config in the SvelteKit builder.
Strips stale Workflow queue triggers from the shared source function config after copying flow.func.
Adds focused coverage for the pure .vc-config.json transform.
Validation
pnpm install --frozen-lockfile
pnpm --filter '@workflow/sveltekit...' build
pnpm vitest run packages/sveltekit/src/vc-config.test.ts
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Forward-ports PR #1984 to main by ensuring the SvelteKit V2 builder path doesn’t leave stale Workflow queue triggers attached to the shared SvelteKit source function config after copying out the dedicated workflow function.
Changes:
Reuses WORKFLOW_QUEUE_TRIGGER from @workflow/builders for the dedicated workflow handler config.
Strips Workflow queue triggers from the shared source function’s .vc-config.json after flow.func is copied out.
Adds unit tests for the pure .vc-config.json trigger-stripping transform.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File
Description
packages/sveltekit/src/vc-config.ts
Adds helpers to strip Workflow queue triggers from parsed config objects and from .vc-config.json files.
packages/sveltekit/src/vc-config.test.ts
Adds focused tests to verify trigger stripping and preservation of unrelated triggers.
packages/sveltekit/src/index.ts
Switches to shared trigger constant and strips triggers from the source function config after copying flow.func.
.changeset/stale-sveltekit-triggers-main.md
Publishes a patch changeset describing the fix for duplicate queue consumers.
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
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
Forward-port #1984 to
mainfor the SvelteKit V2 builder path.This keeps the
mainbranch from retaining stale Workflow queue triggers on the shared SvelteKit__data.json.func/.vc-config.jsonsource config after the dedicated Workflow function is copied out.Changes
WORKFLOW_QUEUE_TRIGGERfrom@workflow/buildersinstead of duplicating queue trigger config in the SvelteKit builder.flow.func..vc-config.jsontransform.Validation
pnpm install --frozen-lockfilepnpm --filter '@workflow/sveltekit...' buildpnpm vitest run packages/sveltekit/src/vc-config.test.tspnpm exec biome check packages/sveltekit/src/index.ts packages/sveltekit/src/vc-config.ts packages/sveltekit/src/vc-config.test.ts .changeset/stale-sveltekit-triggers-main.mdRelated