Skip to content

feat(cli): scaffold fetch-style edge functions#5845

Open
jgoux wants to merge 4 commits into
developfrom
agent/next-functions-fetch-default
Open

feat(cli): scaffold fetch-style edge functions#5845
jgoux wants to merge 4 commits into
developfrom
agent/next-functions-fetch-default

Conversation

@jgoux

@jgoux jgoux commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the next CLI Edge Function scaffold to use the Web Fetch-style export default { fetch(...) } authoring model instead of Deno.serve(...).

New functions now get a function-local package.json with no default dependencies, and no generated deno.json. This makes the default template dependency-free while establishing the package-manifest boundary for users who add dependencies under supabase/functions/<function-name> and import them by bare specifier from function code.

Notes

Existing deno.json manifest detection remains in shared config so existing projects and explicit import-map flows keep working.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for the contribution! This pull request isn't linked to a tracked issue, so it's being closed automatically.

Please open an issue first, wait for a maintainer to add the open-for-contribution label, then open a pull request that links the issue with a closing keyword (e.g. Closes #123).
See CONTRIBUTING.md for the full workflow. Once a maintainer adds the open-for-contribution label to a linked open issue, reopen or open a new pull request and it will be accepted.

@github-actions github-actions Bot closed this Jul 9, 2026
@avallete avallete reopened this Jul 9, 2026
@jgoux
jgoux marked this pull request as ready for review July 17, 2026 11:11
@jgoux
jgoux requested a review from a team as a code owner July 17, 2026 11:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5077ca5265

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 20 to 24
{
imports: {
"@supabase/functions-js": "jsr:@supabase/functions-js@^2",
},
private: true,
type: "module",
dependencies: {},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Upload the function-local package manifest for API deploys

When a user adds a bare-specifier dependency to this generated manifest and runs the default supabase functions deploy, the API deployment path cannot resolve it: writeSourceDeployForm in apps/cli/src/shared/functions/deploy.ts only uploads the entrypoint and reachable local/import-map files, and its import walker skips bare specifiers, so this package.json is never included in the multipart upload. The deployed runtime therefore has neither the manifest nor the dependency declaration; either include the manifest in source uploads or route package-based functions through the bundler.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@5077ca5265106cc841a9bd12cb191f30b0b03036

Preview package for commit 5077ca5.

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.

2 participants