github withastro/astro astro@4.0.0-beta.0

latest releases: astro@4.15.8, @astrojs/mdx@3.1.7, astro@4.15.7...
pre-release9 months ago

Major Changes

  • #9138 abf601233 Thanks @bluwy! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.

    Potentially breaking change: The default value of markdown.remarkRehype.footnoteBackLabel is changed from "Back to content" to "Back to reference 1". See the mdast-util-to-hast commit for more information.

  • #9181 cdabf6ef0 Thanks @bluwy! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a Response instead.

    ResponseWithEncoding is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.

    The types for middlewares have also been revised. To type a middleware function, you should now use MiddlewareHandler instead of MiddlewareResponseHandler. If you used defineMiddleware() to type the function, no changes are needed.

  • #9122 1c48ed286 Thanks @bluwy! - Adds Vite 5 support. There are no breaking changes from Astro. Check the Vite migration guide for details of the breaking changes from Vite instead.

  • #9196 37697a2c5 Thanks @bluwy! - Removes support for Shiki custom language's path property. The language JSON file should be imported and passed to the option instead.

    // astro.config.js
    + import customLang from './custom.tmLanguage.json'
    
    export default defineConfig({
      markdown: {
        shikiConfig: {
          langs: [
    -       { path: './custom.tmLanguage.json' },
    +       customLang,
          ],
        },
      },
    })
  • #9168 153a5abb9 Thanks @bluwy! - Removes deprecated features from Astro 3.0

    • Adapters are now required to pass supportedAstroFeatures to specify a list of features they support.
    • The build.split and build.excludeMiddleware options are removed. Use functionPerRoute and edgeMiddleware from adapters instead.
    • The markdown.drafts option and draft feature is removed. Use content collections instead.
    • Lowercase endpoint names are no longer supported. Use uppercase endpoint names instead.
    • getHeaders() exported from markdown files is removed. Use getHeadings() instead.

Minor Changes

  • #9105 6201bbe96 Thanks @FredKSchott! - Update CLI logging experience

  • #9161 bd0c2e9ae Thanks @bluwy! - Renames the entryPoint property of the injectRoute integrations API to entrypoint for consistency. A warning will be shown prompting you to update your code when using the old name.

Patch Changes

  • #9149 0fe3a7ed5 Thanks @bluwy! - Removes vendored Vite's importMeta.d.ts file in favour of Vite 5's new vite/types/import-meta.d.ts export

  • #9150 710be505c Thanks @bluwy! - Refactors virtual modules exports. This should not break your project unless you import Astro's internal modules, including:

    • astro/middleware/namespace
    • astro/transitions
    • astro/transitions/router
    • astro/transitions/events
    • astro/transitions/types
    • astro/prefetch
    • astro/i18n
  • Updated dependencies [abf601233, addb57c8e, c7953645e]:

    • @astrojs/markdown-remark@4.0.0-beta.0

Don't miss a new astro release

NewReleases is sending notifications on new releases.