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

Release 5.12.4 #677

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Release 5.12.4 #677

merged 3 commits into from
Jun 3, 2024

Conversation

itambek-godaddy
Copy link
Contributor

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

    1. In one of the gateway plugins (such as ANet), require this branch of the FW
    1. Go to My Account > Payment Methods
    1. Click on "Edit" on any of the payment methods
  • The edit form works, edits are saved and there are no errors in console.

Copy link
Contributor

@nikolas4175-godaddy nikolas4175-godaddy left a comment

Choose a reason for hiding this comment

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

✅ QA

  • In ANet, require this branch of the FW
  • Go to My Account > Payment Methods
  • Click on "Edit" on any of the payment methods
  • The edit form works, edits are saved and there are no errors in console.

Left a quick note about the specific Parcel version we're rolling back to, but approving anyhow as the current changes resolve the known build issue.

@@ -34,7 +33,7 @@
"grunt-shell": "^4.0",
"grunt-text-replace": "^0.4",
"load-grunt-tasks": "~5.1",
"parcel": "^2.12",
"parcel": "1.12.3",
Copy link
Contributor

@nikolas4175-godaddy nikolas4175-godaddy May 31, 2024

Choose a reason for hiding this comment

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

@itambek-godaddy it looks like there's a v1.12.5 available on npm under the parcel-bundler name (which appears to be where v1 releases live now). Should we be using that instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, right - it's because starting 1.12.4 there is an issue with the build. The workaround mentioned here did not work, so I opted for downgrading instead.

@itambek-godaddy itambek-godaddy merged commit 0cf3066 into master Jun 3, 2024
@itambek-godaddy itambek-godaddy deleted the release/5.12.4 branch June 3, 2024 07:20
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.

2 participants