Commit aaa6cab0 authored by Winnie Hellmann's avatar Winnie Hellmann

Resolve circular dependencies in merge request widget

parent 10bb8297
/**
* This file is the centerpiece of an attempt to reduce potential conflicts
* between the CE and EE versions of the MR widget. EE additions to the MR widget should
* be contained in the ee/vue_merge_request_widget directory, and should **extend**
* rather than mutate CE MR Widget code.
*
* This file should be the only source of conflicts between EE and CE. EE-only components should
* imported directly where they are needed, and import paths for EE extensions of CE components
* should overwrite import paths **without** changing the order of dependencies listed here.
*/
export { default as Vue } from 'vue';
export { default as SmartInterval } from '~/smart_interval';
export { default as WidgetHeader } from './components/mr_widget_header.vue';
export { default as WidgetMergeHelp } from './components/mr_widget_merge_help.vue';
export { default as WidgetPipeline } from './components/mr_widget_pipeline.vue';
export { default as Deployment } from './components/deployment.vue';
export { default as WidgetRelatedLinks } from './components/mr_widget_related_links.vue';
export { default as MergedState } from './components/states/mr_widget_merged.vue';
export { default as FailedToMerge } from './components/states/mr_widget_failed_to_merge.vue';
export { default as ClosedState } from './components/states/mr_widget_closed.vue';
export { default as MergingState } from './components/states/mr_widget_merging.vue';
export { default as WorkInProgressState } from './components/states/work_in_progress.vue';
export { default as ArchivedState } from './components/states/mr_widget_archived.vue';
export { default as ConflictsState } from './components/states/mr_widget_conflicts.vue';
export { default as NothingToMergeState } from './components/states/nothing_to_merge.vue';
export { default as MissingBranchState } from './components/states/mr_widget_missing_branch.vue';
export { default as NotAllowedState } from './components/states/mr_widget_not_allowed.vue';
export { default as ReadyToMergeState } from './components/states/ready_to_merge.vue';
export { default as ShaMismatchState } from './components/states/sha_mismatch.vue';
export { default as UnresolvedDiscussionsState } from './components/states/unresolved_discussions.vue';
export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked.vue';
export { default as PipelineFailedState } from './components/states/pipeline_failed.vue';
export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds.vue';
export { default as RebaseState } from './components/states/mr_widget_rebase.vue';
export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed.vue';
export { default as CheckingState } from './components/states/mr_widget_checking.vue';
export { default as MRWidgetStore } from './stores/mr_widget_store';
export { default as MRWidgetService } from './services/mr_widget_service';
export { default as eventHub } from './event_hub';
export { default as getStateKey } from './stores/get_state_key';
export { default as stateMaps } from './stores/state_maps';
export { default as SquashBeforeMerge } from './components/states/squash_before_merge.vue';
export { default as notify } from '../lib/utils/notify';
export { default as SourceBranchRemovalStatus } from './components/source_branch_removal_status.vue';
export { default as mrWidgetOptions } from './mr_widget_options.vue';
import MRWidgetOptions from './mr_widget_options.vue';
export default MRWidgetOptions;
import { Vue, mrWidgetOptions } from './dependencies'; import Vue from 'vue';
import MrWidgetOptions from './ee_switch_mr_widget_options';
import Translate from '../vue_shared/translate'; import Translate from '../vue_shared/translate';
Vue.use(Translate); Vue.use(Translate);
...@@ -6,7 +7,7 @@ Vue.use(Translate); ...@@ -6,7 +7,7 @@ Vue.use(Translate);
export default () => { export default () => {
gl.mrWidgetData.gitlabLogo = gon.gitlab_logo; gl.mrWidgetData.gitlabLogo = gon.gitlab_logo;
const vm = new Vue(mrWidgetOptions); const vm = new Vue(MrWidgetOptions);
window.gl.mrWidget = { window.gl.mrWidget = {
checkStatus: vm.checkStatus, checkStatus: vm.checkStatus,
......
...@@ -2,39 +2,37 @@ ...@@ -2,39 +2,37 @@
import Project from '~/pages/projects/project'; import Project from '~/pages/projects/project';
import SmartInterval from '~/smart_interval'; import SmartInterval from '~/smart_interval';
import createFlash from '../flash'; import createFlash from '../flash';
import { import WidgetHeader from './components/mr_widget_header.vue';
WidgetHeader, import WidgetMergeHelp from './components/mr_widget_merge_help.vue';
WidgetMergeHelp, import WidgetPipeline from './components/mr_widget_pipeline.vue';
WidgetPipeline, import Deployment from './components/deployment.vue';
Deployment, import WidgetRelatedLinks from './components/mr_widget_related_links.vue';
WidgetRelatedLinks, import MergedState from './components/states/mr_widget_merged.vue';
MergedState, import ClosedState from './components/states/mr_widget_closed.vue';
ClosedState, import MergingState from './components/states/mr_widget_merging.vue';
MergingState, import RebaseState from './components/states/mr_widget_rebase.vue';
RebaseState, import WorkInProgressState from './components/states/work_in_progress.vue';
WorkInProgressState, import ArchivedState from './components/states/mr_widget_archived.vue';
ArchivedState, import ConflictsState from './components/states/mr_widget_conflicts.vue';
ConflictsState, import NothingToMergeState from './components/states/nothing_to_merge.vue';
NothingToMergeState, import MissingBranchState from './components/states/mr_widget_missing_branch.vue';
MissingBranchState, import NotAllowedState from './components/states/mr_widget_not_allowed.vue';
NotAllowedState, import ReadyToMergeState from './components/states/ready_to_merge.vue';
ReadyToMergeState, import ShaMismatchState from './components/states/sha_mismatch.vue';
ShaMismatchState, import UnresolvedDiscussionsState from './components/states/unresolved_discussions.vue';
UnresolvedDiscussionsState, import PipelineBlockedState from './components/states/mr_widget_pipeline_blocked.vue';
PipelineBlockedState, import PipelineFailedState from './components/states/pipeline_failed.vue';
PipelineFailedState, import FailedToMerge from './components/states/mr_widget_failed_to_merge.vue';
FailedToMerge, import MergeWhenPipelineSucceedsState from './components/states/mr_widget_merge_when_pipeline_succeeds.vue';
MergeWhenPipelineSucceedsState, import AutoMergeFailed from './components/states/mr_widget_auto_merge_failed.vue';
AutoMergeFailed, import CheckingState from './components/states/mr_widget_checking.vue';
CheckingState, import MRWidgetStore from './stores/ee_switch_mr_widget_store';
MRWidgetStore, import MRWidgetService from './services/ee_switch_mr_widget_service';
MRWidgetService, import eventHub from './event_hub';
eventHub, import stateMaps from './stores/ee_switch_state_maps';
stateMaps, import SquashBeforeMerge from './components/states/squash_before_merge.vue';
SquashBeforeMerge, import notify from '~/lib/utils/notify';
notify, import SourceBranchRemovalStatus from './components/source_branch_removal_status.vue';
SourceBranchRemovalStatus,
} from './dependencies';
import GroupedTestReportsApp from '../reports/components/grouped_test_reports_app.vue'; import GroupedTestReportsApp from '../reports/components/grouped_test_reports_app.vue';
import { setFaviconOverlay } from '../lib/utils/common_utils'; import { setFaviconOverlay } from '../lib/utils/common_utils';
......
import MRWidgetService from './mr_widget_service';
export default MRWidgetService;
import getStateKey from './get_state_key';
export default getStateKey;
import MergeRequestStore from './mr_widget_store';
export default MergeRequestStore;
import stateMaps from './state_maps';
export default stateMaps;
import Timeago from 'timeago.js'; import Timeago from 'timeago.js';
import { getStateKey } from '../dependencies'; import getStateKey from './ee_switch_get_state_key';
import { stateKey } from './state_maps'; import { stateKey } from './state_maps';
import { formatDate } from '../../lib/utils/datetime_utility'; import { formatDate } from '../../lib/utils/datetime_utility';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment