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 (alpha) #11787

Merged
merged 3 commits into from
Aug 23, 2024
Merged

[ci] release (alpha) #11787

merged 3 commits into from
Aug 23, 2024

Conversation

astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Aug 20, 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 next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

[email protected]

Major Changes

  • #11798 e9e2139 Thanks @matthewp! - Unflag globalRoutePriority

    The previously experimental feature globalRoutePriority is now the default in Astro 5.

    This was a refactoring of route prioritization in Astro, making it so that injected routes, file-based routes, and redirects are all prioritized using the same logic. This feature has been enabled for all Starlight projects since it was added and should not affect most users.

  • #11679 ea71b90 Thanks @florian-lefebvre! - The astro:env feature introduced behind a flag in v4.10.0 is no longer experimental and is available for general use. If you have been waiting for stabilization before using astro:env, you can now do so.

    This feature lets you configure a type-safe schema for your environment variables, and indicate whether they should be available on the server or the client.

    To configure a schema, add the env option to your Astro config and define your client and server variables. If you were previously using this feature, please remove the experimental flag from your Astro config and move your entire env configuration unchanged to a top-level option.

    import { defineConfig, envField } from 'astro/config';
    
    export default defineConfig({
      env: {
        schema: {
          API_URL: envField.string({ context: 'client', access: 'public', optional: true }),
          PORT: envField.number({ context: 'server', access: 'public', default: 4321 }),
          API_SECRET: envField.string({ context: 'server', access: 'secret' }),
        },
      },
    });

    You can import and use your defined variables from the appropriate /client or /server module:

    ---
    import { API_URL } from 'astro:env/client';
    import { API_SECRET_TOKEN } from 'astro:env/server';
    
    const data = await fetch(`${API_URL}/users`, {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${API_SECRET_TOKEN}`,
      },
    });
    ---
    
    <script>
      import { API_URL } from 'astro:env/client';
    
      fetch(`${API_URL}/ping`);
    </script>

    Please see our guide to using environment variables for more about this feature.

  • #11788 7c0ccfc Thanks @ematipico! - Updates the default value of security.checkOrigin to true, which enables Cross-Site Request Forgery (CSRF) protection by default for pages rendered on demand.

    If you had previously configured security.checkOrigin: true, you no longer need this set in your Astro config. This is now the default and it is safe to remove.

    To disable this behavior and opt out of automatically checking that the “origin” header matches the URL sent by each request, you must explicitly set security.checkOrigin: false:

    export default defineConfig({
    +  security: {
    +    checkOrigin: false
    +  }
    })
  • #11741 6617491 Thanks @bluwy! - Removes internal JSX handling and moves the responsibility to the @astrojs/mdx package directly. The following exports are also now removed:

    • astro/jsx/babel.js
    • astro/jsx/component.js
    • astro/jsx/index.js
    • astro/jsx/renderer.js
    • astro/jsx/server.js
    • astro/jsx/transform-options.js

    If your project includes .mdx files, you must upgrade @astrojs/mdx to the latest version so that it doesn't rely on these entrypoints to handle your JSX.

  • #11782 9a2aaa0 Thanks @Princesseuh! - Makes the compiledContent property of Markdown content an async function, this change should fix underlying issues where sometimes when using a custom image service and images inside Markdown, Node would exit suddenly without any error message.

    ---
    import * as myPost from "../post.md";
    
    - const content = myPost.compiledContent();
    + const content = await myPost.compiledContent();
    ---
    
    <Fragment set:html={content} />
  • #11770 cfa6a47 Thanks @Princesseuh! - Removed support for the Squoosh image service. As the underlying library libsquoosh is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.

    Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.

    - import { squooshImageService } from "astro/config";
    import { defineConfig } from "astro/config";
    
    export default defineConfig({
    -  image: {
    -    service: squooshImageService()
    -  }
    });

    If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh

Patch Changes

  • #11780 c6622ad Thanks @Princesseuh! - Deprecates the Squoosh image service, to be removed in Astro 5.0. We recommend migrating to the default Sharp service.

  • #11732 4cd6c43 Thanks @matthewp! - Use GET requests with preloading for Server Islands

    Server Island requests include the props used to render the island as well as any slots passed in (excluding the fallback slot). Since browsers have a max 4mb URL length we default to using a POST request to avoid overflowing this length.

    However in reality most usage of Server Islands are fairly isolated and won't exceed this limit, so a GET request is possible by passing this same information via search parameters.

    Using GET means we can also include a <link rel="preload"> tag to speed up the request.

    This change implements this, with safe fallback to POST.

  • #11773 86a3391 Thanks @ematipico! - Changes messages logged when using unsupported, deprecated, or experimental adapter features for clarity

  • #11774 c6400ab Thanks @florian-lefebvre! - Fixes the path returned by injectTypes

  • #11771 49650a4 Thanks @florian-lefebvre! - Fixes an error thrown by astro sync when an astro:env virtual module is imported inside the Content Collections config

  • #11744 b677429 Thanks @bluwy! - Disables the WebSocket server when creating a Vite server for loading config files

@astrojs/[email protected]

Major Changes

  • #11679 ea71b90 Thanks @florian-lefebvre! - Adds stable support for astro:env

  • #11770 cfa6a47 Thanks @Princesseuh! - Removed support for the Squoosh image service. As the underlying library libsquoosh is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.

    Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.

    - import { squooshImageService } from "astro/config";
    import { defineConfig } from "astro/config";
    
    export default defineConfig({
    -  image: {
    -    service: squooshImageService()
    -  }
    });

    If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh

@astrojs/[email protected]

Major Changes

  • #11679 ea71b90 Thanks @florian-lefebvre! - Adds stable support for astro:env

  • #11770 cfa6a47 Thanks @Princesseuh! - Removed support for the Squoosh image service. As the underlying library libsquoosh is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.

    Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.

    - import { squooshImageService } from "astro/config";
    import { defineConfig } from "astro/config";
    
    export default defineConfig({
    -  image: {
    -    service: squooshImageService()
    -  }
    });

    If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh

Patch Changes

  • #11783 fc81b01 Thanks @matthewp! - Prevent race condition with Node 18

    Using Node 18 there can be a race condition where polyfill for the crypto global is not applied in time. This change ensures the polyfills run first.

@astrojs/[email protected]

Minor Changes

  • #11741 6617491 Thanks @bluwy! - Updates adapter server entrypoint to use @astrojs/mdx/server.js

    This is an internal change. Handling JSX in your .mdx files has been moved from Astro internals and is now the responsibility of this integration. You should not notice a change in your project, and no update to your code is required.

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@github-actions github-actions bot added 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 Aug 20, 2024
@github-actions github-actions bot force-pushed the changeset-release/next branch 6 times, most recently from 2e79561 to 1a37584 Compare August 23, 2024 13:59
@github-actions github-actions bot force-pushed the changeset-release/next branch from 1a37584 to e421dd0 Compare August 23, 2024 15:09
Co-authored-by: Sarah Rainsberger <[email protected]>
@github-actions github-actions bot added the pr: docs A PR that includes documentation for review label Aug 23, 2024
@matthewp matthewp merged commit 5966acc into next Aug 23, 2024
14 checks passed
@matthewp matthewp deleted the changeset-release/next branch August 23, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants