Open
Conversation
shinevue
approved these changes
Nov 29, 2024
9678eb6 to
0ce78a2
Compare
61618dc to
0ce78a2
Compare
6ff34dc to
3ae0b47
Compare
f9e7c67 to
06326a5
Compare
c8f84e2 to
e974020
Compare
b4b1d1c to
b1e198c
Compare
70df7cc to
c0d1256
Compare
c0d1256 to
03bde31
Compare
c1366c9 to
50712fa
Compare
c90cb4f to
322baae
Compare
4584232 to
d633590
Compare
7e5d134 to
a532f55
Compare
0dd5ce7 to
63b654c
Compare
c89992d to
b38c5ed
Compare
b38c5ed to
2bb4735
Compare
2bb4735 to
ff76046
Compare
68ead47 to
be91691
Compare
aac36d2 to
c0ff27c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
^2.0.0→^5.0.0^2.0.0→^6.0.0Release Notes
withastro/astro (@astrojs/react)
v5.0.0Compare Source
Major Changes
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)Minor Changes
72f7960Thanks @ocavue! - Update@vitejs/plugin-reactto v5.Patch Changes
#15187
bbb5811Thanks @matthewp! - Update to Astro 6 beta#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22#15700
4e7f3e8Thanks @ocavue! - Improves how React components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used togetherUpdated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:v4.4.2Compare Source
Patch Changes
#14715
3d55c5dThanks @ascorbic! - Adds support for client hydration ingetContainerRenderer()The
getContainerRenderer()function is exported by Astro framework integrations to simplify the process of rendering framework components when using the experimental Container API inside a Vite or Vitest environment. This update adds the client hydration entrypoint to the returned object, enabling client-side interactivity for components rendered using this function. Previously this required users to manually callcontainer.addClientRenderer()with the appropriate client renderer entrypoint.See the
container-with-vitestdemo for a usage example, and the Container API documentation for more information on using framework components with the experimental Container API.v4.4.1Compare Source
Patch Changes
e3175d9Thanks @GameRoMan! - Updatesviteversion to fix CVEv4.4.0Compare Source
Minor Changes
#14386
f75f446Thanks @yanthomasdev! - Stabilizes the formerly experimentalgetActionState()andwithState()functions introduced in@astrojs/reactv3.4.0 used to integrate Astro Actions with React 19'suseActionState()hook.This example calls a
likeaction that accepts apostIdand returns the number of likes. Pass this action to thewithState()function to apply progressive enhancement info, and apply touseActionState()to track the result:You can also access the state stored by
useActionState()from your action handler. CallgetActionState()with the API context, and optionally apply a type to the result:If you were previously using this experimental feature, you will need to update your code to use the new stable exports:
// src/components/Form.jsx import { actions } from 'astro:actions'; -import { experimental_withState } from '@​astrojs/react/actions'; +import { withState } from '@​astrojs/react/actions'; import { useActionState } from "react";// src/actions/index.ts import { defineAction, type SafeResult } from 'astro:actions'; import { z } from 'astro:schema'; -import { experimental_getActionState } from '@​astrojs/react/actions'; +import { getActionState } from '@​astrojs/react/actions';v4.3.1Compare Source
Patch Changes
c24a8f4Thanks @jsparkdev! - Updatesviteversion to fix CVEv4.3.0Compare Source
Minor Changes
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
v4.2.7Compare Source
Patch Changes
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVEv4.2.6Compare Source
Patch Changes
e1cd1aeThanks @florian-lefebvre! - Fixes SSR renderer typev4.2.5Compare Source
Patch Changes
a19a185Thanks @florian-lefebvre! - Improves type-safety of renderersv4.2.4Compare Source
Patch Changes
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest versionv4.2.3Compare Source
Patch Changes
ff9d69eThanks @jsparkdev! - updateviteto the latest versionv4.2.2Compare Source
Patch Changes
a98ae5bThanks @ematipico! - Updates the dependencyviteto the latest.v4.2.1Compare Source
Patch Changes
80926faThanks @ematipico! - Updatesesbuildandviteto the latest to avoid false positives audits warnings caused byesbuild.v4.2.0Compare Source
Minor Changes
#13036
3c90d8fThanks @artmsilva! - Adds experimental support for disabling streamingThis is useful to support libraries that are not compatible with streaming such as some CSS-in-JS libraries. To disable streaming for all React components in your project, set
experimentalDisableStreaming: trueas a configuration option for@astrojs/react:// astro.config.mjs import { defineConfig } from 'astro/config'; import react from '@​astrojs/react'; export default defineConfig({ integrations: [ react({ + experimentalDisableStreaming: true, }), ], });v4.1.6Compare Source
Patch Changes
#12996
80c6801Thanks @bluwy! - Removes hardcodedssr.external: ['react-dom/server', 'react-dom/client']config that causes issues with adapters that bundle all dependencies (e.g. Cloudflare). These externals should already be inferred by default by Vite when deploying to a server environment.#13011
cf30880Thanks @ascorbic! - Upgrades Vitev4.1.5Compare Source
Patch Changes
ea603aeThanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theincludeorexcludeproperty being set on the integration.v4.1.4Compare Source
Patch Changes
c7642fbThanks @bluwy! - Removes react-specific entrypoints inoptimizeDeps.includeand rely on@vitejs/plugin-reactto addv4.1.3Compare Source
Patch Changes
51ab7b5Thanks @bluwy! - Supports checking for React 19 componentsv4.1.2Compare Source
Patch Changes
739dbfbThanks @ascorbic! - Upgrades Vite to pin esbuildv4.1.1Compare Source
Patch Changes
391df0eThanks @matthewp! - Preoptimize React compiler runtimev4.1.0Compare Source
Minor Changes
97c9265Thanks @bskimball! - Add React 19 stable to peer dependenciesv4.0.0Compare Source
Major Changes
9f44019Thanks @bluwy! - Updates Vite dependency to v6 to match Astro v5Minor Changes
#12539
827093eThanks @bluwy! - Drops node 21 support#12510
14feaf3Thanks @bholmesdev! - Changes the generated URL query param from_astroActionto_actionwhen submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue.v3.6.3Compare Source
Patch Changes
8a46e80Thanks @marbrex! - Resolvevitepeer dependency problem for strict package managers like Yarn in PnP mode.v3.6.2Compare Source
Patch Changes
7adb350Thanks @bluwy! - Prevents throwing errors when checking if a component is a React component in runtimev3.6.1Compare Source
Patch Changes
#11571
1c3265aThanks @bholmesdev! - BREAKING CHANGE to the experimental Actions API only. Install the latest@astrojs/reactintegration 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.v3.6.0Compare Source
Minor Changes
#11234
4385bf7Thanks @ematipico! - Adds a new function calledaddServerRendererto the Container API. Use this function to manually store renderers inside the instance of your container.This new function should be preferred when using the Container API in environments like on-demand pages:
v3.5.0Compare Source
Minor Changes
#11144
803dd80Thanks @ematipico! - The integration now exposes a function calledgetContainerRenderer, that can be used inside the Container APIs to load the relative renderer.v3.4.0Compare Source
Minor Changes
#11071
8ca7c73Thanks @bholmesdev! - Adds two new functionsexperimental_getActionState()andexperimental_withState()to support the React 19useActionState()hook when using Astro Actions. This introduces progressive enhancement when calling an Action with thewithState()utility.This example calls a
likeaction that accepts apostIdand returns the number of likes. Pass this action to theexperimental_withState()function to apply progressive enhancement info, and apply touseActionState()to track the result:You can also access the state stored by
useActionState()from your actionhandler. Callexperimental_getActionState()with the API context, and optionally apply a type to the result:v3.3.4Compare Source
Patch Changes
4d16381Thanks @emish89! - Fixes incorrectpeerDependenciesfor@types/reactand@types/react-domv3.3.3Compare Source
Patch Changes
d47baa4Thanks @matthewp! - Updates package to support React 19 betav3.3.2Compare Source
Patch Changes
fd7a9edThanks @Angrigo! - Removes using deprecatedReactDOMServer.renderToStaticNodeStreamAPIv3.3.1Compare Source
Patch Changes
f6bddd3Thanks @lamATnginx! - Fix Redoc usage in React integrationv3.3.0Compare Source
Minor Changes
#10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1for Node.js 18, older thanv20.0.3for Node.js 20, and the complete Node.js v19 release line.This change is in line with Astro's Node.js support policy.
v3.2.0Compare Source
Minor Changes
14f1d49a10541fecc4c10def8a094322442ccf23Thanks @fightingcat! - Expose Babel config for @astro/react.v3.1.1Compare Source
Patch Changes
195f51f82a44df32be73865949aabee0d46ffe61Thanks @matthewp! - Mark @material-tailwind/react as noExternalv3.1.0Compare Source
Minor Changes
#10136
9cd84bd19b92fb43ae48809f575ee12ebd43ea8fThanks @matthewp! - Changes the default behavior oftransition:persistto update the props of persisted islands upon navigation. Also adds a new view transitions optiontransition:persist-props(default:false) to prevent props from updating as needed.Islands which have the
transition:persistproperty to keep their state when using the<ViewTransitions />router will now have their props updated upon navigation. This is useful in cases where the component relies on page-specific props, such as the current page title, which should update upon navigation.For example, the component below is set to persist across navigation. This component receives a
productsprops and might have some internal state, such as which filters are applied:Upon navigation, this component persists, but the desired
productsmight change, for example if you are visiting a category of products, or you are performing a search.Previously the props would not change on navigation, and your island would have to handle updating them externally, such as with API calls.
With this change the props are now updated, while still preserving state.
You can override this new default behavior on a per-component basis using
transition:persist-props=trueto persist both props and state during navigation:v3.0.10Compare Source
Patch Changes
20ca3154fb37049cbcd51b06d9fa2ef25ac25a36Thanks @StandardGage! - Fixes an issue where passing void elements (img, etc..) did not work with theexperimentalReactChildrenoption enabledv3.0.9Compare Source
Patch Changes
#9482
72b26daf694b213918f02d0fcbf90ab5b7ebc31fThanks @natemoo-re! - Improves compatibility with the Qwik adapter#9479
1baf0b0d3cbd0564954c2366a7278794fad6726eThanks @sarah11918! - Updates READMEv3.0.8Compare Source
Patch Changes
#9403
7eb9fe8a7Thanks @knpwrs! - Prevents unsupportedforwardRefcomponents created by Preact from being rendered by React#9452
e83b5095fThanks @florian-lefebvre! - Upgrades vite to latestv3.0.7Compare Source
Patch Changes
1c48ed286Thanks @bluwy! - Adds Vite 5 support. There are no breaking changes from Astro. Check the Vite migration guide for details of the breaking changes from Vite instead.v3.0.6Compare Source
Patch Changes
af43fb517Thanks @lilnasy! - Fixes an issue where slotting self-closing elements (img, br, hr) into react components withexperimentalReactChildrenenabled led to an error.v3.0.5Compare Source
Patch Changes
ac5633b8fThanks @brandonsdebt! - Usesnode:streamduring server rendering for compatibility with Cloudflarev3.0.4Compare Source
Patch Changes
4dee38711Thanks @matthewp! - Fixes client hydration in islands when using experimentalReactChildrenv3.0.3Compare Source
Patch Changes
6f60da805Thanks @ematipico! - Add provenance statement when publishing the library from CIv3.0.2Compare Source
Patch Changes
85fe213feThanks @natemoo-re! - UpdateexperimentalReactChildrenbehavior to support void tagsv3.0.1Compare Source
Patch Changes
20ca3154fb37049cbcd51b06d9fa2ef25ac25a36Thanks @StandardGage! - Fixes an issue where passing void elements (img, etc..) did not work with theexperimentalReactChildrenoption enabledv3.0.0Compare Source
Major Changes
#8188
d0679a666Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release Candidate#7924
519a1c4e8Thanks @matthewp! - Support for React RefreshThe React integration now fully supports React Refresh and is backed by
@vitejs/plugin-react.Also included in this change are new
includeandexcludeconfig options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React andexcludedoes the opposite.Patch Changes
#8228
4bd2fac8dThanks @bluwy! - Publish missingvnode-children.jsfile#8264
1f58a7a1bThanks @natemoo-re! - Automatically unmount islands whenastro:unmountis firedUpdated dependencies [
d0679a666,2aa6d8ace,6011d52d3]:withastro/astro (astro)
v6.0.2Compare Source
Patch Changes
95e12a2Thanks @Princesseuh! - Fixesreturn;syntax not working in the frontmatter correctly in certain contextsv6.0.1Compare Source
Patch Changes
a4c0d0bThanks @matthewp! - Fixesastro addso the tsconfig preview shows the actual pending changes before confirmationv6.0.0Compare Source
Major Changes
#14446
ece667aThanks @florian-lefebvre! - RemovesentryPointsonastro:build:ssrhook (Integration API) - (v6 upgrade guidance)#15535
dfe2e22Thanks @florian-lefebvre! - DeprecatesloadManifest()andloadApp()fromastro/app/node(Adapter API) - (v6 upgrade guidance)#15006
f361730Thanks @florian-lefebvre! - Removes sessiontestdriver - (v6 upgrade guidance)#15461
9f21b24Thanks @florian-lefebvre! - BREAKING CHANGE to the v6 beta Adapter API only: renamesentryTypetoentrypointResolutionand updates possible valuesAstro 6 introduced a way to let adapters have more control over the entrypoint by passing
entryType: 'self'tosetAdapter(). However during beta development, the name was unclear and confusing.entryTypeis now renamed toentrypointResolutionand its possible values are updated:legacy-dynamicbecomesexplicit.selfbecomesauto.If you are building an adapter with v6 beta and specifying
entryType, update it:setAdapter({ // ... - entryType: 'legacy-dynamic' + entrypointResolution: 'explicit' }) setAdapter({ // ... - entryType: 'self' + entrypointResolution: 'auto' })#14426
861b9ccThanks @florian-lefebvre! - Removes the deprecatedemitESMImage()function - (v6 upgrade guidance)#15006
f361730Thanks @florian-lefebvre! - Deprecates session driver string signature - (v6 upgrade guidance)#15180
8780ff2Thanks @Princesseuh! - Adds support for converting SVGs to raster images (PNGs, WebP, etc) to the default Sharp image service - (v6 upgrade guidance)#14446
ece667aThanks @florian-lefebvre! - Removesroutesonastro:build:donehook (Integration API) - (v6 upgrade guidance)#15424
33d6146Thanks @Princesseuh! - Throws an error whengetImage()fromastro:assetsis called on the client - (v6 upgrade guidance)#14462
9fdfd4cThanks @florian-lefebvre! - Removes the oldapp.render()signature (Adapter API) - (v6 upgrade guidance)#14956
0ff51dfThanks @matthewp! - Astro v6.0 upgrades to Zod v4 for schema validation - (v6 upgrade guidance)#14759
d7889f7Thanks @florian-lefebvre! - Updates how schema types are inferred for content loaders with schemas (Loader API) - (v6 upgrade guidance)#15192
ada2808Thanks @gameroman! - Removes support for CommonJS config files - (v6 upgrade guidance)#14462
9fdfd4cThanks @florian-lefebvre! - Removesprefetch()withoption - (v6 upgrade guidance)#14306
141c4a2Thanks @ematipico! - Removes support for routes with percent-encoded percent signs (e.g.%25) - (v6 upgrade guidance)#14432
b1d87ecThanks @florian-lefebvre! - DeprecatesAstroingetStaticPaths()- (v6 upgrade guidance)#14759
d7889f7Thanks @florian-lefebvre! - Removes the option to define dynamic schemas in content loaders as functions and adds a new equivalentcreateSchema()property (Loader API) - (v6 upgrade guidance)#14457
049da87Thanks @florian-lefebvre! - Updates trailing slash behavior of endpoint URLs - (v6 upgrade guidance)#14494
727b0a2Thanks @florian-lefebvre! - Updates Markdown heading ID generation - (v6 upgrade guidance)#14461
55a1a91Thanks @florian-lefebvre! - Deprecatesimport.meta.env.ASSETS_PREFIX- (v6 upgrade guidance)#14586
669ca5bThanks @ocavue! - Changes the values allowed inparamsreturned bygetStaticPaths()- (v6 upgrade guidance)#15668 [
1118ac4](https://redirect.github.com/withastro/astro/commit/1118ac4f299341e15061e8a4e6e8423071c4d41Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.