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

[ci] release #11481

Merged
merged 1 commit into from
Jul 18, 2024
Merged

[ci] release #11481

merged 1 commit into from
Jul 18, 2024

Conversation

astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Jul 17, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #11341 49b5145 Thanks @madcampos! - Adds support for Shiki's defaultColor option.

    This option allows you to override the values of a theme's inline style, adding only CSS variables to give you more flexibility in applying multiple color themes.

    Configure defaultColor: false in your Shiki config to apply throughout your site, or pass to Astro's built-in <Code> component to style an individual code block.

    import { defineConfig } from 'astro/config';
    export default defineConfig({
      markdown: {
        shikiConfig: {
          themes: {
            light: 'github-light',
            dark: 'github-dark',
          },
          defaultColor: false,
        },
      },
    });
    ---
    import { Code } from 'astro:components';
    ---
    
    <Code code={`const useMyColors = true`} lang="js" defaultColor={false} />
  • #11304 2e70741 Thanks @Fryuni! - Refactors the type for integration hooks so that integration authors writing custom integration hooks can now allow runtime interactions between their integration and other integrations.

    This internal change should not break existing code for integration authors.

    To declare your own hooks for your integration, extend the Astro.IntegrationHooks interface:

    // your-integration/types.ts
    declare global {
      namespace Astro {
        interface IntegrationHooks {
          'myLib:eventHappened': (your: string, parameters: number) => Promise<void>;
        }
      }
    }

    Call your hooks on all other integrations installed in a project at the appropriate time. For example, you can call your hook on initialization before either the Vite or Astro config have resolved:

    // your-integration/index.ts
    import './types.ts';
    
    export default (): AstroIntegration => {
      return {
        name: 'your-integration',
        hooks: {
          'astro:config:setup': async ({ config }) => {
            for (const integration of config.integrations) {
              await integration.hooks['myLib:eventHappened'].?('your values', 123);
            }
          },
        }
      }
    }

    Other integrations can also now declare your hooks:

    // other-integration/index.ts
    import 'your-integration/types.ts';
    
    export default (): AstroIntegration => {
      return {
        name: 'other-integration',
        hooks: {
          'myLib:eventHappened': async (your, values) => {
            // ...
          },
        },
      };
    };
  • #11305 d495df5 Thanks @matthewp! - Experimental Server Islands

    Server Islands allow you to specify components that should run on the server, allowing the rest of the page to be more aggressively cached, or even generated statically. Turn any .astro component into a server island by adding the server:defer directive and optionally, fallback placeholder content:

    ---
    import Avatar from '../components/Avatar.astro';
    import GenericUser from '../components/GenericUser.astro';
    ---
    
    <header>
      <h1>Page Title</h1>
      <div class="header-right">
        <Avatar server:defer>
          <GenericUser slot="fallback" />
        </Avatar>
      </div>
    </header>

    The server:defer directive can be used on any Astro component in a project using hybrid or server mode with an adapter. There are no special APIs needed inside of the island.

    Enable server islands by adding the experimental flag to your Astro config with an appropriate output mode and adatper:

    import { defineConfig } from 'astro/config';
    import netlify from '@astrojs/netlify';
    
    export default defineConfig({
      output: 'hybrid',
      adapter: netlify(),
      experimental {
        serverIslands: true,
      },
    });

    For more information, see the server islands documentation.

  • #11482 7c9ed71 Thanks @Princesseuh! - Adds a --noSync parameter to the astro check command to skip the type-gen step. This can be useful when running astro check inside packages that have Astro components, but are not Astro projects

  • #11098 36e30a3 Thanks @itsmatteomanf! - Adds a new inferRemoteSize() function that can be used to infer the dimensions of a remote image.

    Previously, the ability to infer these values was only available by adding the [inferSize] attribute to the <Image> and <Picture> components or getImage(). Now, you can also access this data outside of these components.

    This is useful for when you need to know the dimensions of an image for styling purposes or to calculate different densities for responsive images.

    ---
    import { inferRemoteSize, Image } from 'astro:assets';
    
    const imageUrl = 'https://...';
    const { width, height } = await inferRemoteSize(imageUrl);
    ---
    
    <Image src={imageUrl} width={width / 2} height={height} densities={[1.5, 2]} />
  • #11391 6f9b527 Thanks @ARipeAppleByYoursTruly! - Adds Shiki's defaultColor option to the <Code /> component, giving you more control in applying multiple themes

  • #11176 a751458 Thanks @tsawada! - Adds two new values to the pagination page prop: page.first and page.last for accessing the URLs of the first and last pages.

