Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor, move config-merger code from merging aspect to a new teambit.workspace/config-merger aspect #8402

Merged
merged 5 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,20 @@
"mainFile": "index.ts",
"rootDir": "scopes/harmony/config"
},
"config-merger": {
"name": "config-merger",
"scope": "",
"version": "",
"defaultScope": "teambit.workspace",
"mainFile": "index.ts",
"rootDir": "scopes/workspace/config-merger",
"config": {
"teambit.harmony/aspect": {},
"teambit.envs/envs": {
"env": "teambit.harmony/aspect"
}
}
},
"content/cli-reference": {
"name": "content/cli-reference",
"scope": "teambit.harmony",
Expand Down
1 change: 0 additions & 1 deletion scopes/component/merging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ export type {
FilesStatus,
FailedComponents,
} from './merging.main.runtime';
export { ConfigMergeResult } from './config-merge-result';
export default MergingAspect;
export { MergingAspect };
2 changes: 1 addition & 1 deletion scopes/component/merging/merge-cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
} from '@teambit/legacy/dist/constants';
import { FileStatus, MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';
import { GlobalConfigMain } from '@teambit/global-config';
import { ConfigMergeResult } from '@teambit/config-merger';
import { BitError } from '@teambit/bit-error';
import { ApplyVersionResults, MergingMain, ApplyVersionResult } from './merging.main.runtime';
import { ConfigMergeResult } from './config-merge-result';

export class MergeCmd implements Command {
name = 'merge [ids...]';
Expand Down
4 changes: 2 additions & 2 deletions scopes/component/merging/merge-status-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { compact } from 'lodash';
import threeWayMerge from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';
import { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';
import { NoCommonSnap } from '@teambit/legacy/dist/scope/exceptions/no-common-snap';
import { ConfigMerger } from './config-merger';
import { ComponentConfigMerger } from '@teambit/config-merger';
import { ComponentMergeStatus, ComponentMergeStatusBeforeMergeAttempt } from './merging.main.runtime';

export type MergeStatusProviderOptions = {
Expand Down Expand Up @@ -118,7 +118,7 @@ other: ${otherLaneHead.toString()}`);
otherLaneName === currentLaneName ? 'incoming' : otherLaneName
})`;
const workspaceIds = await this.workspace.listIds();
const configMerger = new ConfigMerger(
const configMerger = new ComponentConfigMerger(
id.toStringWithoutVersion(),
workspaceIds,
this.otherLane,
Expand Down