Skip to content

docs: add workflow import migration note to README - #1192

Merged
flora131 merged 1 commit into
mainfrom
flora131-patch-1
Jun 2, 2026
Merged

docs: add workflow import migration note to README#1192
flora131 merged 1 commit into
mainfrom
flora131-patch-1

Conversation

@flora131

@flora131 flora131 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a temporary warning to the root README alerting users to a breaking change in workflow authoring that may require updates to custom workflows using the old import API.

Key Changes

  • Added a ⚠️ callout block in the README's workflow section noting that custom workflows importing other workflows by registered name or path object need to be migrated
  • Points users to the workflow import guidance in packages/workflows/README.md for migration instructions

Migration Context

This note accompanies the breaking change introduced in #1181 (feat(workflows)!: TypeBox-native input/output schemas). Workflow imports now use standard TypeScript module imports and pass compiled workflow definitions to .import(workflow, { as? }) rather than importing by registered name or path object.

@flora131
flora131 merged commit 093a2e1 into main Jun 2, 2026
4 checks passed
@claude

claude Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review

Thanks for adding the migration note — a heads-up here is helpful for anyone who maintains custom workflows. The PR is tiny and low-risk (README-only, no code), but flagging two issues that should be fixed in a follow-up:

1. Broken anchor link

The link targets #example-4--compose-workflows-with-imports, but the actual heading in packages/workflows/README.md:144 is:

### Example 4 — Compose workflows

GitHub renders that heading's anchor as #example-4--compose-workflows (em-dash dropped, surrounding spaces collapse into a double hyphen). The trailing -with-imports is not in the heading, so this link currently 404s within the target README.

Fix: either update the link to #example-4--compose-workflows, or rename the section in packages/workflows/README.md to ### Example 4 — Compose workflows with imports so the link resolves.

2. API name in the note doesn't match the documented API

The note says:

Workflow imports now use normal TypeScript module imports and pass compiled workflow definitions to .import(workflow, { as? }).

But the workflows README (and the surrounding Example 4 body) describes the API as ctx.workflow(workflowDefinition, options) — see packages/workflows/README.md:146 and :204. A grep of packages/workflows/src/ finds no .import( method either. Users who try to call .import(...) after reading this note won't find it.

Fix: rephrase to refer to ctx.workflow(workflowDefinition, { as? }) (or whatever the actual aliasing option key is) so the note matches the documented surface it links to.

Other categories

  • Performance / security / tests: N/A — docs-only change.
  • Style: consistent with the existing callout block above it. ✅

Once the anchor and the API name are corrected, the migration note will do its job. Small follow-up PR recommended since this already merged.

@claude claude Bot changed the title Update README.md docs: add workflow import migration note to README Jun 2, 2026
@lavaman131
lavaman131 deleted the flora131-patch-1 branch June 21, 2026 00:45
lavaman131 pushed a commit that referenced this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant