@teambit/merging 0.0.253 → 0.0.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -438,6 +438,13 @@ ${'>'.repeat(7)} ${this.otherLabel}
438
438
  peer: 'peerDependencies'
439
439
  };
440
440
  const hasConfigForDep = (depType, depName) => mergedPolicy[depType].find(d => d.name === depName);
441
+ const getDepIdAsPkgName = dep => {
442
+ if (dep.__type !== 'component') {
443
+ return dep.id;
444
+ }
445
+ // @ts-ignore
446
+ return dep.packageName;
447
+ };
441
448
  const addSerializedDepToPolicy = dep => {
442
449
  const depType = lifecycleToDepType[dep.lifecycle];
443
450
  if (hasConfigForDep(depType, dep.id)) {
@@ -445,7 +452,7 @@ ${'>'.repeat(7)} ${this.otherLabel}
445
452
  }
446
453
 
447
454
  mergedPolicy[depType].push({
448
- name: dep.id,
455
+ name: getDepIdAsPkgName(dep),
449
456
  version: dep.policy || dep.version,
450
457
  force: false
451
458
  });
@@ -535,7 +542,7 @@ ${'>'.repeat(7)} ${this.otherLabel}
535
542
  }
536
543
  hasConflict = true;
537
544
  conflictedPolicy[depType].push({
538
- name: currentDep.id,
545
+ name: getDepIdAsPkgName(currentDep),
539
546
  version: `${conflictIndicator}${currentVer}::${otherVer}::`,
540
547
  force: false
541
548
  });
@@ -1 +1 @@
1
- {"version":3,"names":["ConfigMerger","constructor","compIdStr","workspaceIds","currentAspects","baseAspects","otherAspects","currentLabel","otherLabel","merge","populateEnvs","results","map","currentExt","id","stringId","handledExtIds","includes","push","baseExt","findExtension","otherExt","mergePerStrategy","basicConflictGenerator","currentConfig","getConfig","otherConfig","otherAspectsNotHandledResults","mergedConfig","envResult","envStrategy","ConfigMergeResult","compact","getEnvId","ext","envsAspect","findCoreExtension","EnvsAspect","Error","env","config","data","currentEnv","otherEnv","baseEnv","undefined","currentEnvAspect","version","extensionId","rawConfig","otherEnvAspect","baseEnvAspect","mergeStrategyParams","baseConfig","isIdInWorkspace","basicConfigMerge","areConfigsEqual","configA","configB","JSON","stringify","depResolverResult","depResolverStrategy","mergeStrategyConfigParams","conflict","repeat","formatConfig","conf","confStr","confStrSplit","split","shift","pop","join","params","DependencyResolverAspect","mergedPolicy","dependencies","devDependencies","peerDependencies","conflictedPolicy","isMerged","hasConflict","conflictIndicator","nonPolicyConfigToMerged","nonPolicyConfigConflict","handleConfigMerge","allKeys","uniq","Object","keys","otherKeys","filter","key","forEach","policy","depType","depName","name","force","current","other","currentPolicy","otherPolicy","allPolicyKeys","concat","length","pkgName","currentVal","otherVal","baseVal","isEnv","lifecycleToDepType","runtime","dev","peer","hasConfigForDep","find","d","addSerializedDepToPolicy","dep","lifecycle","getAutoDeps","source","idWithoutVersion","__type","existingPolicy","p","dependencyId","getPolicyVer","value","semver","valid","startsWith","currentData","otherData","currentAndOtherData","uniqBy","baseData","depData","currentDep","otherDep","currentId","currentVer","otherVer","baseDep","baseVer","isRange","satisfies","conflictStr","mergedConfigSplit","conflictLines","line","unshift","Boolean","c","toStringWithoutVersion","omit"],"sources":["config-merger.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport semver from 'semver';\nimport { DependencyResolverAspect, isRange, SerializedDependency } from '@teambit/dependency-resolver';\nimport { EnvsAspect } from '@teambit/envs';\nimport { ExtensionDataEntry, ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';\nimport { compact, omit, uniq, uniqBy } from 'lodash';\nimport { ConfigMergeResult } from './config-merge-result';\n\ntype GenericConfigOrRemoved = Record<string, any> | '-';\n\ntype EnvData = { id: string; version?: string; config?: GenericConfigOrRemoved };\n\ntype SerializedDependencyWithPolicy = SerializedDependency & { policy?: string };\n\nexport type MergeStrategyResult = {\n id: string;\n mergedConfig?: GenericConfigOrRemoved;\n conflict?: string;\n};\ntype MergeStrategyParamsWithRemoved = {\n id: string;\n currentConfig: GenericConfigOrRemoved;\n otherConfig: GenericConfigOrRemoved;\n baseConfig?: GenericConfigOrRemoved;\n};\ntype MergeStrategyParams = {\n id: string;\n currentExt: ExtensionDataEntry;\n otherExt: ExtensionDataEntry;\n baseExt?: ExtensionDataEntry;\n};\n\n/**\n * perform 3-way merge of component configuration (aspects).\n * normally this is needed when merging one lane into another. the component may have different aspects config in each lane.\n * the baseAspects are the aspects of the component in the diversion point (the common ancestor of the two lanes).\n * the currentAspects are the aspects of the component in the current lane.\n * the otherAspects are the aspects of the component in the other lane. this is the lane we merge into the current lane.\n *\n * the basic merging strategy is a simple comparison between the aspect-configs, if they're different, we have a conflict.\n * we have two special cases:\n *\n * 1. dependency-resolver: we do a deeper check for the policy, we compare each dependency separately. also, we take\n * into account not only the config, but also the data. this is needed because some dependencies are automatically\n * added by Bit (from the import statements in the code) and they're not in the config. the final config has the deps\n * from both sources, the config and the data. The way we know to differentiate between them is by the \"force\" prop.\n * the config has always force: true.\n *\n * 2. envs: if we don't treat it specially, the user will need to make the change not only in the envs aspect, but also\n * in the deps-resolver (because the env is added as a devDependency) and also in the aspect itself (because\n * teambit.envs/env has only the id and not the version). to make it simpler, we ignore the envs in the deps-resolver\n * we ignore the individual aspect that is the env itself. we only show teambit.envs/env and we put the env id and\n * version. later, when the component is loaded, we split the id and the version and put them in the correct places.\n * see workspace.componentExtension / adjustEnvsOnConfigMerge for more details.\n */\nexport class ConfigMerger {\n private currentEnv: EnvData;\n private otherEnv: EnvData;\n private baseEnv?: EnvData;\n private handledExtIds: string[] = [];\n constructor(\n private compIdStr: string,\n private workspaceIds: ComponentID[],\n private currentAspects: ExtensionDataList,\n private baseAspects: ExtensionDataList,\n private otherAspects: ExtensionDataList,\n private currentLabel: string,\n private otherLabel: string\n ) {}\n\n merge(): ConfigMergeResult {\n this.populateEnvs();\n const results = this.currentAspects.map((currentExt) => {\n const id = currentExt.stringId;\n if (this.handledExtIds.includes(id)) return null;\n this.handledExtIds.push(id);\n const baseExt = this.baseAspects.findExtension(id, true);\n const otherExt = this.otherAspects.findExtension(id, true);\n if (otherExt) {\n // try to 3-way-merge\n return this.mergePerStrategy({ id, currentExt, otherExt, baseExt });\n }\n // exist in current but not in other\n if (baseExt) {\n // was removed on other\n return this.basicConflictGenerator({ id, currentConfig: this.getConfig(currentExt), otherConfig: '-' });\n }\n // exist in current but not in other and base, so it got created on current. nothing to do.\n return null;\n });\n const otherAspectsNotHandledResults = this.otherAspects.map((otherExt) => {\n const id = otherExt.stringId;\n if (this.handledExtIds.includes(id)) return null;\n this.handledExtIds.push(id);\n const baseExt = this.baseAspects.findExtension(id, true);\n if (baseExt) {\n // was removed on current\n return this.basicConflictGenerator({ id, currentConfig: '-', otherConfig: this.getConfig(otherExt) });\n }\n // exist in other but not in current and base, so it got created on other.\n return { id, mergedConfig: this.getConfig(otherExt) };\n });\n const envResult = this.envStrategy();\n return new ConfigMergeResult(this.compIdStr, compact([...results, ...otherAspectsNotHandledResults, envResult]));\n }\n\n private populateEnvs() {\n // populate ids\n const getEnvId = (ext: ExtensionDataList) => {\n const envsAspect = ext.findCoreExtension(EnvsAspect.id);\n if (!envsAspect) throw new Error(`unable to find ${EnvsAspect.id} aspect for ${this.compIdStr}`);\n const env = envsAspect.config.env || envsAspect.data.id;\n if (!env)\n throw new Error(`unable to find env for ${this.compIdStr}, the config and data of ${EnvsAspect.id} are empty}`);\n return env;\n };\n const currentEnv = getEnvId(this.currentAspects);\n this.currentEnv = { id: currentEnv };\n const otherEnv = getEnvId(this.otherAspects);\n this.otherEnv = { id: otherEnv };\n const baseEnv = this.baseAspects ? getEnvId(this.baseAspects) : undefined;\n if (baseEnv) this.baseEnv = { id: baseEnv };\n\n // populate version\n const currentEnvAspect = this.currentAspects.findExtension(currentEnv, true);\n if (currentEnvAspect) {\n this.handledExtIds.push(currentEnvAspect.stringId);\n this.currentEnv.version = currentEnvAspect.extensionId?.version;\n this.currentEnv.config = currentEnvAspect.rawConfig;\n }\n const otherEnvAspect = this.otherAspects.findExtension(otherEnv, true);\n if (otherEnvAspect) {\n this.handledExtIds.push(otherEnvAspect.stringId);\n this.otherEnv.version = otherEnvAspect.extensionId?.version;\n this.otherEnv.config = otherEnvAspect.rawConfig;\n }\n if (this.baseEnv) {\n const baseEnvAspect = this.baseAspects.findExtension(baseEnv, true);\n if (baseEnvAspect) {\n this.baseEnv.version = baseEnvAspect.extensionId?.version;\n this.baseEnv.config = baseEnvAspect.rawConfig;\n }\n }\n }\n\n private envStrategy(): MergeStrategyResult | null {\n const mergeStrategyParams: MergeStrategyParamsWithRemoved = {\n id: EnvsAspect.id,\n currentConfig: {\n env: this.currentEnv.version ? `${this.currentEnv.id}@${this.currentEnv.version}` : this.currentEnv.id,\n },\n otherConfig: { env: this.otherEnv.version ? `${this.otherEnv.id}@${this.otherEnv.version}` : this.otherEnv.id },\n };\n if (this.baseEnv) {\n mergeStrategyParams.baseConfig = {\n env: this.baseEnv?.version ? `${this.baseEnv.id}@${this.baseEnv.version}` : this.baseEnv?.id,\n };\n }\n if (this.currentEnv.id === this.otherEnv.id && this.currentEnv.version === this.otherEnv.version) {\n return null;\n }\n if (this.isIdInWorkspace(this.currentEnv.id)) {\n // the env currently used is part of the workspace, that's what the user needs. don't try to resolve anything.\n return null;\n }\n return this.basicConfigMerge(mergeStrategyParams);\n }\n\n private areConfigsEqual(configA: GenericConfigOrRemoved, configB: GenericConfigOrRemoved) {\n return JSON.stringify(configA) === JSON.stringify(configB);\n }\n\n private mergePerStrategy(mergeStrategyParams: MergeStrategyParams): MergeStrategyResult | null {\n const { id, currentExt, otherExt, baseExt } = mergeStrategyParams;\n const depResolverResult = this.depResolverStrategy(mergeStrategyParams);\n if (depResolverResult) {\n return depResolverResult;\n }\n const currentConfig = this.getConfig(currentExt);\n const otherConfig = this.getConfig(otherExt);\n const baseConfig = baseExt ? this.getConfig(baseExt) : undefined;\n\n return this.basicConfigMerge({ id, currentConfig, otherConfig, baseConfig });\n }\n\n private basicConfigMerge(mergeStrategyParams: MergeStrategyParamsWithRemoved) {\n const { id, currentConfig, otherConfig, baseConfig } = mergeStrategyParams;\n if (this.areConfigsEqual(currentConfig, otherConfig)) {\n return null;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, otherConfig)) {\n // was changed on current\n return null;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, currentConfig)) {\n // was changed on other\n return { id, mergedConfig: otherConfig };\n }\n // either no baseConfig, or baseConfig is also different from both: other and local. that's a conflict.\n const mergeStrategyConfigParams = { id, currentConfig, otherConfig, baseConfig };\n return this.basicConflictGenerator(mergeStrategyConfigParams);\n }\n\n private basicConflictGenerator({\n id,\n currentConfig,\n otherConfig,\n }: MergeStrategyParamsWithRemoved): MergeStrategyResult {\n // uncomment to debug\n // console.log('basicConflictGenerator', this.compIdStr, id, 'currentConfig', currentConfig, 'otherConfig', otherConfig);\n let conflict: string;\n if (currentConfig === '-') {\n conflict = `${'<'.repeat(7)} ${this.currentLabel}\n=======\n\"${id}\": ${JSON.stringify(otherConfig, undefined, 2)}\n${'>'.repeat(7)} ${this.otherLabel}`;\n } else if (otherConfig === '-') {\n conflict = `${'<'.repeat(7)} ${this.currentLabel}\n\"${id}\": ${JSON.stringify(otherConfig, undefined, 2)}\n=======\n${'>'.repeat(7)} ${this.otherLabel}`;\n } else {\n const formatConfig = (conf: GenericConfigOrRemoved) => {\n const confStr = JSON.stringify(conf, undefined, 2);\n const confStrSplit = confStr.split('\\n');\n confStrSplit.shift(); // remove first {\n confStrSplit.pop(); // remove last }\n return confStrSplit.join('\\n');\n };\n conflict = `\"${id}\": {\n${'<'.repeat(7)} ${this.currentLabel}\n${formatConfig(currentConfig)}\n=======\n${formatConfig(otherConfig)}\n${'>'.repeat(7)} ${this.otherLabel}\n}`;\n }\n\n return { id, conflict };\n }\n\n private depResolverStrategy(params: MergeStrategyParams): MergeStrategyResult | undefined {\n if (params.id !== DependencyResolverAspect.id) return undefined;\n const { currentExt, otherExt, baseExt } = params;\n\n const currentConfig = this.getConfig(currentExt);\n const otherConfig = this.getConfig(otherExt);\n const baseConfig = baseExt ? this.getConfig(baseExt) : undefined;\n // const mergeStrategyConfigParams = { id, currentConfig, otherConfig, baseConfig };\n\n const mergedPolicy = {\n dependencies: [],\n devDependencies: [],\n peerDependencies: [],\n };\n const conflictedPolicy = {\n dependencies: [],\n devDependencies: [],\n peerDependencies: [],\n };\n let isMerged = false;\n let hasConflict = false;\n const conflictIndicator = 'CONFLICT::';\n const nonPolicyConfigToMerged = {};\n const nonPolicyConfigConflict = {};\n const handleConfigMerge = () => {\n if (this.areConfigsEqual(currentConfig, otherConfig)) {\n return;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, otherConfig)) {\n // was changed on current\n return;\n }\n if (currentConfig === '-' || otherConfig === '-') {\n throw new Error('not implemented. Is it possible to have it as minus?');\n }\n const allKeys = uniq([...Object.keys(currentConfig), ...Object.keys(otherConfig)]);\n const otherKeys = allKeys.filter((key) => key !== 'policy');\n if (baseConfig && this.areConfigsEqual(baseConfig, currentConfig)) {\n // was changed on other\n otherKeys.forEach((key) => {\n if (otherConfig[key]) {\n nonPolicyConfigToMerged[key] = otherConfig[key];\n }\n });\n if (otherConfig.policy) {\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n if (!otherConfig.policy[depType]) return;\n Object.keys(otherConfig.policy[depType]).forEach((depName) => {\n mergedPolicy[depType].push({\n name: depName,\n version: otherConfig.policy[depType][depName],\n force: true,\n });\n });\n });\n }\n isMerged = true;\n return;\n }\n\n // either no baseConfig, or baseConfig is also different from both: other and local. that's a conflict.\n // we have to differentiate between a conflict in the policy, which might be merged with conflict with dependencies data.\n // and a conflict with other fields of config.\n otherKeys.forEach((key) => {\n if (JSON.stringify(currentConfig[key]) === JSON.stringify(otherConfig[key])) {\n return;\n }\n if (baseConfig && JSON.stringify(baseConfig[key]) === JSON.stringify(otherConfig[key])) {\n // was changed on current\n return;\n }\n if (baseConfig && JSON.stringify(baseConfig[key]) === JSON.stringify(currentConfig[key])) {\n // was changed on other\n nonPolicyConfigToMerged[key] = otherConfig[key];\n return;\n }\n // conflict\n nonPolicyConfigConflict[key] = { current: currentConfig[key], other: otherConfig[key] };\n });\n\n if (!currentConfig.policy && !otherConfig.policy) return;\n\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n const currentPolicy = currentConfig.policy?.[depType];\n const otherPolicy = otherConfig.policy?.[depType];\n const allPolicyKeys = uniq(Object.keys(currentPolicy || {}).concat(Object.keys(otherPolicy || {})));\n if (!allPolicyKeys.length) return;\n\n allPolicyKeys.forEach((pkgName) => {\n const currentVal = currentPolicy?.[pkgName];\n const otherVal = otherPolicy?.[pkgName];\n const baseVal = baseConfig !== '-' && baseConfig?.policy?.[depType]?.[pkgName];\n if (this.isEnv(pkgName)) {\n // ignore the envs\n return;\n }\n if (currentVal === otherVal) {\n // mergedPolicy[depType][pkgName] = currentVal;\n return;\n }\n if (baseVal === otherVal) {\n // mergedPolicy[depType][pkgName] = currentVal;\n return;\n }\n if (baseVal === currentVal) {\n mergedPolicy[depType].push({\n name: pkgName,\n version: otherVal,\n force: true,\n });\n isMerged = true;\n return;\n }\n // either no baseVal, or baseVal is also different from both: other and local. that's a conflict.\n hasConflict = true;\n conflictedPolicy[depType].push({\n name: pkgName,\n version: `${conflictIndicator}${currentVal}::${otherVal}::`,\n force: true,\n });\n });\n });\n };\n\n handleConfigMerge();\n\n const lifecycleToDepType = {\n runtime: 'dependencies',\n dev: 'devDependencies',\n peer: 'peerDependencies',\n };\n const hasConfigForDep = (depType: string, depName: string) => mergedPolicy[depType].find((d) => d.name === depName);\n const addSerializedDepToPolicy = (dep: SerializedDependencyWithPolicy) => {\n const depType = lifecycleToDepType[dep.lifecycle];\n\n if (hasConfigForDep(depType, dep.id)) {\n return; // there is already config for it.\n }\n mergedPolicy[depType].push({\n name: dep.id,\n version: dep.policy || dep.version,\n force: false,\n });\n isMerged = true;\n };\n\n const getAutoDeps = (ext: ExtensionDataList): SerializedDependencyWithPolicy[] => {\n const data = ext.findCoreExtension(DependencyResolverAspect.id)?.data.dependencies;\n if (!data) return [];\n const policy = ext.findCoreExtension(DependencyResolverAspect.id)?.data.policy || [];\n return data\n .filter((d) => d.source === 'auto')\n .map((d) => {\n const idWithoutVersion = d.__type === 'package' ? d.id : d.id.split('@')[0];\n const existingPolicy = policy.find((p) => p.dependencyId === idWithoutVersion);\n const getPolicyVer = () => {\n if (d.__type === 'package') return undefined; // for packages, the policy is already the version\n if (existingPolicy) return existingPolicy.value.version; // currently it's missing, will be implemented by @Gilad\n if (!semver.valid(d.version)) return d.version; // could be a hash\n // default to `^` or ~ if starts with zero, until we save the policy from the workspace during tag/snap.\n return d.version.startsWith('0.') ? `~${d.version}` : `^${d.version}`;\n };\n return {\n ...d,\n id: idWithoutVersion,\n policy: getPolicyVer(),\n };\n });\n };\n\n const currentData = getAutoDeps(this.currentAspects);\n const otherData = getAutoDeps(this.otherAspects);\n const currentAndOtherData = uniqBy(currentData.concat(otherData), (d) => d.id);\n const baseData = getAutoDeps(this.baseAspects);\n\n // uncomment to debug\n // console.log('\\n\\n**************', this.compIdStr, '**************');\n // console.log('currentData', currentData.length, '\\n', currentData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('otherData', otherData.length, '\\n', otherData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('otherData', baseData.length, '\\n', baseData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('** END **\\n\\n');\n\n currentAndOtherData.forEach((depData) => {\n if (this.isEnv(depData.id)) {\n // ignore the envs\n return;\n }\n const currentDep = currentData.find((d) => d.id === depData.id);\n const otherDep = otherData.find((d) => d.id === depData.id);\n if (!otherDep) {\n return;\n }\n if (!currentDep) {\n // only on other\n addSerializedDepToPolicy(otherDep);\n return;\n }\n const currentId = currentDep.id;\n const currentVer = currentDep.policy || currentDep.version;\n const otherVer = otherDep.policy || otherDep.version;\n if (currentVer === otherVer) {\n return;\n }\n const baseDep = baseData.find((d) => d.id === currentId);\n const baseVer = baseDep?.policy || baseDep?.version;\n if (baseVer && baseVer === otherVer) {\n return;\n }\n if (currentDep.__type === 'component' && this.isIdInWorkspace(currentId)) {\n // dependencies that exist in the workspace, should be ignored. they'll be resolved later to the version in the ws.\n return;\n }\n if (baseVer && baseVer === currentVer) {\n addSerializedDepToPolicy(otherDep);\n return;\n }\n // either no baseVal, or baseVal is also different from both: other and local. that's probably a conflict.\n const depType = lifecycleToDepType[currentDep.lifecycle];\n if (hasConfigForDep(depType, currentDep.id)) {\n return; // there is already config for it.\n }\n // try to resolve according to semver\n if (\n currentDep.policy &&\n otherDep.policy &&\n isRange(currentDep.policy, currentDep.id) &&\n isRange(otherDep.policy, otherDep.id)\n ) {\n if (semver.satisfies(currentDep.version, otherDep.policy)) {\n return;\n }\n if (semver.satisfies(otherDep.version, currentDep.policy)) {\n addSerializedDepToPolicy(otherDep);\n return;\n }\n }\n hasConflict = true;\n conflictedPolicy[depType].push({\n name: currentDep.id,\n version: `${conflictIndicator}${currentVer}::${otherVer}::`,\n force: false,\n });\n });\n\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n if (!mergedPolicy[depType].length) delete mergedPolicy[depType];\n if (!conflictedPolicy[depType].length) delete conflictedPolicy[depType];\n });\n\n let conflictStr: string | undefined;\n if (hasConflict) {\n const mergedConfigSplit = JSON.stringify({ policy: conflictedPolicy }, undefined, 2).split('\\n');\n const conflictLines = mergedConfigSplit.map((line) => {\n if (!line.includes(conflictIndicator)) return line;\n const [, currentVal, otherVal] = line.split('::');\n return `${'<'.repeat(7)} ${this.currentLabel}\n \"version\": \"${currentVal}\",\n=======\n \"version\": \"${otherVal}\",\n${'>'.repeat(7)} ${this.otherLabel}`;\n });\n // replace the first line with line with the id\n conflictLines.shift();\n conflictLines.unshift(`\"${params.id}\": {`);\n conflictStr = conflictLines.join('\\n');\n }\n const config = isMerged ? { ...nonPolicyConfigToMerged, policy: mergedPolicy } : undefined;\n\n return { id: params.id, mergedConfig: config, conflict: conflictStr };\n }\n\n private isIdInWorkspace(id: string): boolean {\n return Boolean(this.workspaceIds.find((c) => c.toStringWithoutVersion() === id));\n }\n\n private isEnv(id: string) {\n return id === this.currentEnv.id || id === this.otherEnv.id;\n }\n\n private getConfig(ext: ExtensionDataEntry) {\n if (ext.rawConfig === '-') return ext.rawConfig;\n return omit(ext.rawConfig, ['__specific']);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0D;AAAA;AA0B1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,YAAY,CAAC;EAKxBC,WAAW,CACDC,SAAiB,EACjBC,YAA2B,EAC3BC,cAAiC,EACjCC,WAA8B,EAC9BC,YAA+B,EAC/BC,YAAoB,EACpBC,UAAkB,EAC1B;IAAA,KAPQN,SAAiB,GAAjBA,SAAiB;IAAA,KACjBC,YAA2B,GAA3BA,YAA2B;IAAA,KAC3BC,cAAiC,GAAjCA,cAAiC;IAAA,KACjCC,WAA8B,GAA9BA,WAA8B;IAAA,KAC9BC,YAA+B,GAA/BA,YAA+B;IAAA,KAC/BC,YAAoB,GAApBA,YAAoB;IAAA,KACpBC,UAAkB,GAAlBA,UAAkB;IAAA;IAAA;IAAA;IAAA,uDARM,EAAE;EASjC;EAEHC,KAAK,GAAsB;IACzB,IAAI,CAACC,YAAY,EAAE;IACnB,MAAMC,OAAO,GAAG,IAAI,CAACP,cAAc,CAACQ,GAAG,CAAEC,UAAU,IAAK;MACtD,MAAMC,EAAE,GAAGD,UAAU,CAACE,QAAQ;MAC9B,IAAI,IAAI,CAACC,aAAa,CAACC,QAAQ,CAACH,EAAE,CAAC,EAAE,OAAO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,IAAIA,GAAG,CAACe,SAAS,KAAK,GAAG,EAAE,OAAOf,GAAG,CAACe,SAAS;IAC/C,OAAO,IAAA4G,cAAI,EAAC3H,GAAG,CAACe,SAAS,EAAE,CAAC,YAAY,CAAC,CAAC;EAC5C;AACF;AAAC"}
1
+ {"version":3,"names":["ConfigMerger","constructor","compIdStr","workspaceIds","currentAspects","baseAspects","otherAspects","currentLabel","otherLabel","merge","populateEnvs","results","map","currentExt","id","stringId","handledExtIds","includes","push","baseExt","findExtension","otherExt","mergePerStrategy","basicConflictGenerator","currentConfig","getConfig","otherConfig","otherAspectsNotHandledResults","mergedConfig","envResult","envStrategy","ConfigMergeResult","compact","getEnvId","ext","envsAspect","findCoreExtension","EnvsAspect","Error","env","config","data","currentEnv","otherEnv","baseEnv","undefined","currentEnvAspect","version","extensionId","rawConfig","otherEnvAspect","baseEnvAspect","mergeStrategyParams","baseConfig","isIdInWorkspace","basicConfigMerge","areConfigsEqual","configA","configB","JSON","stringify","depResolverResult","depResolverStrategy","mergeStrategyConfigParams","conflict","repeat","formatConfig","conf","confStr","confStrSplit","split","shift","pop","join","params","DependencyResolverAspect","mergedPolicy","dependencies","devDependencies","peerDependencies","conflictedPolicy","isMerged","hasConflict","conflictIndicator","nonPolicyConfigToMerged","nonPolicyConfigConflict","handleConfigMerge","allKeys","uniq","Object","keys","otherKeys","filter","key","forEach","policy","depType","depName","name","force","current","other","currentPolicy","otherPolicy","allPolicyKeys","concat","length","pkgName","currentVal","otherVal","baseVal","isEnv","lifecycleToDepType","runtime","dev","peer","hasConfigForDep","find","d","getDepIdAsPkgName","dep","__type","packageName","addSerializedDepToPolicy","lifecycle","getAutoDeps","source","idWithoutVersion","existingPolicy","p","dependencyId","getPolicyVer","value","semver","valid","startsWith","currentData","otherData","currentAndOtherData","uniqBy","baseData","depData","currentDep","otherDep","currentId","currentVer","otherVer","baseDep","baseVer","isRange","satisfies","conflictStr","mergedConfigSplit","conflictLines","line","unshift","Boolean","c","toStringWithoutVersion","omit"],"sources":["config-merger.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport semver from 'semver';\nimport { DependencyResolverAspect, isRange, SerializedDependency } from '@teambit/dependency-resolver';\nimport { EnvsAspect } from '@teambit/envs';\nimport { ExtensionDataEntry, ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';\nimport { compact, omit, uniq, uniqBy } from 'lodash';\nimport { ConfigMergeResult } from './config-merge-result';\n\ntype GenericConfigOrRemoved = Record<string, any> | '-';\n\ntype EnvData = { id: string; version?: string; config?: GenericConfigOrRemoved };\n\ntype SerializedDependencyWithPolicy = SerializedDependency & { policy?: string };\n\nexport type MergeStrategyResult = {\n id: string;\n mergedConfig?: GenericConfigOrRemoved;\n conflict?: string;\n};\ntype MergeStrategyParamsWithRemoved = {\n id: string;\n currentConfig: GenericConfigOrRemoved;\n otherConfig: GenericConfigOrRemoved;\n baseConfig?: GenericConfigOrRemoved;\n};\ntype MergeStrategyParams = {\n id: string;\n currentExt: ExtensionDataEntry;\n otherExt: ExtensionDataEntry;\n baseExt?: ExtensionDataEntry;\n};\n\n/**\n * perform 3-way merge of component configuration (aspects).\n * normally this is needed when merging one lane into another. the component may have different aspects config in each lane.\n * the baseAspects are the aspects of the component in the diversion point (the common ancestor of the two lanes).\n * the currentAspects are the aspects of the component in the current lane.\n * the otherAspects are the aspects of the component in the other lane. this is the lane we merge into the current lane.\n *\n * the basic merging strategy is a simple comparison between the aspect-configs, if they're different, we have a conflict.\n * we have two special cases:\n *\n * 1. dependency-resolver: we do a deeper check for the policy, we compare each dependency separately. also, we take\n * into account not only the config, but also the data. this is needed because some dependencies are automatically\n * added by Bit (from the import statements in the code) and they're not in the config. the final config has the deps\n * from both sources, the config and the data. The way we know to differentiate between them is by the \"force\" prop.\n * the config has always force: true.\n *\n * 2. envs: if we don't treat it specially, the user will need to make the change not only in the envs aspect, but also\n * in the deps-resolver (because the env is added as a devDependency) and also in the aspect itself (because\n * teambit.envs/env has only the id and not the version). to make it simpler, we ignore the envs in the deps-resolver\n * we ignore the individual aspect that is the env itself. we only show teambit.envs/env and we put the env id and\n * version. later, when the component is loaded, we split the id and the version and put them in the correct places.\n * see workspace.componentExtension / adjustEnvsOnConfigMerge for more details.\n */\nexport class ConfigMerger {\n private currentEnv: EnvData;\n private otherEnv: EnvData;\n private baseEnv?: EnvData;\n private handledExtIds: string[] = [];\n constructor(\n private compIdStr: string,\n private workspaceIds: ComponentID[],\n private currentAspects: ExtensionDataList,\n private baseAspects: ExtensionDataList,\n private otherAspects: ExtensionDataList,\n private currentLabel: string,\n private otherLabel: string\n ) {}\n\n merge(): ConfigMergeResult {\n this.populateEnvs();\n const results = this.currentAspects.map((currentExt) => {\n const id = currentExt.stringId;\n if (this.handledExtIds.includes(id)) return null;\n this.handledExtIds.push(id);\n const baseExt = this.baseAspects.findExtension(id, true);\n const otherExt = this.otherAspects.findExtension(id, true);\n if (otherExt) {\n // try to 3-way-merge\n return this.mergePerStrategy({ id, currentExt, otherExt, baseExt });\n }\n // exist in current but not in other\n if (baseExt) {\n // was removed on other\n return this.basicConflictGenerator({ id, currentConfig: this.getConfig(currentExt), otherConfig: '-' });\n }\n // exist in current but not in other and base, so it got created on current. nothing to do.\n return null;\n });\n const otherAspectsNotHandledResults = this.otherAspects.map((otherExt) => {\n const id = otherExt.stringId;\n if (this.handledExtIds.includes(id)) return null;\n this.handledExtIds.push(id);\n const baseExt = this.baseAspects.findExtension(id, true);\n if (baseExt) {\n // was removed on current\n return this.basicConflictGenerator({ id, currentConfig: '-', otherConfig: this.getConfig(otherExt) });\n }\n // exist in other but not in current and base, so it got created on other.\n return { id, mergedConfig: this.getConfig(otherExt) };\n });\n const envResult = this.envStrategy();\n return new ConfigMergeResult(this.compIdStr, compact([...results, ...otherAspectsNotHandledResults, envResult]));\n }\n\n private populateEnvs() {\n // populate ids\n const getEnvId = (ext: ExtensionDataList) => {\n const envsAspect = ext.findCoreExtension(EnvsAspect.id);\n if (!envsAspect) throw new Error(`unable to find ${EnvsAspect.id} aspect for ${this.compIdStr}`);\n const env = envsAspect.config.env || envsAspect.data.id;\n if (!env)\n throw new Error(`unable to find env for ${this.compIdStr}, the config and data of ${EnvsAspect.id} are empty}`);\n return env;\n };\n const currentEnv = getEnvId(this.currentAspects);\n this.currentEnv = { id: currentEnv };\n const otherEnv = getEnvId(this.otherAspects);\n this.otherEnv = { id: otherEnv };\n const baseEnv = this.baseAspects ? getEnvId(this.baseAspects) : undefined;\n if (baseEnv) this.baseEnv = { id: baseEnv };\n\n // populate version\n const currentEnvAspect = this.currentAspects.findExtension(currentEnv, true);\n if (currentEnvAspect) {\n this.handledExtIds.push(currentEnvAspect.stringId);\n this.currentEnv.version = currentEnvAspect.extensionId?.version;\n this.currentEnv.config = currentEnvAspect.rawConfig;\n }\n const otherEnvAspect = this.otherAspects.findExtension(otherEnv, true);\n if (otherEnvAspect) {\n this.handledExtIds.push(otherEnvAspect.stringId);\n this.otherEnv.version = otherEnvAspect.extensionId?.version;\n this.otherEnv.config = otherEnvAspect.rawConfig;\n }\n if (this.baseEnv) {\n const baseEnvAspect = this.baseAspects.findExtension(baseEnv, true);\n if (baseEnvAspect) {\n this.baseEnv.version = baseEnvAspect.extensionId?.version;\n this.baseEnv.config = baseEnvAspect.rawConfig;\n }\n }\n }\n\n private envStrategy(): MergeStrategyResult | null {\n const mergeStrategyParams: MergeStrategyParamsWithRemoved = {\n id: EnvsAspect.id,\n currentConfig: {\n env: this.currentEnv.version ? `${this.currentEnv.id}@${this.currentEnv.version}` : this.currentEnv.id,\n },\n otherConfig: { env: this.otherEnv.version ? `${this.otherEnv.id}@${this.otherEnv.version}` : this.otherEnv.id },\n };\n if (this.baseEnv) {\n mergeStrategyParams.baseConfig = {\n env: this.baseEnv?.version ? `${this.baseEnv.id}@${this.baseEnv.version}` : this.baseEnv?.id,\n };\n }\n if (this.currentEnv.id === this.otherEnv.id && this.currentEnv.version === this.otherEnv.version) {\n return null;\n }\n if (this.isIdInWorkspace(this.currentEnv.id)) {\n // the env currently used is part of the workspace, that's what the user needs. don't try to resolve anything.\n return null;\n }\n return this.basicConfigMerge(mergeStrategyParams);\n }\n\n private areConfigsEqual(configA: GenericConfigOrRemoved, configB: GenericConfigOrRemoved) {\n return JSON.stringify(configA) === JSON.stringify(configB);\n }\n\n private mergePerStrategy(mergeStrategyParams: MergeStrategyParams): MergeStrategyResult | null {\n const { id, currentExt, otherExt, baseExt } = mergeStrategyParams;\n const depResolverResult = this.depResolverStrategy(mergeStrategyParams);\n if (depResolverResult) {\n return depResolverResult;\n }\n const currentConfig = this.getConfig(currentExt);\n const otherConfig = this.getConfig(otherExt);\n const baseConfig = baseExt ? this.getConfig(baseExt) : undefined;\n\n return this.basicConfigMerge({ id, currentConfig, otherConfig, baseConfig });\n }\n\n private basicConfigMerge(mergeStrategyParams: MergeStrategyParamsWithRemoved) {\n const { id, currentConfig, otherConfig, baseConfig } = mergeStrategyParams;\n if (this.areConfigsEqual(currentConfig, otherConfig)) {\n return null;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, otherConfig)) {\n // was changed on current\n return null;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, currentConfig)) {\n // was changed on other\n return { id, mergedConfig: otherConfig };\n }\n // either no baseConfig, or baseConfig is also different from both: other and local. that's a conflict.\n const mergeStrategyConfigParams = { id, currentConfig, otherConfig, baseConfig };\n return this.basicConflictGenerator(mergeStrategyConfigParams);\n }\n\n private basicConflictGenerator({\n id,\n currentConfig,\n otherConfig,\n }: MergeStrategyParamsWithRemoved): MergeStrategyResult {\n // uncomment to debug\n // console.log('basicConflictGenerator', this.compIdStr, id, 'currentConfig', currentConfig, 'otherConfig', otherConfig);\n let conflict: string;\n if (currentConfig === '-') {\n conflict = `${'<'.repeat(7)} ${this.currentLabel}\n=======\n\"${id}\": ${JSON.stringify(otherConfig, undefined, 2)}\n${'>'.repeat(7)} ${this.otherLabel}`;\n } else if (otherConfig === '-') {\n conflict = `${'<'.repeat(7)} ${this.currentLabel}\n\"${id}\": ${JSON.stringify(otherConfig, undefined, 2)}\n=======\n${'>'.repeat(7)} ${this.otherLabel}`;\n } else {\n const formatConfig = (conf: GenericConfigOrRemoved) => {\n const confStr = JSON.stringify(conf, undefined, 2);\n const confStrSplit = confStr.split('\\n');\n confStrSplit.shift(); // remove first {\n confStrSplit.pop(); // remove last }\n return confStrSplit.join('\\n');\n };\n conflict = `\"${id}\": {\n${'<'.repeat(7)} ${this.currentLabel}\n${formatConfig(currentConfig)}\n=======\n${formatConfig(otherConfig)}\n${'>'.repeat(7)} ${this.otherLabel}\n}`;\n }\n\n return { id, conflict };\n }\n\n private depResolverStrategy(params: MergeStrategyParams): MergeStrategyResult | undefined {\n if (params.id !== DependencyResolverAspect.id) return undefined;\n const { currentExt, otherExt, baseExt } = params;\n\n const currentConfig = this.getConfig(currentExt);\n const otherConfig = this.getConfig(otherExt);\n const baseConfig = baseExt ? this.getConfig(baseExt) : undefined;\n // const mergeStrategyConfigParams = { id, currentConfig, otherConfig, baseConfig };\n\n const mergedPolicy = {\n dependencies: [],\n devDependencies: [],\n peerDependencies: [],\n };\n const conflictedPolicy = {\n dependencies: [],\n devDependencies: [],\n peerDependencies: [],\n };\n let isMerged = false;\n let hasConflict = false;\n const conflictIndicator = 'CONFLICT::';\n const nonPolicyConfigToMerged = {};\n const nonPolicyConfigConflict = {};\n const handleConfigMerge = () => {\n if (this.areConfigsEqual(currentConfig, otherConfig)) {\n return;\n }\n if (baseConfig && this.areConfigsEqual(baseConfig, otherConfig)) {\n // was changed on current\n return;\n }\n if (currentConfig === '-' || otherConfig === '-') {\n throw new Error('not implemented. Is it possible to have it as minus?');\n }\n const allKeys = uniq([...Object.keys(currentConfig), ...Object.keys(otherConfig)]);\n const otherKeys = allKeys.filter((key) => key !== 'policy');\n if (baseConfig && this.areConfigsEqual(baseConfig, currentConfig)) {\n // was changed on other\n otherKeys.forEach((key) => {\n if (otherConfig[key]) {\n nonPolicyConfigToMerged[key] = otherConfig[key];\n }\n });\n if (otherConfig.policy) {\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n if (!otherConfig.policy[depType]) return;\n Object.keys(otherConfig.policy[depType]).forEach((depName) => {\n mergedPolicy[depType].push({\n name: depName,\n version: otherConfig.policy[depType][depName],\n force: true,\n });\n });\n });\n }\n isMerged = true;\n return;\n }\n\n // either no baseConfig, or baseConfig is also different from both: other and local. that's a conflict.\n // we have to differentiate between a conflict in the policy, which might be merged with conflict with dependencies data.\n // and a conflict with other fields of config.\n otherKeys.forEach((key) => {\n if (JSON.stringify(currentConfig[key]) === JSON.stringify(otherConfig[key])) {\n return;\n }\n if (baseConfig && JSON.stringify(baseConfig[key]) === JSON.stringify(otherConfig[key])) {\n // was changed on current\n return;\n }\n if (baseConfig && JSON.stringify(baseConfig[key]) === JSON.stringify(currentConfig[key])) {\n // was changed on other\n nonPolicyConfigToMerged[key] = otherConfig[key];\n return;\n }\n // conflict\n nonPolicyConfigConflict[key] = { current: currentConfig[key], other: otherConfig[key] };\n });\n\n if (!currentConfig.policy && !otherConfig.policy) return;\n\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n const currentPolicy = currentConfig.policy?.[depType];\n const otherPolicy = otherConfig.policy?.[depType];\n const allPolicyKeys = uniq(Object.keys(currentPolicy || {}).concat(Object.keys(otherPolicy || {})));\n if (!allPolicyKeys.length) return;\n\n allPolicyKeys.forEach((pkgName) => {\n const currentVal = currentPolicy?.[pkgName];\n const otherVal = otherPolicy?.[pkgName];\n const baseVal = baseConfig !== '-' && baseConfig?.policy?.[depType]?.[pkgName];\n if (this.isEnv(pkgName)) {\n // ignore the envs\n return;\n }\n if (currentVal === otherVal) {\n // mergedPolicy[depType][pkgName] = currentVal;\n return;\n }\n if (baseVal === otherVal) {\n // mergedPolicy[depType][pkgName] = currentVal;\n return;\n }\n if (baseVal === currentVal) {\n mergedPolicy[depType].push({\n name: pkgName,\n version: otherVal,\n force: true,\n });\n isMerged = true;\n return;\n }\n // either no baseVal, or baseVal is also different from both: other and local. that's a conflict.\n hasConflict = true;\n conflictedPolicy[depType].push({\n name: pkgName,\n version: `${conflictIndicator}${currentVal}::${otherVal}::`,\n force: true,\n });\n });\n });\n };\n\n handleConfigMerge();\n\n const lifecycleToDepType = {\n runtime: 'dependencies',\n dev: 'devDependencies',\n peer: 'peerDependencies',\n };\n const hasConfigForDep = (depType: string, depName: string) => mergedPolicy[depType].find((d) => d.name === depName);\n const getDepIdAsPkgName = (dep: SerializedDependencyWithPolicy) => {\n if (dep.__type !== 'component') {\n return dep.id;\n }\n // @ts-ignore\n return dep.packageName;\n };\n\n const addSerializedDepToPolicy = (dep: SerializedDependencyWithPolicy) => {\n const depType = lifecycleToDepType[dep.lifecycle];\n\n if (hasConfigForDep(depType, dep.id)) {\n return; // there is already config for it.\n }\n mergedPolicy[depType].push({\n name: getDepIdAsPkgName(dep),\n version: dep.policy || dep.version,\n force: false,\n });\n isMerged = true;\n };\n\n const getAutoDeps = (ext: ExtensionDataList): SerializedDependencyWithPolicy[] => {\n const data = ext.findCoreExtension(DependencyResolverAspect.id)?.data.dependencies;\n if (!data) return [];\n const policy = ext.findCoreExtension(DependencyResolverAspect.id)?.data.policy || [];\n return data\n .filter((d) => d.source === 'auto')\n .map((d) => {\n const idWithoutVersion = d.__type === 'package' ? d.id : d.id.split('@')[0];\n const existingPolicy = policy.find((p) => p.dependencyId === idWithoutVersion);\n const getPolicyVer = () => {\n if (d.__type === 'package') return undefined; // for packages, the policy is already the version\n if (existingPolicy) return existingPolicy.value.version; // currently it's missing, will be implemented by @Gilad\n if (!semver.valid(d.version)) return d.version; // could be a hash\n // default to `^` or ~ if starts with zero, until we save the policy from the workspace during tag/snap.\n return d.version.startsWith('0.') ? `~${d.version}` : `^${d.version}`;\n };\n return {\n ...d,\n id: idWithoutVersion,\n policy: getPolicyVer(),\n };\n });\n };\n\n const currentData = getAutoDeps(this.currentAspects);\n const otherData = getAutoDeps(this.otherAspects);\n const currentAndOtherData = uniqBy(currentData.concat(otherData), (d) => d.id);\n const baseData = getAutoDeps(this.baseAspects);\n\n // uncomment to debug\n // console.log('\\n\\n**************', this.compIdStr, '**************');\n // console.log('currentData', currentData.length, '\\n', currentData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('otherData', otherData.length, '\\n', otherData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('otherData', baseData.length, '\\n', baseData.map((d) => `${d.__type} ${d.id} ${d.version}`).join('\\n'));\n // console.log('** END **\\n\\n');\n\n currentAndOtherData.forEach((depData) => {\n if (this.isEnv(depData.id)) {\n // ignore the envs\n return;\n }\n const currentDep = currentData.find((d) => d.id === depData.id);\n const otherDep = otherData.find((d) => d.id === depData.id);\n if (!otherDep) {\n return;\n }\n if (!currentDep) {\n // only on other\n addSerializedDepToPolicy(otherDep);\n return;\n }\n const currentId = currentDep.id;\n const currentVer = currentDep.policy || currentDep.version;\n const otherVer = otherDep.policy || otherDep.version;\n if (currentVer === otherVer) {\n return;\n }\n const baseDep = baseData.find((d) => d.id === currentId);\n const baseVer = baseDep?.policy || baseDep?.version;\n if (baseVer && baseVer === otherVer) {\n return;\n }\n if (currentDep.__type === 'component' && this.isIdInWorkspace(currentId)) {\n // dependencies that exist in the workspace, should be ignored. they'll be resolved later to the version in the ws.\n return;\n }\n if (baseVer && baseVer === currentVer) {\n addSerializedDepToPolicy(otherDep);\n return;\n }\n // either no baseVal, or baseVal is also different from both: other and local. that's probably a conflict.\n const depType = lifecycleToDepType[currentDep.lifecycle];\n if (hasConfigForDep(depType, currentDep.id)) {\n return; // there is already config for it.\n }\n // try to resolve according to semver\n if (\n currentDep.policy &&\n otherDep.policy &&\n isRange(currentDep.policy, currentDep.id) &&\n isRange(otherDep.policy, otherDep.id)\n ) {\n if (semver.satisfies(currentDep.version, otherDep.policy)) {\n return;\n }\n if (semver.satisfies(otherDep.version, currentDep.policy)) {\n addSerializedDepToPolicy(otherDep);\n return;\n }\n }\n hasConflict = true;\n conflictedPolicy[depType].push({\n name: getDepIdAsPkgName(currentDep),\n version: `${conflictIndicator}${currentVer}::${otherVer}::`,\n force: false,\n });\n });\n\n ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {\n if (!mergedPolicy[depType].length) delete mergedPolicy[depType];\n if (!conflictedPolicy[depType].length) delete conflictedPolicy[depType];\n });\n\n let conflictStr: string | undefined;\n if (hasConflict) {\n const mergedConfigSplit = JSON.stringify({ policy: conflictedPolicy }, undefined, 2).split('\\n');\n const conflictLines = mergedConfigSplit.map((line) => {\n if (!line.includes(conflictIndicator)) return line;\n const [, currentVal, otherVal] = line.split('::');\n return `${'<'.repeat(7)} ${this.currentLabel}\n \"version\": \"${currentVal}\",\n=======\n \"version\": \"${otherVal}\",\n${'>'.repeat(7)} ${this.otherLabel}`;\n });\n // replace the first line with line with the id\n conflictLines.shift();\n conflictLines.unshift(`\"${params.id}\": {`);\n conflictStr = conflictLines.join('\\n');\n }\n const config = isMerged ? { ...nonPolicyConfigToMerged, policy: mergedPolicy } : undefined;\n\n return { id: params.id, mergedConfig: config, conflict: conflictStr };\n }\n\n private isIdInWorkspace(id: string): boolean {\n return Boolean(this.workspaceIds.find((c) => c.toStringWithoutVersion() === id));\n }\n\n private isEnv(id: string) {\n return id === this.currentEnv.id || id === this.otherEnv.id;\n }\n\n private getConfig(ext: ExtensionDataEntry) {\n if (ext.rawConfig === '-') return ext.rawConfig;\n return omit(ext.rawConfig, ['__specific']);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0D;AAAA;AA0B1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AAsBqG,UAAW;AACjC;AACA,sBAAsBC,QAAS;AAC/B,EAAE,GAAG,CAAC5C,MAAM,CAAC,CAAC,CAAE,IAAG,IAAI,CAACzD,UAAW,EAAC;MAC9B,CAAC,CAAC;MACF;MACAiJ,aAAa,CAAClF,KAAK,EAAE;MACrBkF,aAAa,CAACE,OAAO,CAAE,IAAGjF,MAAM,CAAC5D,EAAG,MAAK,CAAC;MAC1CyI,WAAW,GAAGE,aAAa,CAAChF,IAAI,CAAC,IAAI,CAAC;IACxC;IACA,MAAMjC,MAAM,GAAGyC,QAAQ,mCAAQG,uBAAuB;MAAEW,MAAM,EAAEnB;IAAY,KAAK/B,SAAS;IAE1F,OAAO;MAAE/B,EAAE,EAAE4D,MAAM,CAAC5D,EAAE;MAAEc,YAAY,EAAEY,MAAM;MAAEwB,QAAQ,EAAEuF;IAAY,CAAC;EACvE;EAEQjG,eAAe,CAACxC,EAAU,EAAW;IAC3C,OAAO8I,OAAO,CAAC,IAAI,CAACzJ,YAAY,CAACkH,IAAI,CAAEwC,CAAC,IAAKA,CAAC,CAACC,sBAAsB,EAAE,KAAKhJ,EAAE,CAAC,CAAC;EAClF;EAEQiG,KAAK,CAACjG,EAAU,EAAE;IACxB,OAAOA,EAAE,KAAK,IAAI,CAAC4B,UAAU,CAAC5B,EAAE,IAAIA,EAAE,KAAK,IAAI,CAAC6B,QAAQ,CAAC7B,EAAE;EAC7D;EAEQW,SAAS,CAACS,GAAuB,EAAE;IACzC,IAAIA,GAAG,CAACe,SAAS,KAAK,GAAG,EAAE,OAAOf,GAAG,CAACe,SAAS;IAC/C,OAAO,IAAA8G,cAAI,EAAC7H,GAAG,CAACe,SAAS,EAAE,CAAC,YAAY,CAAC,CAAC;EAC5C;AACF;AAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/merging",
3
- "version": "0.0.253",
3
+ "version": "0.0.255",
4
4
  "homepage": "https://bit.dev/teambit/component/merging",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "merging",
9
- "version": "0.0.253"
9
+ "version": "0.0.255"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -19,16 +19,16 @@
19
19
  "@babel/runtime": "7.20.0",
20
20
  "@teambit/harmony": "0.4.6",
21
21
  "@teambit/component-id": "0.0.425",
22
- "@teambit/dependency-resolver": "0.0.938",
23
- "@teambit/envs": "0.0.938",
22
+ "@teambit/dependency-resolver": "0.0.940",
23
+ "@teambit/envs": "0.0.940",
24
24
  "@teambit/bit-error": "0.0.402",
25
- "@teambit/cli": "0.0.629",
26
- "@teambit/checkout": "0.0.107",
27
- "@teambit/install": "0.0.76",
28
- "@teambit/lane-id": "0.0.147",
29
- "@teambit/logger": "0.0.722",
30
- "@teambit/snapping": "0.0.253",
31
- "@teambit/workspace": "0.0.938"
25
+ "@teambit/cli": "0.0.630",
26
+ "@teambit/checkout": "0.0.109",
27
+ "@teambit/install": "0.0.78",
28
+ "@teambit/lane-id": "0.0.148",
29
+ "@teambit/logger": "0.0.723",
30
+ "@teambit/snapping": "0.0.255",
31
+ "@teambit/workspace": "0.0.940"
32
32
  },
33
33
  "devDependencies": {
34
34
  "chai": "4.3.0",
@@ -44,7 +44,7 @@
44
44
  "@types/testing-library__jest-dom": "5.9.5"
45
45
  },
46
46
  "peerDependencies": {
47
- "@teambit/legacy": "1.0.410",
47
+ "@teambit/legacy": "1.0.411",
48
48
  "react": "^16.8.0 || ^17.0.0",
49
49
  "react-dom": "^16.8.0 || ^17.0.0"
50
50
  },