Skip to content

jquery-ui 1.14.2 upgrade causes regressions after yarn upgrade #3600

Description

@aaronskiba

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:

"jquery-ui": "^1.12.1"

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

  1. Check out the 5.0.2 release.
  2. Run:
yarn upgrade
  1. 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:

"jquery-ui": "1.14.1"

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:

"jquery-ui": "^1.12.1"

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions