Skip to content

fix: drop commented import from flows index template - #641

Merged
jumski merged 1 commit into
mainfrom
portable-worker-flows-template
Aug 21, 2026
Merged

fix: drop commented import from flows index template#641
jumski merged 1 commit into
mainfrom
portable-worker-flows-template

Conversation

@jumski

@jumski jumski commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Why

pgflow install scaffolded supabase/flows/index.ts with a commented-out
example import:

// Example: export { MyFlow } from './my-flow.ts';

The Supabase CLI resolves each function's import graph with a regex over raw
file text
(importPathPattern in apps/cli/src/shared/functions/deploy.ts) —
it does not strip comments. The commented example matches the pattern, the
walker tries to read supabase/flows/my-flow.ts, gets ENOENT, and
supabase start aborts on a fresh project:

failed to read file: open supabase/flows/my-flow.ts: no such file or directory

Reproduced in isolation: fresh supabase init + the comment in a transitive
file → supabase start exits with the error above; deleting only that comment
line → full stack boots.

What

  • flows/index.ts template: drop the commented example import, replace with a
    short warning comment that itself contains no import-shaped text
  • manual-installation docs: same change in the copy-paste snippet
  • regression test: generated index.ts must not reference my-flow

Verification

  • vitest create-flows-directory.test.ts — 7/7 (new assertion caught an
    earlier draft of this fix that quoted the forbidden pattern in its own
    warning comment)
  • ran supabase CLI's exact importPathPattern over the generated file: only
    ./greet-user.ts matches, which exists
  • E2E with the locally built CLI: fresh project → pgflow install
    supabase start boots the full stack (previously failed at bind-mount
    resolution)

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c5b718c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
pgflow Patch
@pgflow/core Patch
@pgflow/dsl Patch
@pgflow/client Patch
@pgflow/edge-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nx-cloud

nx-cloud Bot commented Aug 20, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c5b718c

Command Status Duration Result
nx run cli:e2e ✅ Succeeded 3s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded <1s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 1s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 7s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-21 16:36:21 UTC

jumski commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Aug 21, 4:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 21, 4:33 PM UTC: Graphite rebased this pull request as part of a merge.
  • Aug 21, 4:37 PM UTC: @jumski merged this pull request with Graphite.

@jumski
jumski changed the base branch from portable-worker-snapshot-publish to graphite-base/641 August 21, 2026 16:30
@jumski
jumski changed the base branch from graphite-base/641 to main August 21, 2026 16:31
@jumski
jumski force-pushed the portable-worker-flows-template branch from f80f35e to c5b718c Compare August 21, 2026 16:32
@jumski
jumski merged commit c6d9573 into main Aug 21, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-641.pgflow.pages.dev

📝 Details:

  • Branch: portable-worker-flows-template
  • Commit: e0f802f99907800ed7d423a787bcbe338794364c
  • View Logs

_Last updated: _

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: c6d9573d4c991b1925559c3c91d0b69d6adb6fb2
  • View Logs

Deployed at: 2026-08-21T18:37:31+02:00

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