-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit f4bcbe9
authored
Update dependency astro to v5.12.0 (#1798)
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| [astro](https://astro.build)
([source](https://redirect.github.com/withastro/astro/tree/HEAD/packages/astro))
| [`5.11.2` ->
`5.12.0`](https://renovatebot.com/diffs/npm/astro/5.11.2/5.12.0) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
<details>
<summary>withastro/astro (astro)</summary>
###
[`v5.12.0`](https://redirect.github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5120)
[Compare
Source](https://redirect.github.com/withastro/astro/compare/[email protected]@5.12.0)
##### Minor Changes
-
[#​13971](https://redirect.github.com/withastro/astro/pull/13971)
[`fe35ee2`](https://redirect.github.com/withastro/astro/commit/fe35ee2835997e7e6c3e1975dc6dacfa1052a765)
Thanks [@​adamhl8](https://redirect.github.com/adamhl8)! - Adds an
experimental flag `rawEnvValues` to disable coercion of
`import.meta.env` values (e.g. converting strings to other data types)
that are populated from `process.env`
Astro allows you to configure a [type-safe schema for your environment
variables](https://docs.astro.build/en/guides/environment-variables/#type-safe-environment-variables),
and converts variables imported via `astro:env` into the expected type.
However, Astro also converts your environment variables used through
`import.meta.env` in some cases, and this 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.rawEnvValues` flag disables coercion of
`import.meta.env` values that are populated from `process.env`, allowing
you to use the raw value.
To enable this feature, add the experimental flag in your Astro config:
```diff
import { defineConfig } from "astro/config"
export default defineConfig({
+ experimental: {
+ rawEnvValues: true,
+ }
})
```
If you were relying on this coercion, you may need to update your
project code to apply it manually:
```ts diff
- const enabled: boolean = import.meta.env.ENABLED
+ const enabled: boolean = import.meta.env.ENABLED === "true"
```
See the [experimental raw environment variables reference
docs](https://docs.astro.build/en/reference/experimental-flags/raw-env-values/)
for more information.
-
[#​13941](https://redirect.github.com/withastro/astro/pull/13941)
[`6bd5f75`](https://redirect.github.com/withastro/astro/commit/6bd5f75806cb4df39d9e4e9b1f2225dcfdd724b0)
Thanks [@​aditsachde](https://redirect.github.com/aditsachde)! -
Adds support for TOML files to Astro's built-in `glob()` and `file()`
content loaders.
In Astro 5.2, Astro added support for using TOML frontmatter in Markdown
files instead of YAML. However, if you wanted to use TOML files as local
content collection entries themselves, you needed to write your own
loader.
Astro 5.12 now directly supports loading data from TOML files in content
collections in both the `glob()` and the `file()` loaders.
If you had added your own TOML content parser for the `file()` loader,
you can now remove it as this functionality is now included:
```diff
// src/content.config.ts
import { defineCollection } from "astro:content";
import { file } from "astro/loaders";
- import { parse as parseToml } from "toml";
const dogs = defineCollection({
- loader: file("src/data/dogs.toml", { parser: (text) => parseToml(text)
}),
+ loader: file("src/data/dogs.toml")
schema: /* ... */
})
```
Note that TOML does not support top-level arrays. Instead, the `file()`
loader considers each top-level table to be an independent entry. The
table header is populated in the `id` field of the entry object.
See Astro's [content collections
guide](https://docs.astro.build/en/guides/content-collections/#built-in-loaders)
for more information on using the built-in content loaders.
##### Patch Changes
- Updated dependencies
\[[`6bd5f75`](https://redirect.github.com/withastro/astro/commit/6bd5f75806cb4df39d9e4e9b1f2225dcfdd724b0)]:
-
[@​astrojs/markdown-remark](https://redirect.github.com/astrojs/markdown-remark)@​6.3.3
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/auguwu/floofy.dev).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent f821834 commit f4bcbe9Copy full SHA for f4bcbe9
File tree
Expand file treeCollapse file tree
2 files changed
+1
-1
lines changedFilter options
Expand file treeCollapse file tree
2 files changed
+1
-1
lines changedbun.lockb
Copy file name to clipboard1.27 KB
Binary file not shown.
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
|
0 commit comments