Skip to content

fix: regression where getEnvFromPlatformProxy received wrong options type#1206

Merged
james-elicx merged 3 commits intoopennextjs:mainfrom
314systems:fix/get-env-from-platform-proxy
Apr 17, 2026
Merged

fix: regression where getEnvFromPlatformProxy received wrong options type#1206
james-elicx merged 3 commits intoopennextjs:mainfrom
314systems:fix/get-env-from-platform-proxy

Conversation

@314systems
Copy link
Copy Markdown
Contributor

This fixes a regression introduced in 32ba91a where getEnvFromPlatformProxy call sites passed OpenNextConfig even though the function expects Wrangler GetPlatformProxyOptions.

The fix restores the pre-32ba91a argument shape by passing { configPath, environment } from CLI arguments, so env resolution follows the selected Wrangler config/environment.

It also adds explicit return type annotations to related CLI helpers to make declaration output stable and not rely on inference.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: c731edb

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

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@1206

commit: c731edb

…type

This fixes a regression introduced in opennextjs@32ba91a where `getEnvFromPlatformProxy` call sites passed `OpenNextConfig` even though the function expects Wrangler `GetPlatformProxyOptions`.

The fix restores the pre-32ba91a argument shape by passing `{ configPath, environment }` from CLI arguments, so env resolution follows the selected Wrangler config/environment.

It also adds explicit return type annotations to related CLI helpers to make declaration output stable and not rely on inference.
@314systems 314systems force-pushed the fix/get-env-from-platform-proxy branch from bbc28dc to ea8c543 Compare April 16, 2026 13:16
Comment thread .changeset/red-yaks-go.md Outdated
Copy link
Copy Markdown
Collaborator

@james-elicx james-elicx left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I just pushed a commit to remove some of the return type changes for the internal utils so that the PR is scoped to the fix and can be merged without any nitpicks about types. Hope that's okay :)

@james-elicx james-elicx merged commit 585795d into opennextjs:main Apr 17, 2026
7 checks passed
@314systems 314systems deleted the fix/get-env-from-platform-proxy branch April 20, 2026 02:05
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