Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
69 KiB
@astrojs/svelte
7.2.2
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.
7.2.1
Patch Changes
- #14621
e3175d9Thanks @GameRoMan! - Updatesviteversion to fix CVE
7.2.0
Minor Changes
-
#14430
78011baThanks @ascorbic! - Adds support for async server renderingSvelte 5.36 added experimental support for async rendering. This allows you to use
awaitin your components in several new places. This worked out of the box with client-rendered components, but server-rendered components needed some extra help. This update adds support for async server rendering in Svelte components used in Astro.To use async rendering, you must enable it in your Svelte config:
// svelte.config.js export default { compilerOptions: { experimental: { async: true, }, }, };Then you can use
awaitin your components:<script> let data = await fetch('/api/data').then(res => res.json()); </script> <h1>{data.title}</h1>See the Svelte docs for more information on using
awaitin Svelte components, including inside$derivedblocks and directly in markup.
Patch Changes
- #14433
9cc8f21Thanks @ascorbic! - Fixes a bug that prevented Svelte 5.39.1+ components rendering when multiple frameworks were present
7.1.1
Patch Changes
- #14326
c24a8f4Thanks @jsparkdev! - Updatesviteversion to fix CVE
7.1.0
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.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
7.0.13
Patch Changes
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
7.0.12
Patch Changes
- #13720
e1cd1aeThanks @florian-lefebvre! - Fixes SSR renderer type
7.0.11
Patch Changes
- #13663
a19a185Thanks @florian-lefebvre! - Improves type-safety of renderers
7.0.10
Patch Changes
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
7.0.9
Patch Changes
- #13526
ff9d69eThanks @jsparkdev! - updateviteto the latest version
7.0.8
Patch Changes
- #13505
a98ae5bThanks @ematipico! - Updates the dependencyviteto the latest.
7.0.7
Patch Changes
7.0.6
Patch Changes
- #13339
a05e6abThanks @Hugos68! - Fixes a case where$props.id()would not be unique across multiple islands
7.0.5
Patch Changes
- #13323
80926faThanks @ematipico! - Updatesesbuildandviteto the latest to avoid false positives audits warnings caused byesbuild.
7.0.4
Patch Changes
7.0.3
Patch Changes
- #12776
8809b85Thanks @aminevg! - Fixes an issue where TypeScript couldn't infer the correct types of theserver.mjsfile
7.0.2
Patch Changes
7.0.1
Patch Changes
- #12594
4f2fd0aThanks @Princesseuh! - Fixes compatibility with Astro 5
7.0.0
Major Changes
-
#12060
cb5d3aeThanks @Princesseuh! - Updates peer dependency range to support Astro 5 -
#12524
9f44019Thanks @bluwy! - Updates@sveltejs/vite-plugin-svelteto v5 to handle Vite 6 -
#12524
9f44019Thanks @bluwy! - Updates Vite dependency to v6 to match Astro v5
Minor Changes
Patch Changes
-
#12102
dcc1e89Thanks @hermit99! - Fixes an Reference Error that occurred during client transitions -
#12551
b21a075Thanks @ematipico! - New release to include changes from 5.7.3
7.0.0-beta.1
Major Changes
-
#12524
9f44019Thanks @bluwy! - Updates@sveltejs/vite-plugin-svelteto v5 to handle Vite 6 -
#12524
9f44019Thanks @bluwy! - Updates Vite dependency to v6 to match Astro v5
Minor Changes
6.0.2
Patch Changes
-
#12481
8a46e80Thanks @marbrex! - Resolvevitepeer dependency problem for strict package managers like Yarn in PnP mode. -
Updated dependencies [
c48916c,4364bff,c8f877c,8309c61,af867f3,3f02d5f]:- astro@5.0.0-beta.9
6.0.1
Patch Changes
6.0.0
Major Changes
-
#12364
9fc2ab8Thanks @jdtjenkins! - Adds support for Svelte 5. Svelte 3 and 4 are no longer supported.The integration will now also no longer add
vitePreprocess()by default if a preprocessor is not set up insvelte.config.js. It is recommended to set up the Svelte config manually so that features like IDE completion and syntax highlighting work properly.If you're using SCSS, Stylus, etc in your Svelte component style tags, make sure that the preprocessor is also set up in
svelte.config.js. For example:// svelte.config.js import { vitePreprocess } from '@astrojs/svelte'; export default { preprocess: vitePreprocess(), };Refer to the Svelte 5 migration guide and
@sveltejs/vite-plugin-sveltechangelog for details of their respective breaking changes.
6.0.0-beta.2
Patch Changes
6.0.0-beta.1
Patch Changes
6.0.0-beta.0
Major Changes
- #12060
cb5d3aeThanks @Princesseuh! - Updates peer dependency range to support Astro 5
6.0.0-alpha.0
Patch Changes
5.7.3
Patch Changes
- #12390
6fd3d59Thanks @bluwy! - Adds support for Svelte 5's new@rendersyntax while maintaining backward compatibility with traditional slots.
5.7.2
Patch Changes
5.7.1
Patch Changes
- #12006
a582cb6Thanks @johannesspohr! - Fix Svelte component view transition state persistence
5.7.0
Minor Changes
- #11490
6ad02b5Thanks @bluwy! - Bumps Svelte 5 peer dependency to^5.0.0-next.190and support the latest slots/snippets API
5.6.0
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:
import type { APIRoute } from 'astro'; import { experimental_AstroContainer } from 'astro/container'; import reactRenderer from '@astrojs/react/server.js'; import vueRenderer from '@astrojs/vue/server.js'; import ReactComponent from '../components/button.jsx'; import VueComponent from '../components/button.vue'; // MDX runtime is contained inside the Astro core import mdxRenderer from 'astro/jsx/server.js'; // In case you need to import a custom renderer import customRenderer from '../renderers/customRenderer.js'; export const GET: APIRoute = async (ctx) => { const container = await experimental_AstroContainer.create(); container.addServerRenderer({ renderer: reactRenderer }); container.addServerRenderer({ renderer: vueRenderer }); container.addServerRenderer({ renderer: customRenderer }); // You can pass a custom name too container.addServerRenderer({ name: 'customRenderer', renderer: customRenderer, }); const vueComponent = await container.renderToString(VueComponent); return await container.renderToResponse(Component); };
5.5.0
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.import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import ReactWrapper from '../src/components/ReactWrapper.astro'; import { loadRenderers } from 'astro:container'; import { getContainerRenderer } from '@astrojs/react'; test('ReactWrapper with react renderer', async () => { const renderers = await loadRenderers([getContainerRenderer()]); const container = await AstroContainer.create({ renderers, }); const result = await container.renderToString(ReactWrapper); expect(result).toContain('Counter'); expect(result).toContain('Count: <!-- -->5'); });
5.4.0
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.
5.3.0
Minor Changes
- #10645
51112ab3f1b134740e8307743bbb15cb0d8bdbb3Thanks @mingjunlu! - Bumps Svelte 5 peer dependency to^5.0.0-next.90and support its latest breaking changes
5.2.0
Minor Changes
- #10244
dbb0d0bd2833bf02d0aa70f87973c62ca1d58c1bThanks @Princesseuh! - Adds TypeScript as a required peer dependency as it is required for Svelte's editor tooling to work correctly.
5.1.0
Minor Changes
- #10224
84502b41907316431c911f6f2ab9d432c7327065Thanks @mwc! - Bumps Svelte 5 peer dependency to^5.0.0-next.56and support its latest breaking changes
5.0.3
Patch Changes
-
#9510
cf993bc263b58502096f00d383266cd179f331afThanks @nikhilk! - Filter out Svelte's unknown data prop warnings -
#9530
337ca508bdd4fb88db5db7b9b1aee77624a346f7Thanks @bluwy! - Forwards errors if a Svelte component fails to instantiate in the client -
#9479
1baf0b0d3cbd0564954c2366a7278794fad6726eThanks @sarah11918! - Updates README
5.0.2
Patch Changes
- #9452
e83b5095fThanks @florian-lefebvre! - Upgrades vite to latest
5.0.1
Patch Changes
-
#9285
1aa7fe85cThanks @bluwy! - When using Svelte 5, slots can now be rendered as snippets -
#9366
1b4e91898Thanks @lilnasy! - Updates NPM package to refer to the stable Astro version instead of a beta.
5.0.0
Major Changes
-
#9122
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. -
#9122
1c48ed286Thanks @bluwy! - Drops support for Svelte 3 as@sveltejs/vite-plugin-svelteis updated to3.0.0which does not support Svelte 3
5.0.0-beta.0
Major Changes
-
#9122
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. -
#9122
1c48ed286Thanks @bluwy! - Drops support for Svelte 3 as@sveltejs/vite-plugin-svelteis updated to3.0.0which does not support Svelte 3
Patch Changes
- Updated dependencies [
abf601233,6201bbe96,cdabf6ef0,1c48ed286,37697a2c5,bd0c2e9ae,0fe3a7ed5,710be505c,153a5abb9]:- astro@4.0.0-beta.0
4.0.4
Patch Changes
4.0.3
Patch Changes
-
#8737
6f60da805Thanks @ematipico! - Add provenance statement when publishing the library from CI -
Updated dependencies [
6f60da805,d78806dfe,d1c75fe15,aa265d730,78adbc443,21e0757ea,357270f2a]:- astro@3.2.3
4.0.2
Patch Changes
-
#8448
3f49aa97aThanks @natemoo-re! - Fix potential memory leak when component is unmounted -
Updated dependencies [
f66053a1e,0fa483283]:- astro@3.0.11
4.0.1
Patch Changes
-
Updated dependencies [
7d95bd9ba,1947ef7a9,61ad70fdc,d2f2a11cd,5126c6a40,48ff7855b,923a443cb,8935b3b46]:- astro@3.0.9
4.0.0
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
Patch Changes
-
#8264
1f58a7a1bThanks @natemoo-re! - Automatically unmount islands whenastro:unmountis fired -
Updated dependencies [
d0679a666,db39206cb,adf9fccfd,0c7b42dc6,46c4c0e05,364d861bd,2484dc408,81545197a,6011d52d3,c2c71d90c,cd2d7e769,80f1494cd,e45f30293,c0de7a7b0,65c354969,3c3100851,34cb20021,a824863ab,44f7a2872,1048aca55,be6bbd2c8,9e021a91c,7511a4980,c37632a20,acf652fc1,42785c7b7,8450379db,dbc97b121,7d2f311d4,2540feedb,ea7ff5177,68efd4a8b,7bd1b86f8,036388f66,519a1c4e8,1f58a7a1b,2ae9d37f0,a8f35777e,70f34f5a3,5208a3c8f,84af8ed9d,f003e7364,ffc9e2d3d,732111cdc,0f637c71e,33b8910cf,8a5b0c1f3,148e61d24,e79e3779d,632579dc2,3674584e0,1db4e92c1,e7f872e91,16f09dfff,4477bb41c,55c10d1d5,3e834293d,96beb883a,997a0db8a,80f1494cd,0f0625504,e1ae56e72,f32d093a2,f01eb585e,b76c166bd,a87cbe400,866ed4098,767eb6866,32669cd47]:- astro@3.0.0
4.0.0-rc.3
Patch Changes
-
#8264
1f58a7a1bThanks @natemoo-re! - Automatically unmount islands whenastro:unmountis fired -
Updated dependencies [
0c7b42dc6,9e021a91c,1f58a7a1b,1db4e92c1]:- astro@3.0.0-rc.9
4.0.0-rc.2
Major Changes
Patch Changes
- Updated dependencies [
adf9fccfd,582132328,81545197a,6011d52d3,be6bbd2c8,42785c7b7,95120efbe,2ae9d37f0,f003e7364,732111cdc,33b8910cf,e79e3779d,179796405,a87cbe400,767eb6866]:- astro@3.0.0-rc.5
4.0.0-beta.1
Patch Changes
-
#7291
0bf2cca5dThanks @kitschpatrol! - Filter unknownclassprop warnings -
Updated dependencies [
2484dc408,c2c71d90c,7177f7579,097a8e4e9,dbc97b121,2540feedb,ea7ff5177,68efd4a8b,0e0fa605d,5208a3c8f,8a5b0c1f3,d6b494376,4477bb41c,3e834293d,b76c166bd]:- astro@3.0.0-beta.3
4.0.0-beta.0
Major Changes
1eae2e3f7Thanks @Princesseuh! - 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.
Patch Changes
- Updated dependencies [
1eae2e3f7,76ddef19c,9b4f70a62,3fdf509b2,2f951cd40,c022a4217,67becaa58,bc37331d8,dfc2d93e3,3dc1ca2fa,1be84dfee,35f01df79,3fdf509b2,78de801f2,59d6e569f,7723c4cc9,fb5cd6b56,631b9c410]:- astro@3.0.0-beta.0
3.1.1
Patch Changes
-
#7291
0bf2cca5dThanks @kitschpatrol! - Filter unknownclassprop warnings -
Updated dependencies [
b12c8471f,7177f7579,fa6b68a77,097a8e4e9,1f6497c33,0e0fa605d,b290f0a99,d6b494376,da6e3da1c]:
3.1.0
Minor Changes
- #7454
6e7f38dd7Thanks @ghostdevv! - feat: support svelte 4
Patch Changes
- Updated dependencies [
601403744,869197aaf,2b7539952,478cd9d8f,57e603038,f359d77b1]:- astro@2.7.1
3.0.0
Major Changes
Patch Changes
2.2.0
Minor Changes
-
#7093
3d525efc9Thanks @matthewp! - Prevent removal of nested slots within islandsThis change introduces a new flag that renderers can add called
supportsAstroStaticSlot. What this does is let Astro know that the render is sending<astro-static-slot>as placeholder values for static (non-hydrated) slots which Astro will then remove.This change is completely backwards compatible, but fixes bugs caused by combining ssr-only and client-side framework components like so:
<Component> <div> <Component client:load> <span>Nested</span> </Component> </div> </Component>
Patch Changes
-
#7104
826e02890Thanks @bluwy! - Specify"files"field to only publish necessary files -
Updated dependencies [
4516d7b22,e186ecc5e,c6d7ebefd,914c439bc,e9fc2c221,075eee08f,719002ca5,fc52681ba,fb84622af,cada10a46,cd410c5eb,73ec6f6c1,410428672,763ff2d1e,c1669c001,3d525efc9]:- astro@2.5.0
2.1.1
Patch Changes
2.1.0
Minor Changes
- #6213
afbbc4d5bThanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
Patch Changes
- Updated dependencies [
fec583909,b087b83fe,694918a56,a20610609,a4a74ab70,75921b3cd,afbbc4d5b]:- astro@2.1.0
2.0.2
Patch Changes
2.0.1
Patch Changes
-
#5478
1c7eef308Thanks @nemo0! - Update READMEs for consistency -
Updated dependencies [
b4432cd6b,98a4a914b,071e1dee7,322e059d0,b994f6f35,12c68343c]:- astro@2.0.3
2.0.0
Major Changes
-
#5901
a342a486cThanks @bluwy! - The fallback Svelte preprocessor will only be applied if a custompreprocessoption is not passed to thesvelte()integration option, or in thesvelte.config.jsfile.To support IDE autocompletion, or if you're migrating from
@astrojs/sveltev1, you can create asvelte.config.jsfile with:import { vitePreprocess } from '@astrojs/svelte'; export default { preprocess: vitePreprocess(), };This file will also be generated by
astro add svelteby default. -
#5782
1f92d64eaThanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0 -
#5685
f6cf92b48Thanks @bluwy! - Upgrade to Vite 4. Please see its migration guide for more information. -
#5685
f6cf92b48Thanks @bluwy! - Simplify Svelte preprocess setup.<style lang="postcss">is now required if using PostCSS inside style tags. -
#5806
7572f7402Thanks @matthewp! - Make astro apeerDependencyof integrationsThis marks
astroas apeerDependencyof several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
Patch Changes
-
Updated dependencies [
93e633922,16dc36a87,01f3f463b,e2019be6f,05caf445d,49ab4f231,a342a486c,8fb28648f,1f92d64ea,c2180746b,ae8a012a7,cf2de5422,ce5c5dbd4,ec09bb664,665a2c222,259a539d7,f7aa1ec25,4987d6f44,304823811,302e0ef8f,55cea0a9d,dd56c1941,9963c6e4d,be901dc98,f6cf92b48,e818cc046,8c100a6fe,116d8835c,840412128,1f49cddf9,7325df412,16c7d0bfd,a9c292026,2a5786419,4a1cabfe6,a8d3e7924,fa8c131f8,64b8082e7,c4b0cb8bf,23dc9ea96,63a6ceb38,a3a7fc929,52209ca2a,5fd9208d4,5eba34fcc,899214298,3a00ecb3e,5eba34fcc,2303f9514,1ca81c16b,b66d7195c]:- astro@2.0.0
2.0.0-beta.3
See changes in 2.0.0-beta.3
Patch Changes
2.0.0-beta.2
See changes in 2.0.0-beta.2
Major Changes
-
#5901
a342a486cThanks @bluwy! - The fallback Svelte preprocessor will only be applied if a custompreprocessoption is not passed to thesvelte()integration option, or in thesvelte.config.jsfile.To support IDE autocompletion, or if you're migrating from
@astrojs/sveltev1, you can create asvelte.config.jsfile with:import { vitePreprocess } from '@astrojs/svelte'; export default { preprocess: vitePreprocess(), };This file will also be generated by
astro add svelteby default.
Patch Changes
2.0.0-beta.1
See changes in 2.0.0-beta.1
Major Changes
-
#5782
1f92d64eaThanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0 -
#5806
7572f7402Thanks @matthewp! - Make astro apeerDependencyof integrationsThis marks
astroas apeerDependencyof several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
Patch Changes
2.0.0-beta.0
See changes in 2.0.0-beta.0
Major Changes
1.0.2
Patch Changes
1.0.1
Patch Changes
- #4842
812658ad2Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm)
1.0.0
Major Changes
-
04ad44563- > Astro v1.0 is out! Read the official announcement post.No breaking changes. This package is now officially stable and compatible with
astro@1.0.0!
0.5.1
Patch Changes
0.5.0
Minor Changes
Patch Changes
- #3993
40a45e3efThanks @Princesseuh! - Fix optional props not being recognized properly in the editor
0.4.1
Patch Changes
0.4.0
Minor Changes
- #3914
b48767985Thanks @ran-dall! - Rollback supportednode@16version. Minimum versions are nownode@14.20.0ornode@16.14.0.
0.3.1
Patch Changes
0.3.0
Minor Changes
- #3871
1cc5b7890Thanks @natemoo-re! - Update supportednodeversions. Minimum versions are nownode@14.20.0ornode@16.16.0.
0.2.1
Patch Changes
- #3854
b012ee55Thanks @bholmesdev! - [astro add] Support adapters and third party packages
- #3864
f9ed77bbThanks @Princesseuh! - Add entrypoints for editor support for Vue and Svelte (destined to be used by our language server)
0.2.0
Minor Changes
-
#3652
7373d61cThanks @natemoo-re! - Adds support for passing named slots from.astro=> framework components.Inside your components, use the built-in
slotAPI as you normally would.
0.1.5
Patch Changes
- #3685
3d554fdbThanks @bholmesdev! - Fix PostCSS config not applied to Svelte component by default
0.1.4
Patch Changes
- #3455
e9a77d86Thanks @natemoo-re! - Update client hydration to check forssrattribute. Requiresastro@^1.0.0-beta.36.
0.1.3
Patch Changes
- #3333
ce6d7982Thanks @FredKSchott! - Fix a vite peer dependency bug
0.1.2
Patch Changes
- #3181
ce9a61e9Thanks @tony-sull! -@astrojs/svelteintegration supports custom svelte compiler options
0.1.1
Patch Changes
815d62f1Thanks @FredKSchott! - no changes.
0.1.0
Minor Changes
- #2979
9d7a4b59Thanks @FredKSchott! - Welcome to the Astro v1.0.0 Beta! Read the official announcement for more details.
0.0.2
Patch Changes
- #2885
6b004363Thanks @bholmesdev! - Add README across Astro built-in integrations
- #2847
3b621f7aThanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site
0.0.2-next.0
Patch Changes
- #2847
3b621f7aThanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site