PlayForm / Inline

🦔 Inline —
https://NPMJS.Org/@playform/inline
MIT License
197 stars 8 forks source link

Bump astro from 4.4.15 to 4.5.0 #250

Closed dependabot[bot] closed 6 months ago

dependabot[bot] commented 6 months ago

Bumps astro from 4.4.15 to 4.5.0.

Release notes

Sourced from astro's releases.

astro@4.5.0

Minor Changes

  • #10206 dc87214141e7f8406c0fdf6a7f425dad6dea6d3e Thanks @​lilnasy! - Allows middleware to run when a matching page or endpoint is not found. Previously, a pages/404.astro or pages/[...catch-all].astro route had to match to allow middleware. This is now not necessary.

    When a route does not match in SSR deployments, your adapter may show a platform-specific 404 page instead of running Astro's SSR code. In these cases, you may still need to add a 404.astro or fallback route with spread params, or use a routing configuration option if your adapter provides one.

  • #9960 c081adf998d30419fed97d8fccc11340cdc512e0 Thanks @​StandardGage! - Allows passing any props to the <Code /> component

  • #10102 e3f02f5fb1cf0dae3c54beb3a4af3dbf3b06abb7 Thanks @​bluwy! - Adds a new experimental.directRenderScript configuration option which provides a more reliable strategy to prevent scripts from being executed in pages where they are not used.

    This replaces the experimental.optimizeHoistedScript flag introduced in v2.10.4 to prevent unused components' scripts from being included in a page unexpectedly. That experimental option no longer exists and must be removed from your configuration, whether or not you enable directRenderScript:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    

    export default defineConfig({ experimental: {

    •   optimizeHoistedScript: true,
      
    •   directRenderScript: true
      
      } });

With experimental.directRenderScript configured, scripts are now directly rendered as declared in Astro files (including existing features like TypeScript, importing node_modules, and deduplicating scripts). You can also now conditionally render scripts in your Astro file.

However, this means scripts are no longer hoisted to the <head> and multiple scripts on a page are no longer bundled together. If you enable this option, you should check that all your <script> tags behave as expected.

This option will be enabled by default in Astro 5.0.

  • #10130 5a9528741fa98d017b269c7e4f013058028bdc5d Thanks @​bluwy! - Stabilizes markdown.shikiConfig.experimentalThemes as markdown.shikiConfig.themes. No behaviour changes are made to this option.

  • #10189 1ea0a25b94125e4f6f2ac82b42f638e22d7bdffd Thanks @​peng! - Adds the option to pass an object to build.assetsPrefix. This allows for the use of multiple CDN prefixes based on the target file type.

    When passing an object to build.assetsPrefix, you must also specify a fallback domain to be used for all other file types not specified.

    Specify a file extension as the key (e.g. 'js', 'png') and the URL serving your assets of that file type as the value:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    

    export default defineConfig({ build: { assetsPrefix: { js: 'https://js.cdn.example.com', mjs: 'https://js.cdn.example.com', // if you have .mjs files, you must add a new entry like this png: 'https://images.cdn.example.com', fallback: 'https://generic.cdn.example.com',

  • ... (truncated)

    Changelog

    Sourced from astro's changelog.

    4.5.0

    Minor Changes

    • #10206 dc87214141e7f8406c0fdf6a7f425dad6dea6d3e Thanks @​lilnasy! - Allows middleware to run when a matching page or endpoint is not found. Previously, a pages/404.astro or pages/[...catch-all].astro route had to match to allow middleware. This is now not necessary.

      When a route does not match in SSR deployments, your adapter may show a platform-specific 404 page instead of running Astro's SSR code. In these cases, you may still need to add a 404.astro or fallback route with spread params, or use a routing configuration option if your adapter provides one.

    • #9960 c081adf998d30419fed97d8fccc11340cdc512e0 Thanks @​StandardGage! - Allows passing any props to the <Code /> component

    • #10102 e3f02f5fb1cf0dae3c54beb3a4af3dbf3b06abb7 Thanks @​bluwy! - Adds a new experimental.directRenderScript configuration option which provides a more reliable strategy to prevent scripts from being executed in pages where they are not used.

      This replaces the experimental.optimizeHoistedScript flag introduced in v2.10.4 to prevent unused components' scripts from being included in a page unexpectedly. That experimental option no longer exists and must be removed from your configuration, whether or not you enable directRenderScript:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      

      export default defineConfig({ experimental: {

      •   optimizeHoistedScript: true,
        
      •   directRenderScript: true
        
        } });

    With experimental.directRenderScript configured, scripts are now directly rendered as declared in Astro files (including existing features like TypeScript, importing node_modules, and deduplicating scripts). You can also now conditionally render scripts in your Astro file.

    However, this means scripts are no longer hoisted to the <head> and multiple scripts on a page are no longer bundled together. If you enable this option, you should check that all your <script> tags behave as expected.

    This option will be enabled by default in Astro 5.0.

  • #10130 5a9528741fa98d017b269c7e4f013058028bdc5d Thanks @​bluwy! - Stabilizes markdown.shikiConfig.experimentalThemes as markdown.shikiConfig.themes. No behaviour changes are made to this option.

  • #10189 1ea0a25b94125e4f6f2ac82b42f638e22d7bdffd Thanks @​peng! - Adds the option to pass an object to build.assetsPrefix. This allows for the use of multiple CDN prefixes based on the target file type.

    When passing an object to build.assetsPrefix, you must also specify a fallback domain to be used for all other file types not specified.

    Specify a file extension as the key (e.g. 'js', 'png') and the URL serving your assets of that file type as the value:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    

    export default defineConfig({ build: { assetsPrefix: { js: 'https://js.cdn.example.com', mjs: 'https://js.cdn.example.com', // if you have .mjs files, you must add a new entry like this png: 'https://images.cdn.example.com',

  • ... (truncated)

    Commits


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options
    You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)