From b0493596dc338377198d0a39efc813dad515b624 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 14 Oct 2024 15:12:42 +0800 Subject: [PATCH] Fix setOnSetGetEnv parameter name (#12220) Co-authored-by: Fugi --- .changeset/bright-bananas-run.md | 5 +++++ packages/astro/templates/env/module.mjs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/bright-bananas-run.md diff --git a/.changeset/bright-bananas-run.md b/.changeset/bright-bananas-run.md new file mode 100644 index 0000000000..cf812cfdd6 --- /dev/null +++ b/.changeset/bright-bananas-run.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes accidental internal `setOnSetGetEnv` parameter rename that caused runtime errors diff --git a/packages/astro/templates/env/module.mjs b/packages/astro/templates/env/module.mjs index 648556cf12..4144dde5b7 100644 --- a/packages/astro/templates/env/module.mjs +++ b/packages/astro/templates/env/module.mjs @@ -26,6 +26,8 @@ const _internalGetSecret = (key) => { }; // used while generating the virtual module -setOnSetGetEnv((_reset) => { +// biome-ignore lint/correctness/noUnusedFunctionParameters: `reset` is used by the generated code +// biome-ignore lint/correctness/noUnusedVariables: `reset` is used by the generated code +setOnSetGetEnv((reset) => { // @@ON_SET_GET_ENV@@ });