Skip to content

fix(deps): update dependency astro to v2#6

Merged
4-Leafs-Code merged 1 commit intomainfrom
renovate/astro-2.x
Feb 8, 2023
Merged

fix(deps): update dependency astro to v2#6
4-Leafs-Code merged 1 commit intomainfrom
renovate/astro-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Feb 8, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
astro (source) ^1.9.0 -> ^2.0.0 age adoption passing confidence

Release Notes

withastro/astro

v2.0.8

Compare Source

Patch Changes

v2.0.7

Compare Source

Patch Changes

v2.0.6

Compare Source

Patch Changes

v2.0.5

Compare Source

Patch Changes

v2.0.4

Compare Source

Patch Changes

v2.0.2

Compare Source

Patch Changes

v2.0.1

Compare Source

Patch Changes

v2.0.0

Compare Source

Note
This is a detailed changelog of all changes in Astro v2.
See our upgrade guide for an overview of steps needed to upgrade an existing project.

Major Changes
  • #​5687 e2019be6f Thanks @​bholmesdev! - Give remark and rehype plugins access to user frontmatter via frontmatter injection. This means data.astro.frontmatter is now the complete Markdown or MDX document's frontmatter, rather than an empty object.

    This allows plugin authors to modify existing frontmatter, or compute new properties based on other properties. For example, say you want to compute a full image URL based on an imageSrc slug in your document frontmatter:

    export function remarkInjectSocialImagePlugin() {
      return function (tree, file) {
        const { frontmatter } = file.data.astro;
        frontmatter.socialImageSrc = new URL(frontmatter.imageSrc, 'https://my-blog.com/').pathname;
      };
    }

    When using Content Collections, you can access this modified frontmatter using the remarkPluginFrontmatter property returned when rendering an entry.

    Migration instructions

    Plugin authors should now check for user frontmatter when applying defaults.

    For example, say a remark plugin wants to apply a default title if none is present. Add a conditional to check if the property is present, and update if none exists:

    export function remarkInjectTitlePlugin() {
      return function (tree, file) {
        const { frontmatter } = file.data.astro;
    +    if (!frontmatter.title) {
          frontmatter.title = 'Default title';
    +    }
      }
    }

    This differs from previous behavior, where a Markdown file's frontmatter would always override frontmatter injected via remark or reype.

  • #​5891 05caf445d Thanks @​bholmesdev! - Remove deprecated Markdown APIs from Astro v0.X. This includes getHeaders(), the .astro property for layouts, and the rawContent() and compiledContent() error messages for MDX.

  • #​5778 49ab4f231 Thanks @​bluwy! - Remove proload to load the Astro config. It will now use NodeJS and Vite to load the config only.

  • #​5728 8fb28648f Thanks @​natemoo-re! - The previously experimental features --experimental-error-overlay and --experimental-prerender, both added in v1.7.0, are now the default.

    You'll notice that the error overlay during astro dev has a refreshed visual design and provides more context for your errors.

    The prerender feature is now enabled by default when using output: 'server'. To prerender a particular page, add export const prerender = true to your frontmatter.

    Warning
    Integration authors that previously relied on the exact structure of Astro's v1.0 build output may notice some changes to our output file structure. Please test your integrations to ensure compatability.
    Users that have configured a custom vite.build.rollupOptions.output.chunkFileNames should ensure that their Astro project is configured as an ESM Node project. Either include "type": "module" in your root package.json file or use the .mjs extension for chunkFileNames.

  • #​5782 1f92d64ea Thanks @​Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0

  • #​5771 259a539d7 Thanks @​matthewp! - Removes support for astroFlavoredMarkdown

    In 1.0 Astro moved the old Astro Flavored Markdown (also sometimes called Components in Markdown) to a legacy feature. This change removes the legacy.astroFlavoredMarkdown option completely.

    In 2.0 this feature will not be available in Astro at all. We recommend migration to MDX for those were still using this feature in 1.x.

  • #​5941 304823811 Thanks @​bholmesdev! - Content collections: Introduce a new slug frontmatter field for overriding the generated slug. This replaces the previous slug() collection config option from Astro 1.X and the 2.0 beta.

    When present in a Markdown or MDX file, this will override the generated slug for that entry.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


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

This PR has been generated by Mend Renovate. View repository job log here.

@4-Leafs-Code 4-Leafs-Code merged commit a5749e0 into main Feb 8, 2023
@renovate renovate Bot deleted the renovate/astro-2.x branch February 8, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant