Refactor graphs bundle to ES module syntax
What does this MR do?
Part of an effort to limit the messy javascript global scope (#20983 (moved))
This refactors the contents of graphs_bundle
from:
graphs_bundle.js
├── stat_graph_contributors_graph.js
├── stat_graph_contributors_util.js
├── stat_graph_contributors.js
└── stat_graph.js
with the following side effects:
window.d3
window.ContributorsGraph
window.ContributorsMasterGraph
window.ContributorsAuthorGraph
window.ContributorsStatGraphUtil
window.ContributorsStatGraph
window.StatGraph
to
graphs_bundle.js
└─┬ stat_graph_contributors.js
├── stat_graph_contributors_util.js
└── stat_graph_contributors_graph.js
with only one side effect:
window.ContributorsStatGraph
This MR also removes IIFEs, replaces CJS require
syntax with ES import
syntax, and directly exports classes and objects rather than relying on window
. No changes were made to the classes themselves.
Are there points in the code the reviewer needs to double check?
all tests should pass, and the project -> graphs page should function as it normally does
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together