FLUID-6710: Remove versioned globals and file guards from the framework

Metadata

Source
FLUID-6710
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2022-01-26T13:37:24.241-0500
Updated
2022-02-03T17:16:59.958-0500
Versions
  1. 3.0
Fixed Versions
  1. 4.0
Component
  1. Framework

Description

We have determined it is best to remove our specially versioned globals and file guards from the framework and components. These were originally introduced to allow multiple versions of Infusion to coexist on the same page, which isn't practical any more for a number of reasons, as well as being a feature (originally requested by the uPortal community in 2008) which hasn't been in use for many years.

Removing these will enable us to be much more nimble with making standardly versioned releases since we will no longer need to update every file's global which has the form, e.g.

var fluid_4_0_0 = fluid_4_0_0 || {}; // eslint-disable-line no-redeclare
var fluid = fluid || fluid_4_0_0; // eslint-disable-line no-redeclare

(function ($, fluid) {

which would otherwise churn every file even for a point release.

Another benefit is somewhat reducing the final minified filesize of the delivered framework.

If this feature were required again, it would best be reimplemented as part of our build process.

Comments

  • Justin Obara commented 2022-01-27T09:55:36.835-0500

    Some discussion on the reasoning from the Fluid Tech matrix channel.

    • Switching to ES6 modules in the future
    • Infusion expects a single component tree
    • Potentially more risks in the node vs browser environment
    • Need to cut scope
  • Justin Obara commented 2022-02-03T17:16:54.688-0500

    Merged PR ( https://github.com/fluid-project/infusion/pull/1069 ) into the project repo at 466f09760ca4a8984a56ad37f6abd526287cee12