Skip to content

chore: inline edge function config - #17058

Merged
teemingc merged 4 commits into
version-3from
teemingc-extract-edge-config
Sep 8, 2026
Merged

teemingc merged 4 commits into
version-3from
teemingc-extract-edge-config

Conversation

@teemingc

@teemingc teemingc commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Moves Netlify edge function configuration from config.json into the generated function module

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 6196b46:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/6196b46bfe87a2edceb5d58c582c4ab8e8350360

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17058

@changeset-bot

changeset-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ed7a47

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-netlify 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

@teemingc
teemingc changed the base branch from version-3 to teemingc-netlify-deploy-action September 8, 2026 08:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@teemingc
teemingc force-pushed the teemingc-extract-edge-config branch from 2583499 to 0d5f3c0 Compare September 8, 2026 08:45
@svelte-docs-bot

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: QUIET

Plan: Advanced

Run ID: 8768dee9-73c7-467e-b393-7f79356e7c0c

📥 Commits

Reviewing files that changed from the base of the PR and between 0d5f3c0 and 6196b46.

📒 Files selected for processing (1)
  • .changeset/tidy-edges-inline.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • sveltejs/vite-plugin-svelte (manual)
  • vitejs/vite (manual)
  • sveltejs/svelte (manual)

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The adapter now generates Netlify edge-function configuration inside the edge entry module. generate_config_export can omit preferStatic, and the edge path uses this mode. The edge entry re-exports config, while instrumentation generates traced module text from that configuration. The previous config.json update helper was removed. A build test checks the generated module and confirms that config.json has no edge_functions property. A patch changeset records the adapter fix.

Merge Risk: 🔵 Low · up to 6196b

Edge configuration now moves into the generated function module, but the regression test does not protect the intended omission of preferStatic. This is a bounded test-coverage gap with low merge risk.

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Backward Compatibility Impact Disclosure ⚠️ Warning The change removes the edge_functions key from .netlify/v1/config.json. The previous implementation wrote this key through add_edge_function_config; the new test explicitly asserts that the key … Update .changeset/tidy-edges-inline.md to declare @sveltejs/adapter-netlify: major and start the description with breaking:. Describe that edge_functions was removed from .netlify/v1/config.json and that the configuration is now e…
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required chore: prefix and accurately describes moving edge function configuration into the generated function module.
Full details: Backward Compatibility Impact Disclosure

Explanation

The change removes the edge_functions key from .netlify/v1/config.json. The previous implementation wrote this key through add_edge_function_config; the new test explicitly asserts that the key is absent. This matches the stated breaking condition for a removed config key. The changeset is patch and its description starts with chore:, not major and breaking:.

Resolution

Update .changeset/tidy-edges-inline.md to declare @sveltejs/adapter-netlify: major and start the description with breaking:. Describe that edge_functions was removed from .netlify/v1/config.json and that the configuration is now embedded in the edge function module.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teemingc teemingc changed the title fix(adapter-netlify): inline edge function config fix: inline edge function config Sep 8, 2026
@teemingc teemingc changed the title fix: inline edge function config chore: inline edge function config Sep 8, 2026
@teemingc teemingc added pkg:adapter-netlify needs-platform-tests This PR needs to run platform tests in order to merge. labels Sep 8, 2026
@teemingc
teemingc changed the base branch from teemingc-netlify-deploy-action to version-3 September 8, 2026 08:59

@coderabbitai coderabbitai 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.

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (1)
packages/adapter-netlify/test/apps/edge/build.test.js-18-18 (1)

18-18: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert that preferStatic is omitted.

The edge path now passes false to generate_config_export, but this test does not verify that contract. A regression that restores preferStatic: true would still pass.

Proposed assertion
 expect(edge_function).toContain('excludedPath:');
+expect(edge_function).not.toContain('preferStatic: true');

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: QUIET

Plan: Advanced

Run ID: 07345bb8-0db8-4ab5-b500-2c576e124f85

📥 Commits

Reviewing files that changed from the base of the PR and between 3ecb162 and 0d5f3c0.

📒 Files selected for processing (3)
  • .changeset/tidy-edges-inline.md
  • packages/adapter-netlify/index.js
  • packages/adapter-netlify/test/apps/edge/build.test.js
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • sveltejs/vite-plugin-svelte (manual)
  • vitejs/vite (manual)
  • sveltejs/svelte (manual)

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Comment thread .changeset/tidy-edges-inline.md Outdated
@teemingc teemingc mentioned this pull request Sep 8, 2026
4 of 6 tasks
@teemingc
teemingc merged commit 9821db7 into version-3 Sep 8, 2026
41 checks passed
@teemingc
teemingc deleted the teemingc-extract-edge-config branch September 8, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-platform-tests This PR needs to run platform tests in order to merge. pkg:adapter-netlify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants