Skip to content

Conversation

@obenland
Copy link
Member

@obenland obenland commented Dec 17, 2025

This ensures proper cache invalidation for block assets. The version field in block.json flows through to wp_register_script() and wp_register_style() as the ver parameter, which WordPress appends to asset URLs as ?ver=X.X.X.

Proposed changes:

  • Update release script to sync all block.json version fields with the plugin version during releases
  • Add tests for the new version replacement patterns with a fixture file

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Review the changes to bin/release.js
  • Run npm run test:unit -- bin/__tests__/release.test.js to verify all tests pass

Add version updates for all block.json files in src/ to the release
script. This ensures block asset cache invalidation works properly
when new versions are released, as the version field flows through
to wp_register_script/style as the ver parameter.
Copilot AI review requested due to automatic review settings December 17, 2025 22:32
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Dec 17, 2025
@obenland obenland self-assigned this Dec 17, 2025
@obenland obenland requested a review from a team December 17, 2025 22:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@obenland obenland merged commit 007f23c into trunk Dec 18, 2025
5 checks passed
@obenland obenland deleted the update/release-block-json-versions branch December 18, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants