onerepo
onerepo copied to clipboard
chore(deps): bump astro from 5.8.1 to 5.13.1
Bumps astro from 5.8.1 to 5.13.1.
Release notes
Sourced from astro's releases.
[email protected]
Patch Changes
[email protected]
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
You can trigger a rebase of this PR 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 this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Deploy Preview for onerepo ready!
| Name | Link |
|---|---|
| Latest commit | 13f2370ed6fa99f00ff3f5eb666e83f530b6bbcc |
| Latest deploy log | https://app.netlify.com/projects/onerepo/deploys/68bf358c1b39740008e979ab |
| Deploy Preview | https://deploy-preview-835--onerepo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
Lighthouse |
1 paths audited Performance: 100 (no change from production) Accessibility: 100 (no change from production) Best Practices: 100 (no change from production) SEO: 100 (no change from production) PWA: - View the detailed breakdown and full score reports |
To edit notification comments on pull requests, go to your Netlify project configuration.
A newer version of astro exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.
