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

Update dependency astro to v4 #500

Merged
merged 10 commits into from
Dec 7, 2023
Merged

Update dependency astro to v4 #500

merged 10 commits into from
Dec 7, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 5, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
astro (source) 3.6.4 -> 4.0.3 age adoption passing confidence

Release Notes

withastro/astro (astro)

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

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.

  • #​9263 3cbd8ea75 Thanks @​bluwy! - Removes additional deprecated APIs:

    • The Astro preview server now returns a 404 status instead of a 301 redirect when requesting assets from the public directory without a base.
    • Removes special handling when referencing the astro/client-image type. You should use the astro/client type instead.
    • Removes deprecated built-in rss support in getStaticPaths. You should use @astrojs/rss instead.
    • Removes deprecated Astro.request.params support. You should use Astro.params instead.
  • #​9271 47604bd5b Thanks @​matthewp! - Renames Dev Overlay to Dev Toolbar

    The previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change.

    To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.

  • #​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.

  • #​9225 c421a3d17 Thanks @​natemoo-re! - Removes the opt-in handleForms property for <ViewTransitions />. Form submissions are now handled by default and this property is no longer necessary. This default behavior can be disabled by setting data-astro-reload on relevant <form /> elements.

  • #​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,
          ],
        },
      },
    })
  • #​9199 49aa215a0 Thanks @​lilnasy! - This change only affects maintainers of third-party adapters. In the Integration API, the app.render() method of the App class has been simplified.

    Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: routeData and locals.

     app.render(request)
    
    - app.render(request, routeData)
    + app.render(request, { routeData })
    
    - app.render(request, routeData, locals)
    + app.render(request, { routeData, locals })
    
    - app.render(request, undefined, locals)
    + app.render(request, { locals })

    The current signature is deprecated but will continue to function until next major version.

  • #​9212 c0383ea0c Thanks @​alexanderniebuhr! - Removes deprecated app.match() option, matchNotFound

  • #​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

  • #​9200 b4b851f5a Thanks @​ematipico! - Adds a new way to configure the i18n.locales array.

    Developers can now assign a custom URL path prefix that can span multiple language codes:

    // astro.config.mjs
    export default defineConfig({
      experimental: {
        i18n: {
          defaultLocale: 'english',
          locales: ['de', { path: 'english', codes: ['en', 'en-US'] }, 'fr'],
        },
      },
    });

    With the above configuration, the URL prefix of the default locale will be /english/. When computing Astro.preferredLocale, Astro will use the codes.

  • #​9115 3b77889b4 Thanks @​natemoo-re! - Adds the astro preferences command to manage user preferences. User preferences are specific to individual Astro users, unlike the astro.config.mjs file which changes behavior for everyone working on a project.

    User preferences are scoped to the current project by default, stored in a local .astro/settings.json file. Using the --global flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.


  • If you want to rebase/retry this PR, check this box

@renovate renovate bot added the dependencies label Dec 5, 2023
@renovate renovate bot requested a review from IgorKowalczyk December 5, 2023 16:25
@renovate renovate bot force-pushed the renovate/astro-4.x branch from b096620 to 889a829 Compare December 6, 2023 01:31
@renovate renovate bot force-pushed the renovate/astro-4.x branch from 889a829 to a0349c5 Compare December 6, 2023 18:30
@renovate renovate bot force-pushed the renovate/astro-4.x branch from a0349c5 to 1f1390a Compare December 6, 2023 22:48
@renovate renovate bot force-pushed the renovate/astro-4.x branch from 1f1390a to b8cea9e Compare December 7, 2023 07:05
@renovate renovate bot force-pushed the renovate/astro-4.x branch from b8cea9e to 4eeb3da Compare December 7, 2023 07:19
Copy link
Contributor Author

renovate bot commented Dec 7, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@IgorKowalczyk IgorKowalczyk merged commit 8978a79 into main Dec 7, 2023
9 checks passed
@IgorKowalczyk IgorKowalczyk deleted the renovate/astro-4.x branch December 7, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant