-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure that non-inherited fields are not removed when using an i…
…nferred named environment (#7478) It is an error for the the user to provide an environment name that doesn't match any of the named environments in the Wrangler configuration. But if there are no named environments defined at all in the Wrangler configuration, we special case the top-level environment as though it was a named environment. Previously, when this happens, we would remove all the nonInheritable fields from the configuration (essentially all the bindings) leaving an incorrect configuration. Now we correctly generate a flattened named environment that has the nonInheritable fields, plus correctly applies any transformFn on inheritable fields.
- Loading branch information
1 parent
ee98fd4
commit 2e90efc
Showing
4 changed files
with
90 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: ensure that non-inherited fields are not removed when using an inferred named environment | ||
|
||
It is an error for the the user to provide an environment name that doesn't match any of the named environments in the Wrangler configuration. | ||
But if there are no named environments defined at all in the Wrangler configuration, we special case the top-level environment as though it was a named environment. | ||
Previously, when this happens, we would remove all the nonInheritable fields from the configuration (essentially all the bindings) leaving an incorrect configuration. | ||
Now we correctly generate a flattened named environment that has the nonInheritable fields, plus correctly applies any transformFn on inheritable fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters