astro

The web framework for content-driven websites. ⭐️ Star to support our work!

OTHER License

Downloads
8.9M
Stars
43K
Committers
807
astro - @astrojs/[email protected]

Published by astrobot-houston 9 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 9 months ago

Patch Changes

astro - [email protected]

Published by astrobot-houston 9 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 9 months ago

Patch Changes

astro - [email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - [email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - [email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - [email protected]

Published by astrobot-houston 10 months ago

Minor Changes

  • #9513 e44f6acf99195a3f29b8390fd9b2c06410551b74 Thanks @wtto00! - Adds a 'load' prefetch strategy to prefetch links on page load

  • #9377 fe719e27a84c09e46b515252690678c174a25759 Thanks @bluwy! - Adds "Missing ARIA roles check" and "Unsupported ARIA roles check" audit rules for the dev toolbar

  • #9573 2a8b9c56b9c6918531c57ec38b89474571331aee Thanks @bluwy! - Allows passing a string to --open and server.open to open a specific URL on startup in development

  • #9544 b8a6fa8917ff7babd35dafb3d3dcd9a58cee836d Thanks @bluwy! - Adds a helpful error for static sites when you use the astro preview command if you have not previously run astro build.

  • #9546 08402ad5846c73b6887e74ed4575fd71a3e3c73d Thanks @bluwy! - Adds an option for the Sharp image service to allow large images to be processed. Set limitInputPixels: false to bypass the default image size limit:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      image: {
        service: {
          entrypoint: 'astro/assets/services/sharp',
          config: {
            limitInputPixels: false,
          },
        },
      },
    });
    
  • #9596 fbc26976533bbcf2de9d6dba1aa3ea3dc6ce0853 Thanks @Princesseuh! - Adds the ability to set a rootMargin setting when using the client:visible directive. This allows a component to be hydrated when it is near the viewport, rather than hydrated when it has entered the viewport.

    <!-- Load component when it's within 200px away from entering the viewport -->
    <Component client:visible={{ rootMargin: '200px' }} />
    
  • #9063 f33fe3190b482a42ebc68cc5275fd7f2c49102e6 Thanks @alex-sherwin! - Cookie encoding / decoding can now be customized

    Adds new encode and decode functions to allow customizing how cookies are encoded and decoded. For example, you can bypass the default encoding via encodeURIComponent when adding a URL as part of a cookie:

    ---
    import { encodeCookieValue } from './cookies';
    Astro.cookies.set('url', Astro.url.toString(), {
      // Override the default encoding so that URI components are not encoded
      encode: (value) => encodeCookieValue(value),
    });
    ---
    

    Later, you can decode the URL in the same way:

    ---
    import { decodeCookieValue } from './cookies';
    const url = Astro.cookies.get('url', {
      decode: (value) => decodeCookieValue(value),
    });
    ---
    

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

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.
astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Minor Changes

  • #9524 0903ef90494e9c8bd0272347a0cdd51eca7f4648 Thanks @aleksandrjet! - Allows rendering lazy components.

    You can now use lazy components with Suspense:

    import { lazy, Suspense } from 'preact/compat';
    
    const HeavyComponent = lazy(() => import('./HeavyComponent'));
    
    const Component = () => {
      return (
        <Suspense fallback={<p>Loading...</p>}>
          <HeavyComponent foo="bar" />
        </Suspense>
      );
    };
    
astro - [email protected]

Published by astrobot-houston 10 months ago

Minor Changes

astro - [email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

astro - @astrojs/[email protected]

Published by astrobot-houston 10 months ago

Patch Changes

Package Rankings
Top 0.43% on Npmjs.org
Top 8.17% on Proxy.golang.org
Badges
Extracted from project README
CI License npm version astro version create-astro version @astrojs/react version @astrojs/preact version @astrojs/solid version @astrojs/svelte version @astrojs/vue version @astrojs/lit version @astrojs/node version @astrojs/vercel version @astrojs/cloudflare version @astrojs/partytown version @astrojs/sitemap version @astrojs/tailwind version @astrojs/alpinejs version @astrojs/mdx version @astrojs/db version @astrojs/rss version @astrojs/netlify version CII Best Practices Astro's sponsors.