Affected Release/Version
5.0.2
Description
Running yarn upgrade against the codebase upgrades jquery-ui from 1.14.1 to 1.14.2 due to the existing dependency constraint:
The upgrade results in a different jQuery dependency resolution.
Before:
jquery-ui@^1.12.1:
version "1.14.1"
dependencies:
jquery ">=1.12.0 <5.0.0"
"jquery@>=1.12.0 <5.0.0", jquery@^3.5.1:
After:
jquery-ui@^1.12.1:
version "1.14.2"
dependencies:
jquery ">=1.12.0 <5.0.0"
"jquery@>=1.12.0 <5.0.0":
version "4.0.0"
jquery@^3.5.1:
This causes Yarn to install both jQuery 4.0.0 (as a dependency of jquery-ui) and jQuery 3.7.1 (as the application's direct dependency).
Steps to reproduce
- Check out the
5.0.2 release.
- Run:
- Run the PostgreSQL GH Action
Expected behavior
Dependency upgrades should not introduce regressions in existing functionality without requiring application changes.
Actual behavior
The dependency update introduces feature spec failures:
Failures:
1) Plans User creates a new Plan
Failure/Error: expect(@user.plans).to be_one
expected `#<ActiveRecord::Associations::CollectionProxy []>.one?` to be truthy, got false
2) SuperAdmins Orgs Super admin submits invalid data
Failure/Error: JSON.parse(params[:org_links])
JSON::ParserError:
unexpected character: 'org' at line 1 column 1
The second failure was resolved by changing:
<%= hidden_field_tag('org_links', org.links) %>
to:
<%= hidden_field_tag('org_links', org.links.to_json) %>
which ensures the hidden field value is serialized as valid JSON before being parsed.
Workaround
Pin jquery-ui to the previous known-good version:
or complete the required migration work before upgrading to jquery-ui 1.14.2.
Additional context
The jquery-ui upgrade was introduced indirectly through yarn upgrade; there was no explicit request to update jquery-ui.
The existing dependency constraint:
allowed Yarn to update to newer jquery-ui releases automatically.
The jquery-ui 1.14 upgrade guide documents breaking changes that may require application changes:
https://jqueryui.com/upgrade-guide/1.14/
Affected Release/Version
5.0.2Description
Running
yarn upgradeagainst the codebase upgradesjquery-uifrom1.14.1to1.14.2due to the existing dependency constraint:The upgrade results in a different jQuery dependency resolution.
Before:
After:
This causes Yarn to install both jQuery 4.0.0 (as a dependency of jquery-ui) and jQuery 3.7.1 (as the application's direct dependency).
Steps to reproduce
5.0.2release.Expected behavior
Dependency upgrades should not introduce regressions in existing functionality without requiring application changes.
Actual behavior
The dependency update introduces feature spec failures:
The second failure was resolved by changing:
to:
which ensures the hidden field value is serialized as valid JSON before being parsed.
Workaround
Pin
jquery-uito the previous known-good version:or complete the required migration work before upgrading to
jquery-ui1.14.2.Additional context
The
jquery-uiupgrade was introduced indirectly throughyarn upgrade; there was no explicit request to updatejquery-ui.The existing dependency constraint:
allowed Yarn to update to newer
jquery-uireleases automatically.The
jquery-ui1.14 upgrade guide documents breaking changes that may require application changes:https://jqueryui.com/upgrade-guide/1.14/