Skip to content

Latest commit

 

History

History
607 lines (343 loc) · 56.4 KB

CHANGELOG.md

File metadata and controls

607 lines (343 loc) · 56.4 KB

@astrojs/svelte

6.0.2

Patch Changes

  • #12481 8a46e80 Thanks @marbrex! - Resolve vite peer dependency problem for strict package managers like Yarn in PnP mode.

6.0.1

Patch Changes

6.0.0

Major Changes

  • #12364 9fc2ab8 Thanks @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 in svelte.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-svelte changelog for details of their respective breaking changes.

5.7.3

Patch Changes

  • #12390 6fd3d59 Thanks @bluwy! - Adds support for Svelte 5's new @render syntax while maintaining backward compatibility with traditional slots.

5.7.2

Patch Changes

5.7.1

Patch Changes

5.7.0

Minor Changes

  • #11490 6ad02b5 Thanks @bluwy! - Bumps Svelte 5 peer dependency to ^5.0.0-next.190 and support the latest slots/snippets API

5.6.0

Minor Changes

  • #11234 4385bf7 Thanks @ematipico! - Adds a new function called addServerRenderer to 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 803dd80 Thanks @ematipico! - The integration now exposes a function called getContainerRenderer, 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

5.3.0

Minor Changes

5.2.0

Minor Changes

5.1.0

Minor Changes

5.0.3

Patch Changes

5.0.2

Patch Changes

5.0.1

Patch Changes

5.0.0

Major Changes

  • #9122 1c48ed286 Thanks @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 1c48ed286 Thanks @bluwy! - Drops support for Svelte 3 as @sveltejs/vite-plugin-svelte is updated to 3.0.0 which does not support Svelte 3

5.0.0-beta.0

Major Changes

  • #9122 1c48ed286 Thanks @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 1c48ed286 Thanks @bluwy! - Drops support for Svelte 3 as @sveltejs/vite-plugin-svelte is updated to 3.0.0 which does not support Svelte 3

Patch Changes

4.0.4

Patch Changes

4.0.3

Patch Changes

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Major Changes

  • #8188 d0679a666 Thanks @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 6011d52d3 Thanks @matthewp! - Astro 3.0 Release Candidate

Patch Changes

4.0.0-rc.3

Patch Changes

4.0.0-rc.2

Major Changes

Patch Changes

4.0.0-beta.1

Patch Changes

4.0.0-beta.0

Major Changes

  • 1eae2e3f7 Thanks @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

3.1.1

Patch Changes

3.1.0

Minor Changes

Patch Changes

3.0.0

Major Changes

Patch Changes

2.2.0

Minor Changes

  • #7093 3d525efc9 Thanks @matthewp! - Prevent removal of nested slots within islands

    This 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

2.1.1

Patch Changes

2.1.0

Minor Changes

Patch Changes

2.0.2

Patch Changes

2.0.1

Patch Changes

2.0.0

Major Changes

  • #5901 a342a486c Thanks @bluwy! - The fallback Svelte preprocessor will only be applied if a custom preprocess option is not passed to the svelte() integration option, or in the svelte.config.js file.

    To support IDE autocompletion, or if you're migrating from @astrojs/svelte v1, you can create a svelte.config.js file with:

    import { vitePreprocess } from '@astrojs/svelte';
    
    export default {
      preprocess: vitePreprocess(),
    };

    This file will also be generated by astro add svelte by default.

  • #5782 1f92d64ea Thanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0

  • #5685 f6cf92b48 Thanks @bluwy! - Upgrade to Vite 4. Please see its migration guide for more information.

  • #5685 f6cf92b48 Thanks @bluwy! - Simplify Svelte preprocess setup. <style lang="postcss"> is now required if using PostCSS inside style tags.

  • #5806 7572f7402 Thanks @matthewp! - Make astro a peerDependency of integrations

    This marks astro as a peerDependency of several packages that are already getting major version 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.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 a342a486c Thanks @bluwy! - The fallback Svelte preprocessor will only be applied if a custom preprocess option is not passed to the svelte() integration option, or in the svelte.config.js file.

    To support IDE autocompletion, or if you're migrating from @astrojs/svelte v1, you can create a svelte.config.js file with:

    import { vitePreprocess } from '@astrojs/svelte';
    
    export default {
      preprocess: vitePreprocess(),
    };

    This file will also be generated by astro add svelte by default.

Patch Changes

2.0.0-beta.1

See changes in 2.0.0-beta.1

Major Changes

  • #5782 1f92d64ea Thanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0

  • #5806 7572f7402 Thanks @matthewp! - Make astro a peerDependency of integrations

    This marks astro as a peerDependency of several packages that are already getting major version 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 812658ad2 Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm)

1.0.0

Major Changes

0.5.1

Patch Changes

0.5.0

Minor Changes

Patch Changes

0.4.1

Patch Changes

0.4.0

Minor Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

0.2.1

Patch Changes

  • #3864 f9ed77bb Thanks @Princesseuh! - Add entrypoints for editor support for Vue and Svelte (destined to be used by our language server)

0.2.0

Minor Changes

  • #3652 7373d61c Thanks @natemoo-re! - Adds support for passing named slots from .astro => framework components.

    Inside your components, use the built-in slot API as you normally would.

0.1.5

Patch Changes

0.1.4

Patch Changes

  • #3455 e9a77d86 Thanks @natemoo-re! - Update client hydration to check for ssr attribute. Requires astro@^1.0.0-beta.36.

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

0.0.2

Patch Changes

  • #2847 3b621f7a Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site

0.0.2-next.0

Patch Changes

  • #2847 3b621f7a Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site