[Snyk] Upgrade astro from 3.0.13 to 4.11.5 #12
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.11.5.
ℹ️ 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 137 versions ahead of your current version.
The recommended version was released on a month ago.
Issues fixed by the recommended upgrade:
SNYK-JS-VITE-6182924
SNYK-JS-ZOD-5925617
SNYK-JS-VITE-6098386
SNYK-JS-VITE-6531286
SNYK-JS-BABELTRAVERSE-5962462
SNYK-JS-POSTCSS-5926692
SNYK-JS-SHARP-5922108
SNYK-JS-UNDICI-5962466
SNYK-JS-UNDICI-6252336
SNYK-JS-UNDICI-6564963
SNYK-JS-UNDICI-6564964
Release notes
Package name: astro
Patch Changes
d27cf6d
Thanks @ ascorbic! - Logs underlying error when a template cannot be downloadedPatch 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>
Patch Changes
49b5145
]: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: