godaddy-wordpress / wc-plugin-framework

The official SkyVerge WooCommerce plugin framework
Other
138 stars 42 forks source link

Release 5.12.4 #677

Closed itambek-godaddy closed 1 month ago

itambek-godaddy commented 1 month ago

Summary

This release addresses an issue discovered in the 5.12.3 release, where bundled gateway scripts trigger errors.

Issue MWC-16791

Details

This was a very enigmatic issue to track down. Recently, our NPM deps were updated, which included a major upgrade to parcel - from v1 to v2. Parcel v2 compiles code to JS modules and requires the type="module" attribute on the script tags when loading. Because the compiled assets were loaded as regular JS, it caused a TypeError when the script was executed.

Unfortunately, WP only added wp_enqueue_script_module in 6.5 (this year), and adding the type attribute in earlier WP versions requires some filtering. Even when I tried adding the type attribute, I ran into other issues.

The change to using modules requires far more QA than downgrading parcel at the moment, which is why this PR has chosen the latter. I suggest we circle back to upgrading parcel later when we have more time to dedicate to it.

QA