JavaScript library upgrades

Oracle Commerce is upgrading Oracle JavaScript Extension Toolkit (JET) to version 7.3.0 in its Storefront and Agent framework and incorporating upgraded versions of a number of third-party JavaScript libraries in order to adhere to Oracle security policies.

These upgrades may affect custom widgets and view model customizations that use any deprecated APIs from the third-party libraries. Note that default widgets and view models that ship with Oracle Commerce have already been updated to incorporate the upgrades.

This section describes libraries and changes that might affect widgets and view model customizations. Review this information then test and, if necessary, update your custom widgets and view models.

For details about identifying custom widgets that you need to upgrade, see the post titled IMPORTANT NOTICE: Impact of OJET 7.3.0 Upgrade on CX Commerce Customers on Oracle Customer Connect.

JavaScript library upgrade versions

This section lists the following information for each upgraded JavaScript library in Oracle Commerce: The library name, the version previously used by Oracle Commerce, the upgraded version used by Oracle Commerce, and the URL for the library's web site, where you can find more details about the upgrade.

  • Library: jQuery

    Current Version: 2.1.3

    Upgraded Version: 3.5.1

    Documentation:

  • Library: Knockout https://github.com/knockout/knockout/issues

    Current Version: 3.4.0

    Upgraded Version: 3.5.0

    Documentation: https://jquery.com/upgrade-guide/3.5/

  • Library: requireJS

    Current Version: 2.1.16

    Upgraded Version: 2.3.6

    Documentation: https://requirejs.org/docs/start.html

  • Library: ES6|Promises

    Current Version: 1.0.0

    Upgraded Version: 4.2.6

    Documentation: http://es6-features.org/

  • Library: Hammer.js

    Current Version: 2.0.4

    Upgraded Version: 2.0.8

    Documentation: https://hammerjs.github.io/changelog/

  • Library: JQueryui-amd

    Current Version: 1.11.4

    Upgraded Version: 1.12.1

    Documentation: https://jqueryui.com/upgrade-guide/1.11/#amd-support

  • Library: bootstrap-typeahead

    Current Version: 3.0.3

    Upgraded Version: 4.0.2

    Documentation: https://github.com/bassjobsen/Bootstrap-3-Typeahead

  • Library: bootstrap-datepicker

    Current Version: 1.1.0

    Upgraded Version: 1.9.0

    Documentation: https://bootstrap-datepicker.readthedocs.io/en/latest/

  • Library:bootstrap-datepicker

    Current Version: 1.1.0

    Upgraded Version: 1.9.0

    Documentation: https://bootstrap-datepicker.readthedocs.io/en/latest/

  • Library: i18next

    Current Version: 3.5.0

    Upgraded Version: 17.0.14

    Documentation: https://www.i18next.com/

  • Library: i18next-xhr-backend

    Current Version: 1.2.1

    Upgraded Version: 3.1.2

    Documentation: https://www.npmjs.com/package/i18next-xhr-backend

  • Library: imagesLoaded

    Current Version: 3.1.8

    Upgraded Version: 4.1.4

    Documentation: https://imagesloaded.desandro.com/

  • Library: spectrum

    Current Version: 1.7.0

    Upgraded Version: 1.8.0

    Documentation: https://bgrins.github.io/spectrum/

jQuery updates

Version 3.5.1 of jQuery includes the following updates that might affect custom widgets:

  • The deprecated properties .context and .selector are no longer available. If you need to use a selector string, you can require it as a parameter of a method. For example, function( selector, options ). For more information, see https://api.jquery.com/selector/.
  • The method size() is no longer available. Use the .length property instead, as it returns the same value as the size() method. See https://api.jquery.com/length/ for more information.
  • <button> tags used inside the header HTML of a popup stack are omitted by the newer version of jQuery. You can replace these <button> tags with <a> tags.

Bootstrap-datepicker updates

Version 1.9.0 of Bootstrap-datepicker includes the following updates that might affect template files for custom widgets:

  • No longer uses the removed jQuery method size().
  • No longer accepts dates in a different format than expected. For example, a date formatted as mm/dd/yy is no longer accepted when the expected format is mm/dd/yyyy.

Knockout updates

Widgets include display templates for showing content using knockout.js data bindings. Version 3.5.0 of knockout includes the following updates that might affect template files for custom widgets:

  • Throws errors for missing parentheses, braces, or brackets. For example, knockout will throw a parsing error if all the braces in a statement are not properly closed.
  • Throws an error when self-closing tags are used. For example, <span />, <div />, <textarea />, and <select/> can no longer be used.
  • Throws an error and blocks the rendering of a widget when there are parsing errors in the data-bind definitions that include multiple quotation marks.

    For example, in the following data-bind, putting the string for the ID in quotation marks causes parsing errors because "attr:{id:" and " + $data.id}" are considered separate strings:

    <td class="col-md-4" scope="row" data-bind="attr:{id:"purchase-list-shared-info-md-4" + $data.id}">

    To avoid errors, you could change the definition to:

    <td class="col-md-4" scope="row" data-bind="attr:{id:'purchase-list-shared-info-md-4' + $data.id}">

  • Throws errors for invalid and orphan knockout end comments. Keep in mind that knockout also throws this error for statements written as follows, because knockout now treats this as a normal comment, leaving the corresponding end comment as an orphan: <!-- ko:if: CONDITION–>
  • Throws an error when an invalid or empty template is referenced within a ko:if: CONDITION binding. For details about this issue, see: https://github.com/knockout/knockout/issues/2446
  • contextFor does not return context for a newly-added node and throws the console error Unable to process binding. You can fix this issue by returning context for the nearest parent node if the current node’s context is not present. For details about this issue, see: https://github.com/knockout/knockout/issues/2445

Updated default widgets

Oracle has updated the default Oracle Commerce widgets that were affected by the upgraded JavaScript libraries. You must use the latest version of these widgets in your storefront.

The following default storefront widgets have been updated: assetDetails, cancelItemDetails, checkoutRegistration, checkoutScheduledOrder, customerSummary, headerWidget, orderHistoryWidget, ordersPendingApproval, organizationAddressSelector, productDetails, promotion, purchaseLists, quickOrder, scheduledOrder, shippingOptions, shoppingCartSummary, and splitPayments.

The following default Agent widgets have been updated: agentAccountOrderDetails, agentCheckoutPlaceOrderSummary, agentCheckoutScheduledOrder, agentCreateExchange, agentCreateReturn, agentDashboard, agentExchangeHistoryDetails, agentOrderDetailsHeader, agentOrderDetailsPendingPayment, agentOrderHistory,, agentOrderSearch, agentOrdersPendingApproval, agentOrganizationAddressSelector, agentProcessReturns, agentProductDetails, agentPromotion, agentPurchaseList, agentRefunds, agentReturnHistoryDetails, agentReturnSearch, agentShippingOptions, agentShoppingCart, and agentSplitPayments.