Skip to content

Breaking change on 1.6.0 from 1.5.3 #138

@mastercoms

Description

@mastercoms

Hi, I just wanted to notify that it seems like a breaking change was made from 1.5.3 to 1.6.0 that was not mentioned in the change notes on GitHub Releases. The responsible commit seems to be 5887b4d which from the commit message seems innocent and only related to Vercel, but changes core things within the build process.

I am not familiar enough with the code, but it seems like the astro:build:done hook is now added in astro:config:setup, which causes breakage for users who are expecting their integration to run after Astro Shield. Now, since the build done step is being added later, it runs after all other integrations specified in the Astro config. People can work around this by instead injecting their build done step during config setup, like so:

const astroCSPHashExporterSetup: AstroIntegration = {
  name: "astro-csp-hash-exporter",
  hooks: {
    "astro:config:setup": async ({ updateConfig }) => {
      updateConfig({ integrations: [astroCSPHashExporter] });
    },
  },
};

Personally, I used this to generate my own file using the hashes module. It took me a while to understand what had changed, what was responsible, and how to fix it by going through the code myself. It would be very helpful if a note was added to the change notes indicating that this breaking change was made, and how to resolve it. Thank you for making such an amazing tool!

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionCategory: Bugs - Regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions