@teambit/checkout 1.0.331 → 1.0.333

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.
@@ -1,7 +1,7 @@
1
1
  import { Consumer } from '@teambit/legacy/dist/consumer';
2
2
  import { ComponentID } from '@teambit/component-id';
3
3
  import Version from '@teambit/legacy/dist/scope/models/version';
4
- import { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';
4
+ import { SourceFile } from '@teambit/component.sources';
5
5
  import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
6
6
  import { ApplyVersionResult, FilesStatus, MergeStrategy, MergeResultsThreeWay } from '@teambit/merging';
7
7
  import { CheckoutProps } from './checkout.main.runtime';
@@ -15,23 +15,16 @@ function path() {
15
15
  };
16
16
  return data;
17
17
  }
18
- function _legacy() {
19
- const data = require("@teambit/legacy.utils");
20
- _legacy = function () {
21
- return data;
22
- };
23
- return data;
24
- }
25
- function _dataToPersist() {
26
- const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component/sources/data-to-persist"));
27
- _dataToPersist = function () {
18
+ function _component() {
19
+ const data = require("@teambit/component.sources");
20
+ _component = function () {
28
21
  return data;
29
22
  };
30
23
  return data;
31
24
  }
32
- function _removePath() {
33
- const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component/sources/remove-path"));
34
- _removePath = function () {
25
+ function _legacy() {
26
+ const data = require("@teambit/legacy.utils");
27
+ _legacy = function () {
35
28
  return data;
36
29
  };
37
30
  return data;
@@ -161,7 +154,7 @@ async function removeFilesIfNeeded(filesStatus, consumer, componentFromFS) {
161
154
  });
162
155
  if (!isExistOnFs) return;
163
156
  const filePathsFromFS = componentFromFS.files || [];
164
- const dataToPersist = new (_dataToPersist().default)();
157
+ const dataToPersist = new (_component().DataToPersist)();
165
158
  filePathsFromFS.forEach(file => {
166
159
  const filename = (0, _legacy().pathNormalizeToLinux)(file.relative);
167
160
  if (!filesStatus[filename]) {
@@ -169,7 +162,7 @@ async function removeFilesIfNeeded(filesStatus, consumer, componentFromFS) {
169
162
  filesStatus[filename] = _merging().FileStatus.removed;
170
163
  }
171
164
  if (filesStatus[filename] === _merging().FileStatus.removed) {
172
- dataToPersist.removePath(new (_removePath().default)(file.path));
165
+ dataToPersist.removePath(new (_component().RemovePath)(file.path));
173
166
  }
174
167
  });
175
168
  await dataToPersist.persistAllToFS();
@@ -1 +1 @@
1
- {"version":3,"names":["path","data","_interopRequireWildcard","require","_legacy","_dataToPersist","_interopRequireDefault","_removePath","_bitError","_chalk","_merging","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","forceOurs","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","BitError","updateFileStatus","undefined","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","isExistOnFs","getComponentIdIfExist","ignoreVersion","filePathsFromFS","dataToPersist","DataToPersist","filename","removed","removePath","RemovePath","persistAllToFS","componentFiles","map","clone","manual","filePath","normalize","foundFile","componentFile","conflict","from","output","merged","isBinaryConflict","fsFile","binaryConflict","addFiles","m","added","deletedConflictFiles","removeFiles","remainDeletedFiles","remainDeleted","deletedConflict","overrideFiles","overridden","updatedFiles","content","throwForFailures","allComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","failedComponent","chalk","bold","red","join"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport Version from '@teambit/legacy/dist/scope/models/version';\nimport { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy.utils';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n MergeResultsThreeWay,\n} from '@teambit/merging';\nimport { CheckoutProps } from './checkout.main.runtime';\n\nexport type ComponentStatusBase = {\n currentComponent?: ConsumerComponent;\n componentFromModel?: Version;\n id: ComponentID;\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n unchangedMessage?: string; // this gets populated either upon skip or failure.\n unchangedLegitimately?: boolean; // true for skipped legitimately (e.g. already up to date). false for failure.\n};\n\nexport type ComponentStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null | undefined;\n};\n\nexport type ApplyVersionWithComps = {\n applyVersionResult: ApplyVersionResult;\n component?: ConsumerComponent;\n // in case the component needs to be written to the filesystem, this is the component to write.\n legacyCompToWrite?: ConsumerComponent;\n};\n\n/**\n * This function optionally returns \"component\" object. If it returns, it means it needs to be written to the filesystem.\n * Otherwise, it means the component is already up to date and no need to write it.\n *\n * If no need to change anything (ours), then don't return the component object.\n * Otherwise, either return the component object as is (if no conflicts or \"theirs\"), or change the files in this\n * component object. Later, this component object is written to the filesystem.\n *\n * 1) when the files are modified with conflicts and the strategy is \"ours\", or forceOurs was used, leave the FS as is.\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", or forceTheirs was used, write the\n * component according to \"component\" object\n *\n * 3) when files are modified with no conflict or files are modified with conflicts and the\n * strategy is manual, load the component according to id.version and update component.files.\n * applyModifiedVersion() docs explains what files are updated/added.\n *\n * Side note:\n * Deleted file => if files are in used version but not in the modified one, no need to delete it. (similar to git).\n * Added file => if files are not in used version but in the modified one, they'll be under mergeResults.addFiles\n */\nexport async function applyVersion(\n consumer: Consumer,\n id: ComponentID,\n componentFromFS: ConsumerComponent | null | undefined, // it can be null only when isLanes is true\n mergeResults: MergeResultsThreeWay | null | undefined,\n checkoutProps: CheckoutProps\n): Promise<ApplyVersionWithComps> {\n if (!checkoutProps.isLane && !componentFromFS)\n throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n const { mergeStrategy, forceOurs } = checkoutProps;\n let filesStatus = {};\n if ((mergeResults?.hasConflicts && mergeStrategy === MergeOptions.ours) || forceOurs) {\n // even when isLane is true, the mergeResults is possible only when the component is on the filesystem\n // otherwise it's impossible to have conflicts\n if (!componentFromFS) throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n componentFromFS.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n consumer.bitMap.updateComponentId(id);\n return { applyVersionResult: { id, filesStatus } };\n }\n const component = await consumer.loadComponentFromModelImportIfNeeded(id);\n const componentMap = componentFromFS && componentFromFS.componentMap;\n if (componentFromFS && !componentMap) throw new BitError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, consumer, componentFromFS || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n filesStatus = { ...filesStatus, ...modifiedStatus };\n component.files = modifiedFiles;\n }\n\n // in case of forceTheirs, the mergeResults is undefined, the \"component\" object is according to \"theirs\", so it'll work\n // expected. (later, it writes the component object).\n\n return {\n applyVersionResult: { id, filesStatus },\n component,\n };\n}\n\nexport function updateFileStatus(files: SourceFile[], filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n files.forEach((file) => {\n const fileFromFs = componentFromFS?.files.find((f) => f.relative === file.relative);\n const areFilesEqual = fileFromFs && Buffer.compare(fileFromFs.contents, file.contents) === 0;\n // @ts-ignore\n filesStatus[pathNormalizeToLinux(file.relative)] = areFilesEqual ? FileStatus.unchanged : FileStatus.updated;\n });\n}\n\n/**\n * when files exist on the filesystem but not on the checked out versions, they need to be deleted.\n * without this function, these files would be left on the filesystem. (we don't delete the comp-dir before writing).\n * this needs to be done *before* the component is written to the filesystem, otherwise, it won't work when a file\n * has a case change. e.g. from uppercase to lowercase. (see merge-lane.e2e 'renaming files from uppercase to lowercase').\n */\nexport async function removeFilesIfNeeded(\n filesStatus: FilesStatus,\n consumer: Consumer,\n componentFromFS?: ConsumerComponent\n) {\n if (!componentFromFS) return;\n // @todo: if the component is not in the FS, it should be passed as undefined here.\n // in the case this is coming from merge-lane, it's sometimes populated from the scope.\n const isExistOnFs = consumer.bitMap.getComponentIdIfExist(componentFromFS.id, { ignoreVersion: true });\n if (!isExistOnFs) return;\n const filePathsFromFS = componentFromFS.files || [];\n const dataToPersist = new DataToPersist();\n filePathsFromFS.forEach((file) => {\n const filename = pathNormalizeToLinux(file.relative);\n if (!filesStatus[filename]) {\n // @ts-ignore todo: typescript has a good point here. it should be the string \"removed\", not chalk.green(removed).\n filesStatus[filename] = FileStatus.removed;\n }\n if (filesStatus[filename] === FileStatus.removed) {\n dataToPersist.removePath(new RemovePath(file.path));\n }\n });\n await dataToPersist.persistAllToFS();\n}\n\n/**\n * relevant only when\n * 1) there is no conflict => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.output.\n * 2) there is conflict and mergeStrategy is manual => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.conflict.\n *\n * this function only updates the files content, it doesn't write the files\n */\nexport function applyModifiedVersion(\n componentFiles: SourceFile[],\n mergeResults: MergeResultsThreeWay,\n mergeStrategy: MergeStrategy | null | undefined\n): { filesStatus: Record<string, any>; modifiedFiles: SourceFile[] } {\n let modifiedFiles = componentFiles.map((file) => file.clone());\n const filesStatus = {};\n if (mergeResults.hasConflicts && mergeStrategy !== MergeOptions.manual) {\n return { filesStatus, modifiedFiles };\n }\n mergeResults.modifiedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n if (file.conflict) {\n foundFile.contents = Buffer.from(file.conflict);\n filesStatus[file.filePath] = FileStatus.manual;\n } else if (typeof file.output === 'string') {\n foundFile.contents = Buffer.from(file.output);\n filesStatus[file.filePath] = FileStatus.merged;\n } else if (file.isBinaryConflict) {\n // leave the file as is and notify the user later about it.\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.binaryConflict;\n } else {\n throw new BitError(`file ${filePath} does not have output nor conflict`);\n }\n });\n\n mergeResults.addFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n if (!file.fsFile) return;\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.removeFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n filesStatus[file.filePath] = FileStatus.removed;\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n });\n mergeResults.remainDeletedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n filesStatus[file.filePath] = FileStatus.remainDeleted;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n filesStatus[file.filePath] = FileStatus.deletedConflict;\n });\n\n mergeResults.overrideFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.overridden;\n });\n mergeResults.updatedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.content;\n filesStatus[file.filePath] = FileStatus.updated;\n });\n\n return { filesStatus, modifiedFiles };\n}\n\nexport function throwForFailures(allComponentsStatus: ComponentStatusBase[]) {\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to proceed due to the following failures:\\n${failureMsgs}`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAI,WAAA,YAAAA,CAA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AAgB,IAAI,CAACD,CAAC,CAACE,qBAAqB,CAAC;EAC1G,IAAIH,gBAAgB,CAACjG,MAAM,EAAE;IAC3B,MAAMqG,WAAW,GAAGJ,gBAAgB,CACjC5B,GAAG,CACDiC,eAAe,IACd,GAAGC,gBAAK,CAACC,IAAI,CAACF,eAAe,CAACrF,EAAE,CAACM,QAAQ,CAAC,CAAC,CAAC,MAAMgF,gBAAK,CAACE,GAAG,CAACH,eAAe,CAACH,gBAA0B,CAAC,EAC3G,CAAC,CACAO,IAAI,CAAC,IAAI,CAAC;IACb,MAAM,KAAIhE,oBAAQ,EAAC,qDAAqD2D,WAAW,EAAE,CAAC;EACxF;AACF","ignoreList":[]}
1
+ {"version":3,"names":["path","data","_interopRequireWildcard","require","_component","_legacy","_bitError","_chalk","_interopRequireDefault","_merging","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","forceOurs","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","BitError","updateFileStatus","undefined","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","isExistOnFs","getComponentIdIfExist","ignoreVersion","filePathsFromFS","dataToPersist","DataToPersist","filename","removed","removePath","RemovePath","persistAllToFS","componentFiles","map","clone","manual","filePath","normalize","foundFile","componentFile","conflict","from","output","merged","isBinaryConflict","fsFile","binaryConflict","addFiles","m","added","deletedConflictFiles","removeFiles","remainDeletedFiles","remainDeleted","deletedConflict","overrideFiles","overridden","updatedFiles","content","throwForFailures","allComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","failedComponent","chalk","bold","red","join"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport Version from '@teambit/legacy/dist/scope/models/version';\nimport { SourceFile, RemovePath, DataToPersist } from '@teambit/component.sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy.utils';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n MergeResultsThreeWay,\n} from '@teambit/merging';\nimport { CheckoutProps } from './checkout.main.runtime';\n\nexport type ComponentStatusBase = {\n currentComponent?: ConsumerComponent;\n componentFromModel?: Version;\n id: ComponentID;\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n unchangedMessage?: string; // this gets populated either upon skip or failure.\n unchangedLegitimately?: boolean; // true for skipped legitimately (e.g. already up to date). false for failure.\n};\n\nexport type ComponentStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null | undefined;\n};\n\nexport type ApplyVersionWithComps = {\n applyVersionResult: ApplyVersionResult;\n component?: ConsumerComponent;\n // in case the component needs to be written to the filesystem, this is the component to write.\n legacyCompToWrite?: ConsumerComponent;\n};\n\n/**\n * This function optionally returns \"component\" object. If it returns, it means it needs to be written to the filesystem.\n * Otherwise, it means the component is already up to date and no need to write it.\n *\n * If no need to change anything (ours), then don't return the component object.\n * Otherwise, either return the component object as is (if no conflicts or \"theirs\"), or change the files in this\n * component object. Later, this component object is written to the filesystem.\n *\n * 1) when the files are modified with conflicts and the strategy is \"ours\", or forceOurs was used, leave the FS as is.\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", or forceTheirs was used, write the\n * component according to \"component\" object\n *\n * 3) when files are modified with no conflict or files are modified with conflicts and the\n * strategy is manual, load the component according to id.version and update component.files.\n * applyModifiedVersion() docs explains what files are updated/added.\n *\n * Side note:\n * Deleted file => if files are in used version but not in the modified one, no need to delete it. (similar to git).\n * Added file => if files are not in used version but in the modified one, they'll be under mergeResults.addFiles\n */\nexport async function applyVersion(\n consumer: Consumer,\n id: ComponentID,\n componentFromFS: ConsumerComponent | null | undefined, // it can be null only when isLanes is true\n mergeResults: MergeResultsThreeWay | null | undefined,\n checkoutProps: CheckoutProps\n): Promise<ApplyVersionWithComps> {\n if (!checkoutProps.isLane && !componentFromFS)\n throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n const { mergeStrategy, forceOurs } = checkoutProps;\n let filesStatus = {};\n if ((mergeResults?.hasConflicts && mergeStrategy === MergeOptions.ours) || forceOurs) {\n // even when isLane is true, the mergeResults is possible only when the component is on the filesystem\n // otherwise it's impossible to have conflicts\n if (!componentFromFS) throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n componentFromFS.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n consumer.bitMap.updateComponentId(id);\n return { applyVersionResult: { id, filesStatus } };\n }\n const component = await consumer.loadComponentFromModelImportIfNeeded(id);\n const componentMap = componentFromFS && componentFromFS.componentMap;\n if (componentFromFS && !componentMap) throw new BitError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, consumer, componentFromFS || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n filesStatus = { ...filesStatus, ...modifiedStatus };\n component.files = modifiedFiles;\n }\n\n // in case of forceTheirs, the mergeResults is undefined, the \"component\" object is according to \"theirs\", so it'll work\n // expected. (later, it writes the component object).\n\n return {\n applyVersionResult: { id, filesStatus },\n component,\n };\n}\n\nexport function updateFileStatus(files: SourceFile[], filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n files.forEach((file) => {\n const fileFromFs = componentFromFS?.files.find((f) => f.relative === file.relative);\n const areFilesEqual = fileFromFs && Buffer.compare(fileFromFs.contents, file.contents) === 0;\n // @ts-ignore\n filesStatus[pathNormalizeToLinux(file.relative)] = areFilesEqual ? FileStatus.unchanged : FileStatus.updated;\n });\n}\n\n/**\n * when files exist on the filesystem but not on the checked out versions, they need to be deleted.\n * without this function, these files would be left on the filesystem. (we don't delete the comp-dir before writing).\n * this needs to be done *before* the component is written to the filesystem, otherwise, it won't work when a file\n * has a case change. e.g. from uppercase to lowercase. (see merge-lane.e2e 'renaming files from uppercase to lowercase').\n */\nexport async function removeFilesIfNeeded(\n filesStatus: FilesStatus,\n consumer: Consumer,\n componentFromFS?: ConsumerComponent\n) {\n if (!componentFromFS) return;\n // @todo: if the component is not in the FS, it should be passed as undefined here.\n // in the case this is coming from merge-lane, it's sometimes populated from the scope.\n const isExistOnFs = consumer.bitMap.getComponentIdIfExist(componentFromFS.id, { ignoreVersion: true });\n if (!isExistOnFs) return;\n const filePathsFromFS = componentFromFS.files || [];\n const dataToPersist = new DataToPersist();\n filePathsFromFS.forEach((file) => {\n const filename = pathNormalizeToLinux(file.relative);\n if (!filesStatus[filename]) {\n // @ts-ignore todo: typescript has a good point here. it should be the string \"removed\", not chalk.green(removed).\n filesStatus[filename] = FileStatus.removed;\n }\n if (filesStatus[filename] === FileStatus.removed) {\n dataToPersist.removePath(new RemovePath(file.path));\n }\n });\n await dataToPersist.persistAllToFS();\n}\n\n/**\n * relevant only when\n * 1) there is no conflict => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.output.\n * 2) there is conflict and mergeStrategy is manual => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.conflict.\n *\n * this function only updates the files content, it doesn't write the files\n */\nexport function applyModifiedVersion(\n componentFiles: SourceFile[],\n mergeResults: MergeResultsThreeWay,\n mergeStrategy: MergeStrategy | null | undefined\n): { filesStatus: Record<string, any>; modifiedFiles: SourceFile[] } {\n let modifiedFiles = componentFiles.map((file) => file.clone());\n const filesStatus = {};\n if (mergeResults.hasConflicts && mergeStrategy !== MergeOptions.manual) {\n return { filesStatus, modifiedFiles };\n }\n mergeResults.modifiedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n if (file.conflict) {\n foundFile.contents = Buffer.from(file.conflict);\n filesStatus[file.filePath] = FileStatus.manual;\n } else if (typeof file.output === 'string') {\n foundFile.contents = Buffer.from(file.output);\n filesStatus[file.filePath] = FileStatus.merged;\n } else if (file.isBinaryConflict) {\n // leave the file as is and notify the user later about it.\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.binaryConflict;\n } else {\n throw new BitError(`file ${filePath} does not have output nor conflict`);\n }\n });\n\n mergeResults.addFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n if (!file.fsFile) return;\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.removeFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n filesStatus[file.filePath] = FileStatus.removed;\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n });\n mergeResults.remainDeletedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n filesStatus[file.filePath] = FileStatus.remainDeleted;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n filesStatus[file.filePath] = FileStatus.deletedConflict;\n });\n\n mergeResults.overrideFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.overridden;\n });\n mergeResults.updatedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.content;\n filesStatus[file.filePath] = FileStatus.updated;\n });\n\n return { filesStatus, modifiedFiles };\n}\n\nexport function throwForFailures(allComponentsStatus: ComponentStatusBase[]) {\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to proceed due to the following failures:\\n${failureMsgs}`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,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AM,EAAE;IAC3B,MAAMqG,WAAW,GAAGJ,gBAAgB,CACjC5B,GAAG,CACDiC,eAAe,IACd,GAAGC,gBAAK,CAACC,IAAI,CAACF,eAAe,CAACrF,EAAE,CAACM,QAAQ,CAAC,CAAC,CAAC,MAAMgF,gBAAK,CAACE,GAAG,CAACH,eAAe,CAACH,gBAA0B,CAAC,EAC3G,CAAC,CACAO,IAAI,CAAC,IAAI,CAAC;IACb,MAAM,KAAIhE,oBAAQ,EAAC,qDAAqD2D,WAAW,EAAE,CAAC;EACxF;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/checkout",
3
- "version": "1.0.331",
3
+ "version": "1.0.333",
4
4
  "homepage": "https://bit.cloud/teambit/component/checkout",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "checkout",
9
- "version": "1.0.331"
9
+ "version": "1.0.333"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,14 +15,15 @@
15
15
  "@teambit/bit-error": "0.0.404",
16
16
  "@teambit/component-id": "1.2.0",
17
17
  "@teambit/harmony": "0.4.6",
18
- "@teambit/cli": "0.0.908",
19
- "@teambit/merging": "1.0.331",
18
+ "@teambit/cli": "0.0.910",
19
+ "@teambit/merging": "1.0.333",
20
+ "@teambit/component.sources": "0.0.2",
20
21
  "@teambit/legacy.utils": "0.0.3",
21
- "@teambit/component-writer": "1.0.331",
22
- "@teambit/importer": "1.0.331",
23
- "@teambit/logger": "0.0.1001",
24
- "@teambit/remove": "1.0.331",
25
- "@teambit/workspace": "1.0.331"
22
+ "@teambit/component-writer": "1.0.333",
23
+ "@teambit/importer": "1.0.333",
24
+ "@teambit/logger": "0.0.1003",
25
+ "@teambit/remove": "1.0.333",
26
+ "@teambit/workspace": "1.0.333"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@types/lodash": "4.14.165",
@@ -34,10 +35,10 @@
34
35
  "fs-extra": "10.0.0",
35
36
  "@types/mocha": "9.1.0",
36
37
  "@teambit/harmony.envs.core-aspect-env": "0.0.42",
37
- "@teambit/component.testing.mock-components": "0.0.207",
38
- "@teambit/harmony.testing.load-aspect": "0.0.202",
39
- "@teambit/lister": "1.0.331",
40
- "@teambit/snapping": "1.0.331",
38
+ "@teambit/component.testing.mock-components": "0.0.208",
39
+ "@teambit/harmony.testing.load-aspect": "0.0.203",
40
+ "@teambit/lister": "1.0.333",
41
+ "@teambit/snapping": "1.0.333",
41
42
  "@teambit/workspace.testing.mock-workspace": "0.0.27"
42
43
  },
43
44
  "peerDependencies": {