Patch Changes

  • #11477 7e9c4a1 Thanks @ematipico! - Fixes an issue where the development server was emitting a 404 status code when the user uses a rewrite that emits a 200 status code.

  • #11479 ca969d5 Thanks @florian-lefebvre! - Fixes a case where invalid astro:env variables at runtime would not throw correctly

  • #11489 061f1f4 Thanks @ematipico! - Move root inside the manifest and make serialisable

  • #11415 e9334d0 Thanks @florian-lefebvre! - Refactors how sync works and when it's called. Fixes an issue with astro:env types in dev not being generated

  • #11478 3161b67 Thanks @bluwy! - Supports importing Astro components with Vite queries, like ?url, ?raw, and ?direct

  • #11491 fe3afeb Thanks @matthewp! - Fix for Server Islands in Vercel adapter

    Vercel, and probably other adapters only allow pre-defined routes. This makes it so that the astro:build:done hook includes the _server-islands/ route as part of the route data, which is used to configure available routes.

  • #11483 34f9c25 Thanks @Princesseuh! - Fixes Astro not working on low versions of Node 18 and 20

  • Updated dependencies [49b5145]:

@astrojs/[email protected]

Minor Changes

  • #11304 2e70741 Thanks @Fryuni! - Removes the AstroDbIntegration type

    Astro integration hooks can now be extended and as such @astrojs/db no longer needs to declare it's own integration type. Using AstroIntegration will have the same type.

    If you were using the AstroDbIntegration type, apply this change to your integration code:

    - import { defineDbIntegration, type AstroDbIntegration } from '@astrojs/db/utils';
    + import { defineDbIntegration } from '@astrojs/db/utils';
    import type { AstroIntegration } from 'astro';
    
    - export default (): AstroDbIntegration => {
    + export default (): AstroIntegration => {
      return defineDbIntegration({
        name: 'your-integration',
        hooks: {},
      });
    }

Patch Changes

@astrojs/[email protected]

Minor Changes

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

@astrojs/[email protected]

Minor Changes

  • #11341 49b5145 Thanks @madcampos! - Adds support for Shiki's defaultColor option.

    This option allows you to override the values of a theme's inline style, adding only CSS variables to give you more flexibility in applying multiple color themes.

    Configure defaultColor: false in your Shiki config to apply throughout your site, or pass to Astro's built-in <Code> component to style an individual code block.

    import { defineConfig } from 'astro/config';
    export default defineConfig({
      markdown: {
        shikiConfig: {
          themes: {
            light: 'github-light',
            dark: 'github-dark',
          },
          defaultColor: false,
        },
      },
    });
    ---
    import { Code } from 'astro:components';
    ---
    
    <Code code={`const useMyColors = true`} lang="js" defaultColor={false} />

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Jul 17, 2024
@github-actions github-actions bot force-pushed the changeset-release/main branch 20 times, most recently from 37e76b4 to db79be5 Compare July 18, 2024 06:24
@Princesseuh
Copy link
Member

!preview 412

@github-actions github-actions bot force-pushed the changeset-release/main branch 4 times, most recently from 52d39aa to 1f46fe6 Compare July 18, 2024 13:47
@ematipico ematipico merged commit aa05be3 into main Jul 18, 2024
@ematipico ematipico deleted the changeset-release/main branch July 18, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants