Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @astrojs/solid-js to v4 #364

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 26, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@astrojs/solid-js (source) ^3.0.2 -> ^4.4.1 age adoption passing confidence

Release Notes

withastro/astro (@​astrojs/solid-js)

v4.4.1

Compare Source

Patch Changes
  • #​11624 7adb350 Thanks @​bluwy! - Prevents throwing errors when checking if a component is a Solid component in runtime

v4.4.0

Compare Source

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);
    };

v4.3.0

Compare Source

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');
    });

v4.2.0

Compare Source

Minor Changes

v4.1.0

Compare Source

Minor Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
  • #​6791 37021044dd4382a9b214f89b7c221bf1c93f3e7d Thanks @​patdx! - Render SolidJS components using renderToStringAsync.

    This changes the renderer of SolidJS components from renderToString to renderToStringAsync. It also injects the actual SolidJS hydration script generated by generateHydrationScript, so that Suspense, ErrorBoundary and similar components can be hydrated correctly.

    The server render phase will now wait for Suspense boundaries to resolve instead of always rendering the Suspense fallback.

    If you use the APIs createResource or lazy, their functionalities will now be executed on the server side, not just the client side.

    This increases the flexibility of the SolidJS integration. Server-side components can now safely fetch remote data, call async Astro server functions like getImage() or load other components dynamically. Even server-only components that do not hydrate in the browser will benefit.

    It is very unlikely that a server-only component would have used the Suspense feature until now, so this should not be a breaking change for server-only components.

    This could be a breaking change for components that meet the following conditions:

    • The component uses Suspense APIs like Suspense, lazy or createResource, and
    • The component is mounted using a hydrating directive:
      • client:load
      • client:idle
      • client:visible
      • client:media

    These components will now first try to resolve the Suspense boundaries on the server side instead of the client side.

    If you do not want Suspense boundaries to be resolved on the server (for example, if you are using createResource to do an HTTP fetch that relies on a browser-side cookie), you may consider:

    • changing the template directive to client:only to skip server side rendering completely
    • use APIs like isServer or onMount() to detect server mode and render a server fallback without using Suspense.

v3.0.3

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), 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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

changeset-bot bot commented Aug 26, 2024

⚠️ No Changeset found

Latest commit: 000521a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@bluwy bluwy merged commit fc3a194 into main Aug 26, 2024
8 checks passed
@renovate renovate bot deleted the renovate/major-astro-monorepo branch August 26, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant