Bump astro from 5.12.8 to 5.13.1 in the npm_and_yarn group across 1 directory
Type: Pull Request
State: Open
Association: None
Comments: 0
(10 months ago)
(10 months ago)
dependencies javascript
Bumps the npm_and_yarn group with 1 update in the / directory: astro.
Updates astro from 5.12.8 to 5.13.1
Release notes
Sourced from astro's releases.
astro@5.13.1
Patch Changes
astro@5.13.0
Minor Changes
#14173
39911b8Thanks@florian-lefebvre! - Adds an experimental flagstaticImportMetaEnvto disable the replacement ofimport.meta.envvalues withprocess.envcalls and their coercion of environment variable values. This supersedes therawEnvValuesexperimental flag, which is now removed.Astro allows you to configure a type-safe schema for your environment variables, and converts variables imported via
astro:envinto the expected type. This is the recommended way to use environment variables in Astro, as it allows you to easily see and manage whether your variables are public or secret, available on the client or only on the server at build time, and the data type of your values.However, you can still access environment variables through
process.envandimport.meta.envdirectly when needed. This was the only way to use environment variables in Astro beforeastro:envwas added in Astro 5.0, and Astro's default handling ofimport.meta.envincludes some logic that was only needed for earlier versions of Astro.The
experimental.staticImportMetaEnvflag updates the behavior ofimport.meta.envto align with Vite's handling of environment variables and for better ease of use with Astro's current implementations and features. This will become the default behavior in Astro 6.0, and this early preview is introduced as an experimental feature.Currently, non-public
import.meta.envenvironment variables are replaced by a reference toprocess.env. Additionally, Astro may also convert the value type of your environment variables used throughimport.meta.env, which can prevent access to some values such as the strings"true"(which is converted to a boolean value), and"1"(which is converted to a number).The
experimental.staticImportMetaEnvflag simplifies Astro's default behavior, making it easier to understand and use. Astro will no longer replace anyimport.meta.envenvironment variables with aprocess.envcall, nor will it coerce values.To enable this feature, add the experimental flag in your Astro config and remove
rawEnvValuesif it was enabled:// astro.config.mjs import { defineConfig } from "astro/config";export default defineConfig({
- experimental: {
- staticImportMetaEnv: true
- rawEnvValues: false
- } });
Updating your project
If you were relying on Astro's default coercion, you may need to update your project code to apply it manually:
// src/components/MyComponent.astro - const enabled: boolean = import.meta.env.ENABLED; + const enabled: boolean = import.meta.env.ENABLED === "true";If you were relying on the transformation into
process.envcalls, you may need to update your project code to apply it manually:// src/components/MyComponent.astro - const enabled: boolean = import.meta.env.DB_PASSWORD; + const enabled: boolean = process.env.DB_PASSWORD;
... (truncated)
Changelog
Sourced from astro's changelog.
5.13.1
Patch Changes
5.13.0
Minor Changes
#14173
39911b8Thanks@florian-lefebvre! - Adds an experimental flagstaticImportMetaEnvto disable the replacement ofimport.meta.envvalues withprocess.envcalls and their coercion of environment variable values. This supersedes therawEnvValuesexperimental flag, which is now removed.Astro allows you to configure a type-safe schema for your environment variables, and converts variables imported via
astro:envinto the expected type. This is the recommended way to use environment variables in Astro, as it allows you to easily see and manage whether your variables are public or secret, available on the client or only on the server at build time, and the data type of your values.However, you can still access environment variables through
process.envandimport.meta.envdirectly when needed. This was the only way to use environment variables in Astro beforeastro:envwas added in Astro 5.0, and Astro's default handling ofimport.meta.envincludes some logic that was only needed for earlier versions of Astro.The
experimental.staticImportMetaEnvflag updates the behavior ofimport.meta.envto align with Vite's handling of environment variables and for better ease of use with Astro's current implementations and features. This will become the default behavior in Astro 6.0, and this early preview is introduced as an experimental feature.Currently, non-public
import.meta.envenvironment variables are replaced by a reference toprocess.env. Additionally, Astro may also convert the value type of your environment variables used throughimport.meta.env, which can prevent access to some values such as the strings"true"(which is converted to a boolean value), and"1"(which is converted to a number).The
experimental.staticImportMetaEnvflag simplifies Astro's default behavior, making it easier to understand and use. Astro will no longer replace anyimport.meta.envenvironment variables with aprocess.envcall, nor will it coerce values.To enable this feature, add the experimental flag in your Astro config and remove
rawEnvValuesif it was enabled:// astro.config.mjs import { defineConfig } from "astro/config";export default defineConfig({
- experimental: {
- staticImportMetaEnv: true
- rawEnvValues: false
- } });
Updating your project
If you were relying on Astro's default coercion, you may need to update your project code to apply it manually:
// src/components/MyComponent.astro - const enabled: boolean = import.meta.env.ENABLED; + const enabled: boolean = import.meta.env.ENABLED === "true";If you were relying on the transformation into
process.envcalls, you may need to update your project code to apply it manually:// src/components/MyComponent.astro
... (truncated)
Commits
1591bc7[ci] release (#14227)f2490abFix automatic Chrome DevTools workspace feature (#14225)a186848[ci] release (#14217)b33780d[ci] format39911b8feat: experimental static import.meta.env (#14173)41ed3acfeat: add automatic chrome workspace handling (#14122)806d2dcchore: add additional contributor to changelog (#14203)dc9e35c[ci] release (#14189)3e4cb8efix: fix HMR for styles (#14199)9518975fix(astro): prevent double-prefixed output paths (#14020)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions
You can disable automated security fix PRs for this repo from the Security Alerts page.
Pull Request Statistics
1
1
+1
-1
Package Dependencies
astro
npm
5.12.8 → 5.13.1
Minor
the npm_and_yarn group across 1 directory
Technical Details
| ID: | 5417805 |
| UUID: | 2760121586 |
| Node ID: | PR_kwDONZxZl86khBzy |
| Host: | GitHub |
| Repository: | CodeEditorLand/StatusCodeEditorLandWebSite |
| Merge State: | Unknown |