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

Set Smidge cachebuster type #18198

Conversation

SimonHartfield
Copy link

@SimonHartfield SimonHartfield commented Feb 2, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

This fixes : 15165

Description

Sets the cachebuster type for Smidge correctly, so that the version is correctly set on the URL

Testing

Replication steps for the bug from HQ are here:
#15165 (comment)

Set the smidge cache buster to AppDomain
Confirm that the version in the URLs is no longer 1

Copy link

github-actions bot commented Feb 2, 2025

Hi there @SimonHartfield, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@AndyButland AndyButland self-assigned this Feb 3, 2025
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @SimonHartfield. I've had a read through the linked issue and agree it makes sense here we align the settings for the cache buster for front-end rendering of bundled assets. And testing locally confirms that this will now use the expected configurated value.

Just to document, to test I've added a custom bundle as per the documentation and rendered it on the front-end with:

@{
    @inject IRuntimeMinifier RuntimeMinifier
}
@Html.Raw(await RuntimeMinifier.RenderCssHereAsync("registered-css-bundle"))

Then I've amended the Umbraco:CMS:RuntimeMinification:CacheBuster setting to confirm that the expected cachebuster querystring is rendered.

Just a couple of minor updates I've suggested before merging - if you'd like to update, or I can if you prefer to let me know.

@SimonHartfield
Copy link
Author

Hi @AndyButland

I've added those amends inline with your comments, if you were looking for something different then I'll take you up on your offer and you can make further amends.

Cheers,
Simon

@AndyButland
Copy link
Contributor

Looks great @SimonHartfield thanks. I just tweaked the exception message a little but all looks good to me. I'll merge this in once the build pipeline is happy.

@AndyButland AndyButland enabled auto-merge (squash) February 4, 2025 06:21
@AndyButland AndyButland merged commit 2422a02 into umbraco:v13/contrib Feb 4, 2025
19 checks passed
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.

2 participants