[Snyk] Upgrade astro from 3.0.13 to 4.12.2 #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade astro from 3.0.13 to 4.12.2.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 141 versions ahead of your current version.
The recommended version was released on 23 days ago.
Issues fixed by the recommended upgrade:
SNYK-JS-VITE-6182924
SNYK-JS-BRACES-6838727
SNYK-JS-MICROMATCH-6838728
SNYK-JS-ZOD-5925617
SNYK-JS-ASTRO-7547139
SNYK-JS-VITE-6098386
SNYK-JS-BABELTRAVERSE-5962462
SNYK-JS-POSTCSS-5926692
SNYK-JS-SHARP-5922108
SNYK-JS-VITE-6531286
SNYK-JS-UNDICI-5962466
SNYK-JS-UNDICI-6252336
SNYK-JS-UNDICI-6564963
SNYK-JS-UNDICI-6564964
Release notes
Package name: astro
Patch Changes
#11505
8ff7658
Thanks @ ematipico! - Enhances the dev server logging when rewrites occur during the lifecycle or rendering.The dev server will log the status code before and after a rewrite:
#11506
026e8ba
Thanks @ sarah11918! - Fixes typo in documenting theslot="fallback"
attribute for Server Islands experimental feature.#11508
ca335e1
Thanks @ cramforce! - Escapes HTML in serialized props#11501
4db78ae
Thanks @ martrapp! - Adds the missing export for accessing thegetFallback()
function of the client site router.Patch Changes
d27cf6d
Thanks @ ascorbic! - Logs underlying error when a template cannot be downloadedPatch Changes
7adb350
Thanks @ bluwy! - Prevents throwing errors when checking if a component is a Solid component in runtimePatch Changes
7adb350
Thanks @ bluwy! - Prevents throwing errors when checking if a component is a React component in runtimePatch Changes
#11571
1c3265a
Thanks @ bholmesdev! - BREAKING CHANGE to the experimental Actions API only. Install the latest@ astrojs/react
integration as well if you're using React 19 features.Make
.safe()
the default return value for actions. This means{ data, error }
will be returned when calling an action directly. If you prefer to get the data while allowing errors to throw, chain the.orThrow()
modifier.// Before
const { data, error } = await actions.like.safe();
// After
const { data, error } = await actions.like();
// Before
const newLikes = await actions.like();
// After
const newLikes = await actions.like.orThrow();
Migration
To migrate your existing action calls:
.safe
from existing safe action calls.orThrow
to existing unsafe action calls#11570
84189b6
Thanks @ bholmesdev! - BREAKING CHANGE to the experimental Actions API only. Install the latest@ astrojs/react
integration as well if you're using React 19 features.Updates the Astro Actions fallback to support
action={actions.name}
instead of usinggetActionProps().
This will submit a form to the server in zero-JS scenarios using a search parameter:import { actions } from 'astro:actions';
---
<form action={actions.logOut}>
<!--output: action="?_astroAction=logOut"-->
<button>Log Out</button>
</form>
You may also construct form action URLs using string concatenation, or by using the
URL()
constructor, with the an action's.queryString
property:import { actions } from 'astro:actions';
const confirmationUrl = new URL('/confirmation', Astro.url);
confirmationUrl.search = actions.queryString;
---
<form method="POST" action={confirmationUrl.pathname}>
<button>Submit</button>
</form>
Migration
getActionProps()
is now deprecated. To use the new fallback pattern, remove thegetActionProps()
input from your form and pass your action function to the formaction
attribute:import {
actions,
- getActionProps,
} from 'astro:actions';
---
+ <form method="POST" action={actions.logOut}>
- <form method="POST">
- <input {...getActionProps(actions.logOut)} />
<button>Log Out</button>
</form>
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: